cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1025752 - /cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
Date Wed, 20 Oct 2010 21:10:53 GMT
Author: jbellis
Date: Wed Oct 20 21:10:53 2010
New Revision: 1025752

URL: http://svn.apache.org/viewvc?rev=1025752&view=rev
Log:
avoid updating server schema except for explicit 'update column family'.  patch by Pavel Yaskevich;
reviewed by jbellis for CASSANDRA-1635

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java?rev=1025752&r1=1025751&r2=1025752&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java Wed Oct 20 21:10:53 2010
@@ -1872,7 +1872,7 @@ public class CliClient 
             AbstractType validator = function.getValidator();
             byte[] value = getBytesAccordingToType(functionArg, validator);
 
-            // updating CfDef
+            // performing ColumnDef local validator update
             if (withUpdate)
             {
                 updateColumnMetaData(columnFamily, columnName, validator.getClass().getName());
@@ -1880,14 +1880,6 @@ public class CliClient 
 
             return value;
         }
-        catch (InvalidRequestException e)
-        {
-            throw new RuntimeException(e.getWhy());
-        }
-        catch (TException e)
-        {
-            throw new RuntimeException(e);
-        }
         catch (Exception e)
         {
             throw new RuntimeException(e.getMessage());
@@ -1895,15 +1887,12 @@ public class CliClient 
     }
 
     /**
-     * Used to update column family definition with new column metadata
+     * Used to locally update column family definition with new column metadata
      * @param columnFamily    - CfDef record
      * @param columnName      - column name represented as byte[]
      * @param validationClass - value validation class
-     * @throws InvalidRequestException - thrown when invalid request
-     * @throws TException - thrown when transport to thrift failed
      */
     private void updateColumnMetaData(CfDef columnFamily, byte[] columnName, String validationClass)
-            throws InvalidRequestException, TException
     {
         List<ColumnDef> columnMetaData = columnFamily.getColumn_metadata();
         ColumnDef column = getColumnDefByName(columnFamily, columnName);
@@ -1921,9 +1910,6 @@ public class CliClient 
         {
             columnMetaData.add(new ColumnDef(columnName, validationClass));
         }
-        
-        // saving information
-        thriftClient_.system_update_column_family(columnFamily);
     }
 
     /**



Mime
View raw message