cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r1036897 - in /cassandra/trunk: src/avro/ src/java/org/apache/cassandra/avro/ src/java/org/apache/cassandra/db/migration/ src/java/org/apache/cassandra/thrift/ test/unit/org/apache/cassandra/db/
Date Fri, 19 Nov 2010 15:28:30 GMT
Author: gdusbabek
Date: Fri Nov 19 15:28:29 2010
New Revision: 1036897

URL: http://svn.apache.org/viewvc?rev=1036897&view=rev
Log:
remove unused fields in DropColumnFamily, DropKeyspace. patch by gdusbabek, reviewe by jbellis.
CASSANDRA-1715

Modified:
    cassandra/trunk/src/avro/internode.genavro
    cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.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/thrift/CassandraServer.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java

Modified: cassandra/trunk/src/avro/internode.genavro
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/avro/internode.genavro?rev=1036897&r1=1036896&r2=1036897&view=diff
==============================================================================
--- cassandra/trunk/src/avro/internode.genavro (original)
+++ cassandra/trunk/src/avro/internode.genavro Fri Nov 19 15:28:29 2010
@@ -42,13 +42,11 @@ protocol InterNode {
     record DropColumnFamily {
         string ksname;
         string cfname;
-        boolean block_on_deletion;
     }
 
     @namespace("org.apache.cassandra.db.migration.avro")
     record DropKeyspace {
         string ksname;
-        boolean block_on_deletion;
     }
 
     @namespace("org.apache.cassandra.db.migration.avro")

Modified: cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java?rev=1036897&r1=1036896&r2=1036897&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java Fri Nov 19 15:28:29
2010
@@ -884,7 +884,7 @@ public class CassandraServer implements 
         
         try
         {
-            applyMigrationOnStage(new DropColumnFamily(state().getKeyspace(), column_family.toString(),
true));
+            applyMigrationOnStage(new DropColumnFamily(state().getKeyspace(), column_family.toString()));
             return DatabaseDescriptor.getDefsVersion().toString();
         }
         catch (ConfigurationException e)
@@ -904,7 +904,7 @@ public class CassandraServer implements 
         
         try
         {
-            applyMigrationOnStage(new DropKeyspace(keyspace.toString(), true));
+            applyMigrationOnStage(new DropKeyspace(keyspace.toString()));
             return DatabaseDescriptor.getDefsVersion().toString();
         }
         catch (ConfigurationException e)

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=1036897&r1=1036896&r2=1036897&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 Fri Nov
19 15:28:29 2010
@@ -38,17 +38,15 @@ public class DropColumnFamily extends Mi
 {
     private String tableName;
     private String cfName;
-    private boolean blockOnFileDeletion;
     
     /** Required no-arg constructor */
     protected DropColumnFamily() { /* pass */ }
     
-    public DropColumnFamily(String tableName, String cfName, boolean blockOnFileDeletion)
throws ConfigurationException, IOException
+    public DropColumnFamily(String tableName, String cfName) throws ConfigurationException,
IOException
     {
         super(UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress()), DatabaseDescriptor.getDefsVersion());
         this.tableName = tableName;
         this.cfName = cfName;
-        this.blockOnFileDeletion = blockOnFileDeletion;
         
         KSMetaData ksm = DatabaseDescriptor.getTableDefinition(tableName);
         if (ksm == null)
@@ -108,7 +106,6 @@ public class DropColumnFamily extends Mi
         org.apache.cassandra.db.migration.avro.DropColumnFamily dcf = new org.apache.cassandra.db.migration.avro.DropColumnFamily();
         dcf.ksname = new org.apache.avro.util.Utf8(tableName);
         dcf.cfname = new org.apache.avro.util.Utf8(cfName);
-        dcf.block_on_deletion = blockOnFileDeletion;
         mi.migration = dcf;
     }
 
@@ -117,6 +114,5 @@ public class DropColumnFamily extends Mi
         org.apache.cassandra.db.migration.avro.DropColumnFamily dcf = (org.apache.cassandra.db.migration.avro.DropColumnFamily)mi.migration;
         tableName = dcf.ksname.toString();
         cfName = dcf.cfname.toString();
-        blockOnFileDeletion = dcf.block_on_deletion;
     }
 }

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=1036897&r1=1036896&r2=1036897&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 Fri Nov 19
15:28:29 2010
@@ -34,16 +34,14 @@ import java.io.IOException;
 public class DropKeyspace extends Migration
 {
     private String name;
-    private boolean blockOnFileDeletion;
     
     /** Required no-arg constructor */
     protected DropKeyspace() { /* pass */ }
     
-    public DropKeyspace(String name, boolean blockOnFileDeletion) throws ConfigurationException,
IOException
+    public DropKeyspace(String name) throws ConfigurationException, IOException
     {
         super(UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress()), DatabaseDescriptor.getDefsVersion());
         this.name = name;
-        this.blockOnFileDeletion = blockOnFileDeletion;
         KSMetaData ksm = DatabaseDescriptor.getTableDefinition(name);
         if (ksm == null)
             throw new ConfigurationException("Keyspace does not exist.");
@@ -98,7 +96,6 @@ public class DropKeyspace extends Migrat
     {
         org.apache.cassandra.db.migration.avro.DropKeyspace dks = new org.apache.cassandra.db.migration.avro.DropKeyspace();
         dks.ksname = new org.apache.avro.util.Utf8(name);
-        dks.block_on_deletion = blockOnFileDeletion;
         mi.migration = dks;
     }
 
@@ -106,6 +103,5 @@ public class DropKeyspace extends Migrat
     {
         org.apache.cassandra.db.migration.avro.DropKeyspace dks = (org.apache.cassandra.db.migration.avro.DropKeyspace)mi.migration;
         name = dks.ksname.toString();
-        blockOnFileDeletion = dks.block_on_deletion;
     }
 }

Modified: cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java?rev=1036897&r1=1036896&r2=1036897&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java Fri Nov 19 15:28:29
2010
@@ -729,7 +729,7 @@ public class CassandraServer implements 
         
         try
         {
-            applyMigrationOnStage(new DropColumnFamily(state().getKeyspace(), column_family,
true));
+            applyMigrationOnStage(new DropColumnFamily(state().getKeyspace(), column_family));
             return DatabaseDescriptor.getDefsVersion().toString();
         }
         catch (ConfigurationException e)
@@ -795,7 +795,7 @@ public class CassandraServer implements 
         
         try
         {
-            applyMigrationOnStage(new DropKeyspace(keyspace, true));
+            applyMigrationOnStage(new DropKeyspace(keyspace));
             return DatabaseDescriptor.getDefsVersion().toString();
         }
         catch (ConfigurationException e)

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=1036897&r1=1036896&r2=1036897&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java Fri Nov 19 15:28:29 2010
@@ -144,7 +144,7 @@ public class DefsTest extends CleanupHel
         assert DatabaseDescriptor.getDefsVersion().equals(ver2);
         
         // drop it.
-        Migration m3 = new DropColumnFamily("Keyspace1", "MigrationCf_2", true);
+        Migration m3 = new DropColumnFamily("Keyspace1", "MigrationCf_2");
         m3.apply();
         UUID ver3 = m3.getVersion();
         assert DatabaseDescriptor.getDefsVersion().equals(ver3);
@@ -225,7 +225,7 @@ public class DefsTest extends CleanupHel
         store.getFlushPath();
         assert DefsTable.getFiles(cfm.tableName, cfm.cfName).size() > 0;
         
-        new DropColumnFamily(ks.name, cfm.cfName, true).apply();
+        new DropColumnFamily(ks.name, cfm.cfName).apply();
         
         assert !DatabaseDescriptor.getTableDefinition(ks.name).cfMetaData().containsKey(cfm.cfName);
         
@@ -344,7 +344,7 @@ public class DefsTest extends CleanupHel
         store.forceBlockingFlush();
         assert DefsTable.getFiles(cfm.tableName, cfm.cfName).size() > 0;
         
-        new DropKeyspace(ks.name, true).apply();
+        new DropKeyspace(ks.name).apply();
         
         assert DatabaseDescriptor.getTableDefinition(ks.name) == null;
         



Mime
View raw message