Keyspace name length

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Keyspace name length

Saurabh Sethi
Apache’s Cassandra code validates the keyspace name length for max 48 characters whereas Datastax’s documentation says keyspace name should be 32 or fewer characters.

Which of these is correct?

Thanks,
Saurabh
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Keyspace name length

Robert Coli-3
(docs AT datastax.com added to the bcc: for their information.)

On Fri, May 1, 2015 at 11:15 AM, Saurabh Sethi <[hidden email]> wrote:
Apache’s Cassandra code validates the keyspace name length for max 48 characters whereas Datastax’s documentation says keyspace name should be 32 or fewer characters.

Which of these is correct?

Apache Cassandra is open-source, questions like this can trivially be answered by reading the source code.

src/java/org/apache/cassandra/config/KSMetaData.java:            throw new ConfigurationException(String.format("Keyspace name must not be empty, more than %s characters long, or contain non-alphanumeric-underscore characters (got \"%s\")", Schema.NAME_LENGTH, name));

src/java/org/apache/cassandra/config/Schema.java:    public static final int NAME_LENGTH = 48;

=Rob
 
Loading...