cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/3] git commit: amend error messages to include possibility of invalid characters patch by jbellis for CASSANDRA-4721
Date Tue, 25 Sep 2012 21:51:07 GMT
amend error messages to include possibility of invalid characters
patch by jbellis for CASSANDRA-4721


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/05a5ede9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/05a5ede9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/05a5ede9

Branch: refs/heads/trunk
Commit: 05a5ede91ac558998f93024439185fdd1e04345e
Parents: b961986
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Tue Sep 25 16:50:27 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Tue Sep 25 16:50:27 2012 -0500

----------------------------------------------------------------------
 .../org/apache/cassandra/config/CFMetaData.java    |    4 ++--
 .../org/apache/cassandra/config/KSMetaData.java    |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/05a5ede9/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java
index 9e27231..5184d0a 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -927,9 +927,9 @@ public final class CFMetaData
     public CFMetaData validate() throws ConfigurationException
     {
         if (!isNameValid(ksName))
-            throw new ConfigurationException(String.format("Invalid keyspace name: shouldn't
be empty nor more than %s characters long (got \"%s\")", Schema.NAME_LENGTH, ksName));
+            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, ksName));
         if (!isNameValid(cfName))
-            throw new ConfigurationException(String.format("Invalid keyspace name: shouldn't
be empty nor more than %s characters long (got \"%s\")", Schema.NAME_LENGTH, cfName));
+            throw new ConfigurationException(String.format("ColumnFamily name must not be
empty, more than %s characters long, or contain non-alphanumeric-underscore characters (got
\"%s\")", Schema.NAME_LENGTH, cfName));
 
         if (cfType == null)
             throw new ConfigurationException(String.format("Invalid column family type for
%s", cfName));

http://git-wip-us.apache.org/repos/asf/cassandra/blob/05a5ede9/src/java/org/apache/cassandra/config/KSMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/KSMetaData.java b/src/java/org/apache/cassandra/config/KSMetaData.java
index 0aacc1c..7b27875 100644
--- a/src/java/org/apache/cassandra/config/KSMetaData.java
+++ b/src/java/org/apache/cassandra/config/KSMetaData.java
@@ -189,7 +189,7 @@ public final class KSMetaData
     public KSMetaData validate() throws ConfigurationException
     {
         if (!CFMetaData.isNameValid(name))
-            throw new ConfigurationException(String.format("Invalid keyspace name: shouldn't
be empty nor more than %s characters long (got \"%s\")", Schema.NAME_LENGTH, name));
+            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));
 
         // Attempt to instantiate the ARS, which will throw a ConfigException if the strategy_options
aren't fully formed
         TokenMetadata tmd = StorageService.instance.getTokenMetadata();


Mime
View raw message