cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r931199 - in /cassandra/trunk: src/java/org/apache/cassandra/auth/ src/java/org/apache/cassandra/config/ src/java/org/apache/cassandra/db/migration/ test/unit/org/apache/cassandra/db/
Date Tue, 06 Apr 2010 16:01:45 GMT
Author: gdusbabek
Date: Tue Apr  6 16:01:44 2010
New Revision: 931199

URL: http://svn.apache.org/viewvc?rev=931199&view=rev
Log:
move ConfigurationException to its own class file. Patch by Gary Dusbabek, reviewed by Jonthan
Ellis. CASSANDRA-827

Added:
    cassandra/trunk/src/java/org/apache/cassandra/config/ConfigurationException.java
Modified:
    cassandra/trunk/src/java/org/apache/cassandra/auth/AllowAllAuthenticator.java
    cassandra/trunk/src/java/org/apache/cassandra/auth/IAuthenticator.java
    cassandra/trunk/src/java/org/apache/cassandra/auth/SimpleAuthenticator.java
    cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
    cassandra/trunk/src/java/org/apache/cassandra/db/migration/AddColumnFamily.java
    cassandra/trunk/src/java/org/apache/cassandra/db/migration/AddKeyspace.java
    cassandra/trunk/src/java/org/apache/cassandra/db/migration/DropColumnFamily.java
    cassandra/trunk/src/java/org/apache/cassandra/db/migration/DropKeyspace.java
    cassandra/trunk/src/java/org/apache/cassandra/db/migration/RenameColumnFamily.java
    cassandra/trunk/src/java/org/apache/cassandra/db/migration/RenameKeyspace.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/auth/AllowAllAuthenticator.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/auth/AllowAllAuthenticator.java?rev=931199&r1=931198&r2=931199&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/auth/AllowAllAuthenticator.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/auth/AllowAllAuthenticator.java Tue Apr
 6 16:01:44 2010
@@ -21,7 +21,7 @@ package org.apache.cassandra.auth;
  */
 
 
-import org.apache.cassandra.config.DatabaseDescriptor.ConfigurationException;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.thrift.AccessLevel;
 import org.apache.cassandra.thrift.AuthenticationException;
 import org.apache.cassandra.thrift.AuthenticationRequest;
@@ -37,7 +37,8 @@ public class AllowAllAuthenticator imple
     }
     
    @Override    
-    public void validateConfiguration() throws ConfigurationException {
+    public void validateConfiguration() throws ConfigurationException
+   {
         // do nothing, no configuration to validate
     }
 }

Modified: cassandra/trunk/src/java/org/apache/cassandra/auth/IAuthenticator.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/auth/IAuthenticator.java?rev=931199&r1=931198&r2=931199&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/auth/IAuthenticator.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/auth/IAuthenticator.java Tue Apr  6 16:01:44
2010
@@ -21,7 +21,7 @@ package org.apache.cassandra.auth;
  */
 
 
-import org.apache.cassandra.config.DatabaseDescriptor.ConfigurationException;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.thrift.AccessLevel;
 import org.apache.cassandra.thrift.AuthenticationException;
 import org.apache.cassandra.thrift.AuthenticationRequest;

Modified: cassandra/trunk/src/java/org/apache/cassandra/auth/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/auth/SimpleAuthenticator.java?rev=931199&r1=931198&r2=931199&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/auth/SimpleAuthenticator.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/auth/SimpleAuthenticator.java Tue Apr  6
16:01:44 2010
@@ -26,7 +26,7 @@ import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.util.Properties;
 
-import org.apache.cassandra.config.DatabaseDescriptor.ConfigurationException;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.thrift.AccessLevel;
 import org.apache.cassandra.thrift.AuthenticationException;
 import org.apache.cassandra.thrift.AuthenticationRequest;

Added: cassandra/trunk/src/java/org/apache/cassandra/config/ConfigurationException.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/ConfigurationException.java?rev=931199&view=auto
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/ConfigurationException.java (added)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/ConfigurationException.java Tue Apr
 6 16:01:44 2010
@@ -0,0 +1,27 @@
+/**
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+* <p/>
+* http://www.apache.org/licenses/LICENSE-2.0
+* <p/>
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package org.apache.cassandra.config;
+
+public class ConfigurationException extends Exception
+{
+    public ConfigurationException(String message)
+    {
+        super(message);
+    }
+}

Modified: cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java?rev=931199&r1=931198&r2=931199&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java Tue Apr 
6 16:01:44 2010
@@ -1135,14 +1135,6 @@ public class DatabaseDescriptor
         return defsVersion;
     }
 
-    public static class ConfigurationException extends Exception
-    {
-        public ConfigurationException(String message)
-        {
-            super(message);
-        }
-    }
-
     public static InetAddress getListenAddress()
     {
         return listenAddress;

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/migration/AddColumnFamily.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/migration/AddColumnFamily.java?rev=931199&r1=931198&r2=931199&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/migration/AddColumnFamily.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/migration/AddColumnFamily.java Tue Apr
 6 16:01:44 2010
@@ -1,19 +1,16 @@
 package org.apache.cassandra.db.migration;
 
 import org.apache.cassandra.config.CFMetaData;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.config.DatabaseDescriptor.ConfigurationException;
 import org.apache.cassandra.config.KSMetaData;
-import org.apache.cassandra.db.DefsTable;
 import org.apache.cassandra.db.RowMutation;
 import org.apache.cassandra.db.Table;
 import org.apache.cassandra.db.commitlog.CommitLog;
-import org.apache.cassandra.db.filter.QueryPath;
 import org.apache.cassandra.io.ICompactSerializer;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.UUIDGen;
 
-import java.io.ByteArrayOutputStream;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
@@ -58,9 +55,9 @@ public class AddColumnFamily extends Mig
         KSMetaData ksm = DatabaseDescriptor.getTableDefinition(cfm.tableName);
         
         if (ksm == null)
-            throw new DatabaseDescriptor.ConfigurationException("Keyspace does not already
exist.");
+            throw new ConfigurationException("Keyspace does not already exist.");
         else if (ksm.cfMetaData().containsKey(cfm.cfName))
-            throw new DatabaseDescriptor.ConfigurationException("CF is already defined in
that keyspace.");
+            throw new ConfigurationException("CF is already defined in that keyspace.");
         
         // clone ksm but include the new cf def.
         KSMetaData newKsm = makeNewKeyspaceDefinition(ksm);

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/migration/AddKeyspace.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/migration/AddKeyspace.java?rev=931199&r1=931198&r2=931199&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/migration/AddKeyspace.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/migration/AddKeyspace.java Tue Apr  6
16:01:44 2010
@@ -19,8 +19,8 @@
 package org.apache.cassandra.db.migration;
 
 import org.apache.cassandra.config.CFMetaData;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.config.DatabaseDescriptor.ConfigurationException;
 import org.apache.cassandra.config.KSMetaData;
 import org.apache.cassandra.db.RowMutation;
 import org.apache.cassandra.db.Table;

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/migration/DropColumnFamily.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/migration/DropColumnFamily.java?rev=931199&r1=931198&r2=931199&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/migration/DropColumnFamily.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/migration/DropColumnFamily.java Tue Apr
 6 16:01:44 2010
@@ -1,10 +1,9 @@
 package org.apache.cassandra.db.migration;
 
 import org.apache.cassandra.config.CFMetaData;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.config.DatabaseDescriptor.ConfigurationException;
 import org.apache.cassandra.config.KSMetaData;
-import org.apache.cassandra.db.DefsTable;
 import org.apache.cassandra.db.RowMutation;
 import org.apache.cassandra.db.SystemTable;
 import org.apache.cassandra.db.Table;

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/migration/DropKeyspace.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/migration/DropKeyspace.java?rev=931199&r1=931198&r2=931199&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/migration/DropKeyspace.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/migration/DropKeyspace.java Tue Apr 
6 16:01:44 2010
@@ -19,8 +19,8 @@
 package org.apache.cassandra.db.migration;
 
 import org.apache.cassandra.config.CFMetaData;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.config.DatabaseDescriptor.ConfigurationException;
 import org.apache.cassandra.config.KSMetaData;
 import org.apache.cassandra.db.HintedHandOffManager;
 import org.apache.cassandra.db.RowMutation;

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/migration/RenameColumnFamily.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/migration/RenameColumnFamily.java?rev=931199&r1=931198&r2=931199&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/migration/RenameColumnFamily.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/migration/RenameColumnFamily.java Tue
Apr  6 16:01:44 2010
@@ -1,8 +1,8 @@
 package org.apache.cassandra.db.migration;
 
 import org.apache.cassandra.config.CFMetaData;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.config.DatabaseDescriptor.ConfigurationException;
 import org.apache.cassandra.config.KSMetaData;
 import org.apache.cassandra.db.DefsTable;
 import org.apache.cassandra.db.RowMutation;
@@ -66,11 +66,11 @@ public class RenameColumnFamily extends 
         
         KSMetaData ksm = DatabaseDescriptor.getTableDefinition(tableName);
         if (ksm == null)
-            throw new DatabaseDescriptor.ConfigurationException("Keyspace does not already
exist.");
+            throw new ConfigurationException("Keyspace does not already exist.");
         if (!ksm.cfMetaData().containsKey(oldName))
-            throw new DatabaseDescriptor.ConfigurationException("CF is not defined in that
keyspace.");
+            throw new ConfigurationException("CF is not defined in that keyspace.");
         if (ksm.cfMetaData().containsKey(newName))
-            throw new DatabaseDescriptor.ConfigurationException("CF is already defined in
that keyspace.");
+            throw new ConfigurationException("CF is already defined in that keyspace.");
         
         // clone the ksm, replacing cfm with the new one.
         KSMetaData newKsm = makeNewKeyspaceDefinition(ksm);

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/migration/RenameKeyspace.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/migration/RenameKeyspace.java?rev=931199&r1=931198&r2=931199&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/migration/RenameKeyspace.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/migration/RenameKeyspace.java Tue Apr
 6 16:01:44 2010
@@ -18,8 +18,8 @@
 
 package org.apache.cassandra.db.migration;
 
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.config.DatabaseDescriptor.ConfigurationException;
 import org.apache.cassandra.config.KSMetaData;
 import org.apache.cassandra.db.DefsTable;
 import org.apache.cassandra.db.HintedHandOffManager;

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java?rev=931199&r1=931198&r2=931199&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java Tue Apr  6 16:01:44 2010
@@ -20,7 +20,7 @@ package org.apache.cassandra.db;
 
 import org.apache.cassandra.CleanupHelper;
 import org.apache.cassandra.config.CFMetaData;
-import static org.apache.cassandra.config.DatabaseDescriptor.ConfigurationException;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.config.KSMetaData;
 import org.apache.cassandra.db.commitlog.CommitLog;



Mime
View raw message