cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1125014 - in /cassandra/branches/cassandra-0.8.1: ./ contrib/ debian/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/cli/ src/java/org/apache/cassandra/cql/ src/java/org/apache/cassandra/db/ src/java/o...
Date Thu, 19 May 2011 17:43:15 GMT
Author: jbellis
Date: Thu May 19 17:43:15 2011
New Revision: 1125014

URL: http://svn.apache.org/viewvc?rev=1125014&view=rev
Log:
merge from 0.8

Modified:
    cassandra/branches/cassandra-0.8.1/   (props changed)
    cassandra/branches/cassandra-0.8.1/CHANGES.txt
    cassandra/branches/cassandra-0.8.1/contrib/   (props changed)
    cassandra/branches/cassandra-0.8.1/debian/rules
    cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
  (props changed)
    cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
  (props changed)
    cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
  (props changed)
    cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
  (props changed)
    cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
  (props changed)
    cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cli/Cli.g
    cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cli/CliClient.java
    cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cql/Cql.g
    cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/db/CompactionManager.java
    cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/gms/EndpointState.java
    cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/gms/Gossiper.java
    cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/service/StorageService.java
    cassandra/branches/cassandra-0.8.1/src/resources/org/apache/cassandra/cli/CliHelp.yaml
    cassandra/branches/cassandra-0.8.1/test/unit/org/apache/cassandra/cli/CliTest.java

Propchange: cassandra/branches/cassandra-0.8.1/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 19 17:43:15 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
-/cassandra/branches/cassandra-0.7:1026516-1104371,1124780
+/cassandra/branches/cassandra-0.7:1026516-1125002
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
-/cassandra/branches/cassandra-0.8:1090935-1104595,1124789
+/cassandra/branches/cassandra-0.8:1090935-1125013
 /cassandra/tags/cassandra-0.7.0-rc3:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3:774578-796573
 /incubator/cassandra/branches/cassandra-0.4:810145-834239,834349-834350

Modified: cassandra/branches/cassandra-0.8.1/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.1/CHANGES.txt?rev=1125014&r1=1125013&r2=1125014&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.1/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8.1/CHANGES.txt Thu May 19 17:43:15 2011
@@ -16,9 +16,11 @@
  * update CQL consistency levels (CASSANDRA-2566)
  * mark BRAF buffer invalid post-flush so we don't re-flush partial
    buffers again, especially on CL writes (CASSANDRA-2660)
+ * add DROP INDEX support to CLI (CASSANDRA-2616)
+ * don't perform HH to client-mode [storageproxy] nodes (CASSANDRA-2668)
 
 
-0.8.0-rc1
+0.8.0-rc1 
  * faster flushes and compaction from fixing excessively pessimistic 
    rebuffering in BRAF (CASSANDRA-2581)
  * fix returning null column values in the python cql driver (CASSANDRA-2593)

Propchange: cassandra/branches/cassandra-0.8.1/contrib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 19 17:43:15 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
-/cassandra/branches/cassandra-0.7/contrib:1026516-1104371,1124780
+/cassandra/branches/cassandra-0.7/contrib:1026516-1125002
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
-/cassandra/branches/cassandra-0.8/contrib:1090935-1104595,1124789
+/cassandra/branches/cassandra-0.8/contrib:1090935-1125013
 /cassandra/tags/cassandra-0.7.0-rc3/contrib:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3/contrib:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/contrib:810145-810987,810994-834239,834349-834350

Modified: cassandra/branches/cassandra-0.8.1/debian/rules
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.1/debian/rules?rev=1125014&r1=1125013&r2=1125014&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.1/debian/rules (original)
+++ cassandra/branches/cassandra-0.8.1/debian/rules Thu May 19 17:43:15 2011
@@ -51,7 +51,7 @@ binary-indep: build install
 	dh_testdir
 	dh_testroot
 	dh_installchangelogs
-	dh_installinit -u'start 50 2 3 4 5 . stop 50 0 1 6'
+	dh_installinit -u'start 50 2 3 4 5 . stop 50 0 1 6 .'
 	dh_installdocs README.txt CHANGES.txt NEWS.txt
 	dh_compress
 	dh_fixperms

Propchange: cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 19 17:43:15 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1104371,1124780
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1125002
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090935-1104595,1124789
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090935-1125013
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/Cassandra.java:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Cassandra.java:810145-834239,834349-834350

Propchange: cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 19 17:43:15 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1104371,1124780
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1125002
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090935-1104595,1124789
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090935-1125013
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/column_t.java:774578-792198
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Column.java:810145-834239,834349-834350

Propchange: cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 19 17:43:15 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1026516-1104371,1124780
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1026516-1125002
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1090935-1104595,1124789
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1090935-1125013
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:810145-834239,834349-834350

Propchange: cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 19 17:43:15 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1026516-1104371,1124780
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1026516-1125002
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1090935-1104595,1124789
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1090935-1125013
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:810145-834239,834349-834350

Propchange: cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 19 17:43:15 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1026516-1104371,1124780
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1026516-1125002
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1090935-1104595,1124789
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1090935-1125013
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/superColumn_t.java:774578-792198
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/SuperColumn.java:810145-834239,834349-834350

Modified: cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cli/Cli.g
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cli/Cli.g?rev=1125014&r1=1125013&r2=1125014&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cli/Cli.g (original)
+++ cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cli/Cli.g Thu May 19
17:43:15 2011
@@ -61,6 +61,7 @@ tokens {
     NODE_TRUNCATE;
     NODE_ASSUME;
     NODE_CONSISTENCY_LEVEL;
+    NODE_DROP_INDEX;
 
     // Internal Nodes.
     NODE_COLUMN_ACCESS;
@@ -160,6 +161,7 @@ statement
     | truncateStatement
     | assumeStatement
     | consistencyLevelStatement
+    | dropIndex
     | -> ^(NODE_NO_OP)
     ;
 
@@ -203,6 +205,8 @@ helpStatement
         -> ^(NODE_HELP NODE_DEL_KEYSPACE)
     | HELP DROP COLUMN FAMILY 
         -> ^(NODE_HELP NODE_DEL_COLUMN_FAMILY)
+    | HELP DROP INDEX
+        -> ^(NODE_HELP NODE_DROP_INDEX)
     | HELP GET 
         -> ^(NODE_HELP NODE_THRIFT_GET)
     | HELP SET 
@@ -337,6 +341,11 @@ delColumnFamily
         -> ^(NODE_DEL_COLUMN_FAMILY columnFamily)
     ;
 
+dropIndex
+    : DROP INDEX ON columnFamily '.' columnName
+        -> ^(NODE_DROP_INDEX columnFamily columnName)
+    ;
+
 showVersion
     : SHOW API_VERSION
         -> ^(NODE_SHOW_VERSION)
@@ -562,6 +571,8 @@ TRUNCATE:    'TRUNCATE';
 ASSUME:      'ASSUME';
 TTL:         'TTL';
 CONSISTENCYLEVEL:   'CONSISTENCYLEVEL';
+INDEX:       'INDEX';
+ON:          'ON';
 
 IP_ADDRESS 
     : IntegerPositiveLiteral '.' IntegerPositiveLiteral '.' IntegerPositiveLiteral '.' IntegerPositiveLiteral

Modified: cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cli/CliClient.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cli/CliClient.java?rev=1125014&r1=1125013&r2=1125014&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cli/CliClient.java (original)
+++ cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cli/CliClient.java Thu
May 19 17:43:15 2011
@@ -269,6 +269,10 @@ public class CliClient
                 case CliParser.NODE_THRIFT_DECR:
                     executeIncr(tree, -1L);
                     break;
+                case CliParser.NODE_DROP_INDEX:
+                    executeDropIndex(tree);
+                    break;
+
                 case CliParser.NODE_NO_OP:
                     // comment lines come here; they are treated as no ops.
                     break;
@@ -1322,6 +1326,58 @@ public class CliClient
         printSliceList(columnFamilyDef, keySlices);
     }
 
+    // DROP INDEX ON <CF>.<COLUMN>
+    private void executeDropIndex(Tree statement)
+    {
+        if (!CliMain.isConnected() || !hasKeySpace())
+            return;
+
+        // getColumnFamily will check if CF exists for us
+        String columnFamily = CliCompiler.getColumnFamily(statement, keyspacesMap.get(keySpace).cf_defs);
+        String rawColumName = statement.getChild(1).getText();
+
+        CfDef cfDef = getCfDef(columnFamily);
+
+        ByteBuffer columnName = columnNameAsBytes(rawColumName, cfDef);
+
+        boolean foundColumn = false;
+
+        for (ColumnDef column : cfDef.getColumn_metadata())
+        {
+            if (column.name.equals(columnName))
+            {
+                foundColumn = true;
+
+                if (column.getIndex_type() == null)
+                    throw new RuntimeException(String.format("Column '%s' does not have an
index.", rawColumName));
+
+                column.setIndex_name(null);
+                column.setIndex_type(null);
+            }
+        }
+
+        if (!foundColumn)
+            throw new RuntimeException(String.format("Column '%s' definition was not found
in ColumnFamily '%s'.",
+                                                     rawColumName,
+                                                     columnFamily));
+
+        try
+        {
+            String mySchemaVersion = thriftClient.system_update_column_family(cfDef);
+            sessionState.out.println(mySchemaVersion);
+            validateSchemaIsSettled(mySchemaVersion);
+            keyspacesMap.put(keySpace, thriftClient.describe_keyspace(keySpace));
+        }
+        catch (InvalidRequestException e)
+        {
+            System.err.println(e.why);
+        }
+        catch (Exception e)
+        {
+            throw new RuntimeException(e.getMessage(), e);
+        }
+    }
+
     // TRUNCATE <columnFamily>
     private void executeTruncate(String columnFamily)
     {

Modified: cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cql/Cql.g
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cql/Cql.g?rev=1125014&r1=1125013&r2=1125014&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cql/Cql.g (original)
+++ cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/cql/Cql.g Thu May 19
17:43:15 2011
@@ -412,7 +412,7 @@ termPair[Map<Term, Term> columns]
 // Note: ranges are inclusive so >= and >, and < and <= all have the same semantics.
 
 relation returns [Relation rel]
     : { Term entity = new Term("KEY", STRING_LITERAL); }
-      (K_KEY | name=term { entity = $name.item; } ) type=('=' | '<' | '<=' | '>='
| '>') t=term
+      (name=term { entity = $name.item; } ) type=('=' | '<' | '<=' | '>=' | '>')
t=term
       { return new Relation(entity, $type.text, $t.item); }
     ;
 

Modified: cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/db/CompactionManager.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/db/CompactionManager.java?rev=1125014&r1=1125013&r2=1125014&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/db/CompactionManager.java
(original)
+++ cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/db/CompactionManager.java
Thu May 19 17:43:15 2011
@@ -1169,31 +1169,6 @@ public class CompactionManager implement
         }
     }
 
-    public void checkAllColumnFamilies() throws IOException
-    {
-        // perform estimates
-        for (final ColumnFamilyStore cfs : ColumnFamilyStore.all())
-        {
-            Runnable runnable = new Runnable()
-            {
-                public void run ()
-                {
-                    logger.debug("Estimating compactions for " + cfs.columnFamily);
-                    final Set<List<SSTableReader>> buckets = getBuckets(convertSSTablesToPairs(cfs.getSSTables()),
50L * 1024L * 1024L);
-                    updateEstimateFor(cfs, buckets);
-                }
-            };
-            executor.submit(runnable);
-        }
-
-        // actually schedule compactions.  done in a second pass so all the estimates occur
before we
-        // bog down the executor in actual compactions.
-        for (ColumnFamilyStore cfs : ColumnFamilyStore.all())
-        {
-            submitMinorIfNeeded(cfs);
-        }
-    }
-
     public int getActiveCompactions()
     {
         return executor.getActiveCount();

Modified: cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/gms/EndpointState.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/gms/EndpointState.java?rev=1125014&r1=1125013&r2=1125014&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/gms/EndpointState.java
(original)
+++ cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/gms/EndpointState.java
Thu May 19 17:43:15 2011
@@ -128,7 +128,7 @@ public class EndpointState
         hasToken = value;
     }
 
-    public boolean getHasToken()
+    public boolean hasToken()
     {
         return hasToken;
     }

Modified: cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/gms/Gossiper.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/gms/Gossiper.java?rev=1125014&r1=1125013&r2=1125014&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/gms/Gossiper.java (original)
+++ cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/gms/Gossiper.java Thu
May 19 17:43:15 2011
@@ -452,7 +452,7 @@ public class Gossiper implements IFailur
 
                 // check if this is a fat client. fat clients are removed automatically from
                 // gosip after FatClientTimeout
-                if (!epState.getHasToken() && !epState.isAlive() && (duration
> FatClientTimeout))
+                if (!epState.hasToken() && !epState.isAlive() && (duration
> FatClientTimeout))
                 {
                     if (StorageService.instance.getTokenMetadata().isMember(endpoint))
                         epState.setHasToken(true);
@@ -475,7 +475,7 @@ public class Gossiper implements IFailur
         
         if (!justRemovedEndpoints.isEmpty())
         {
-            for (Map.Entry<InetAddress, Long> entry : justRemovedEndpoints.entrySet())
+            for (Entry<InetAddress, Long> entry : justRemovedEndpoints.entrySet())
             {
                 if ((now - entry.getValue()) > QUARANTINE_DELAY)
                 {

Modified: cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/service/StorageService.java?rev=1125014&r1=1125013&r2=1125014&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/service/StorageService.java
(original)
+++ cassandra/branches/cassandra-0.8.1/src/java/org/apache/cassandra/service/StorageService.java
Thu May 19 17:43:15 2011
@@ -1184,7 +1184,7 @@ public class StorageService implements I
 
     public void onAlive(InetAddress endpoint, EndpointState state)
     {
-        if (!isClientMode)
+        if (!isClientMode && state.hasToken())
             deliverHints(endpoint);
     }
 

Modified: cassandra/branches/cassandra-0.8.1/src/resources/org/apache/cassandra/cli/CliHelp.yaml
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.1/src/resources/org/apache/cassandra/cli/CliHelp.yaml?rev=1125014&r1=1125013&r2=1125014&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.1/src/resources/org/apache/cassandra/cli/CliHelp.yaml
(original)
+++ cassandra/branches/cassandra-0.8.1/src/resources/org/apache/cassandra/cli/CliHelp.yaml
Thu May 19 17:43:15 2011
@@ -44,6 +44,7 @@ help: |
     describe keyspace       Describe a keyspace and it's column families.
     drop column family      Remove a column family and it's data.
     drop keyspace           Remove a keyspace and it's data.
+    drop index              Remove an existing index from specific column.
     get                     Get rows and columns.
     incr                    Increments a counter column.
     list                    List rows in a column family.
@@ -827,6 +828,18 @@ commands:
 
         Example:
         drop column family Standard2;
+    - name: NODE_DROP_INDEX
+      help: |
+        drop index on <cf>.<column>;
+
+        Drops index on specified column of the column family.
+
+        Required Parameters:
+          - cf: Name of the column family.
+          - column: Name of the column to delete index on.
+
+        Example:
+        drop index on Users.name;
     - name: NODE_THRIFT_GET
       help: |
         get <cf>['<key>'];

Modified: cassandra/branches/cassandra-0.8.1/test/unit/org/apache/cassandra/cli/CliTest.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8.1/test/unit/org/apache/cassandra/cli/CliTest.java?rev=1125014&r1=1125013&r2=1125014&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8.1/test/unit/org/apache/cassandra/cli/CliTest.java (original)
+++ cassandra/branches/cassandra-0.8.1/test/unit/org/apache/cassandra/cli/CliTest.java Thu
May 19 17:43:15 2011
@@ -110,6 +110,7 @@ public class CliTest extends CleanupHelp
         "get Counter1['hello']['cassandra'];",
         "get Counter1['hello'];",
         "truncate CF1;",
+        "drop index on CF1.world2;",
         "update keyspace TestKeySpace with placement_strategy='org.apache.cassandra.locator.LocalStrategy';",
         "update keyspace TestKeySpace with strategy_options=[{DC1:3, DC2:4, DC5:1}];",
         "assume CF1 comparator as utf8;",



Mime
View raw message