cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1178600 - in /cassandra/trunk: ./ contrib/ debian/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/config/ src/java/org/apache/cassandra/cql/ src/java/org/apache/cassandra/db/ src/java/org/apache/cassan...
Date Mon, 03 Oct 2011 21:53:29 GMT
Author: jbellis
Date: Mon Oct  3 21:53:28 2011
New Revision: 1178600

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

Modified:
    cassandra/trunk/   (props changed)
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/contrib/   (props changed)
    cassandra/trunk/debian/cassandra.postinst
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java 
 (props changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java   (props
changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
  (props changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
  (props changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
  (props changed)
    cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java
    cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
    cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java
    cassandra/trunk/src/java/org/apache/cassandra/db/SystemTable.java
    cassandra/trunk/src/java/org/apache/cassandra/gms/FailureDetector.java
    cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java
    cassandra/trunk/src/java/org/apache/cassandra/gms/IFailureDetector.java
    cassandra/trunk/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
    cassandra/trunk/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
    cassandra/trunk/src/java/org/apache/cassandra/locator/SimpleSeedProvider.java
    cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java
    cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
    cassandra/trunk/test/unit/org/apache/cassandra/dht/BootStrapperTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/io/compress/CompressedRandomAccessReaderTest.java

Propchange: cassandra/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  3 21:53:28 2011
@@ -1,11 +1,11 @@
 /cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7:1026516-1170333,1172024
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
-/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1177149,1177781,1177810,1178297,1178325
+/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1178554
 /cassandra/branches/cassandra-0.8.0:1125021-1130369
 /cassandra/branches/cassandra-0.8.1:1101014-1125018
-/cassandra/branches/cassandra-1.0:1167085-1178460
-/cassandra/branches/cassandra-1.0.0:1167104-1167229,1167232-1178459
+/cassandra/branches/cassandra-1.0:1167085-1178599
+/cassandra/branches/cassandra-1.0.0:1167104-1167229,1167232-1178594
 /cassandra/tags/cassandra-0.7.0-rc3:1051699-1053689
 /cassandra/tags/cassandra-0.8.0-rc1:1102511-1125020
 /incubator/cassandra/branches/cassandra-0.3:774578-796573

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Mon Oct  3 21:53:28 2011
@@ -2,6 +2,7 @@
  * describe_ring should include datacenter/topology information (CASSANDRA-2882)
  * Thrift sockets are not properly buffered (CASSANDRA-3261)
  * performance improvement for bytebufferutil compare function (CASSANDRA-3286)
+ * add system.versions ColumnFamily (CASSANDRA-3140)
 
 
 1.0.0-final
@@ -9,6 +10,13 @@
  * Force flush of status table when removing/updating token (CASSANDRA-3243)
  * fix bug preventing obsolete commitlog segments from being removed
    (CASSANDRA-3269)
+ * Evict gossip state immediately when a token is taken over by a new IP (CASSANDRA-3259)
+ * tolerate whitespace in seed CDL (CASSANDRA-3263)
+ * Fix bug where the failure detector can take too long to mark a host
+   down (CASSANDRA-3273)
+ * (Hadoop) allow wrapping ranges in queries (CASSANDRA-3137)
+ * (Hadoop) check all interfaces for a match with split location
+   before falling back to random replica (CASSANDRA-3211)
 
 
 1.0.0-rc2
@@ -29,6 +37,7 @@
  * ignore any CF ids sent by client for adding CF/KS (CASSANDRA-3288)
  * remove obsolete hints on first startup (CASSANDRA-3291)
  * use correct ISortedColumns for time-optimized reads (CASSANDRA-3289)
+ * Evict gossip state immediately when a token is taken over by a new IP (CASSANDRA-3259)
 
 
 1.0.0-rc1

Propchange: cassandra/trunk/contrib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  3 21:53:28 2011
@@ -1,11 +1,11 @@
 /cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
 /cassandra/branches/cassandra-0.7/contrib:1026516-1170333,1172024
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
-/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1177149,1177781,1177810,1178297,1178325
+/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1178554
 /cassandra/branches/cassandra-0.8.0/contrib:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/contrib:1101014-1125018
-/cassandra/branches/cassandra-1.0/contrib:1167085-1178460
-/cassandra/branches/cassandra-1.0.0/contrib:1167104-1167229,1167232-1178459
+/cassandra/branches/cassandra-1.0/contrib:1167085-1178599
+/cassandra/branches/cassandra-1.0.0/contrib:1167104-1167229,1167232-1178594
 /cassandra/tags/cassandra-0.7.0-rc3/contrib:1051699-1053689
 /cassandra/tags/cassandra-0.8.0-rc1/contrib:1102511-1125020
 /incubator/cassandra/branches/cassandra-0.3/contrib:774578-796573

Modified: cassandra/trunk/debian/cassandra.postinst
URL: http://svn.apache.org/viewvc/cassandra/trunk/debian/cassandra.postinst?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/debian/cassandra.postinst (original)
+++ cassandra/trunk/debian/cassandra.postinst Mon Oct  3 21:53:28 2011
@@ -34,7 +34,7 @@ case "$1" in
                 cassandra
         fi
 
-        if [ -n "$2" ] && dpkg --compare-versions "$2" le 0.6.4-2; then
+        if [ -z "$2" ]; then
             chown -R cassandra: /var/lib/cassandra
             chown -R cassandra: /var/log/cassandra
         fi

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  3 21:53:28 2011
@@ -1,11 +1,11 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1170333,1172024
 /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:1090934-1125013,1125019-1177149,1177781,1177810,1178297,1178325
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125019-1178554
 /cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1101014-1125018
-/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1167085-1178460
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1167104-1167229,1167232-1178459
+/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1167085-1178599
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1167104-1167229,1167232-1178594
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1051699-1053689
 /cassandra/tags/cassandra-0.8.0-rc1/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1102511-1125020
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/Cassandra.java:774578-796573

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  3 21:53:28 2011
@@ -1,11 +1,11 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1170333,1172024
 /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:1090934-1125013,1125019-1177149,1177781,1177810,1178297,1178325
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090934-1125013,1125019-1178554
 /cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1101014-1125018
-/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1167085-1178460
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1167104-1167229,1167232-1178459
+/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1167085-1178599
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1167104-1167229,1167232-1178594
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1051699-1053689
 /cassandra/tags/cassandra-0.8.0-rc1/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1102511-1125020
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/column_t.java:774578-792198

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  3 21:53:28 2011
@@ -1,11 +1,11 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1026516-1170333,1172024
 /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:1090934-1125013,1125019-1177149,1177781,1177810,1178297,1178325
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1090934-1125013,1125019-1178554
 /cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1101014-1125018
-/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1167085-1178460
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1167104-1167229,1167232-1178459
+/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1167085-1178599
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1167104-1167229,1167232-1178594
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1051699-1053689
 /cassandra/tags/cassandra-0.8.0-rc1/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1102511-1125020
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:774578-796573

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  3 21:53:28 2011
@@ -1,11 +1,11 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1026516-1170333,1172024
 /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:1090934-1125013,1125019-1177149,1177781,1177810,1178297,1178325
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1090934-1125013,1125019-1178554
 /cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1101014-1125018
-/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1167085-1178460
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1167104-1167229,1167232-1178459
+/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1167085-1178599
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1167104-1167229,1167232-1178594
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1051699-1053689
 /cassandra/tags/cassandra-0.8.0-rc1/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1102511-1125020
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:774578-796573

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  3 21:53:28 2011
@@ -1,11 +1,11 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1026516-1170333,1172024
 /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:1090934-1125013,1125019-1177149,1177781,1177810,1178297,1178325
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1090934-1125013,1125019-1178554
 /cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1101014-1125018
-/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1167085-1178460
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1167104-1167229,1167232-1178459
+/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1167085-1178599
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1167104-1167229,1167232-1178594
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1051699-1053689
 /cassandra/tags/cassandra-0.8.0-rc1/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1102511-1125020
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/superColumn_t.java:774578-792198

Modified: cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java Mon Oct  3 21:53:28
2011
@@ -77,6 +77,25 @@ public final class CFMetaData
     public static final CFMetaData SchemaCf = newSystemMetadata(Migration.SCHEMA_CF, 3, "current
state of the schema", UTF8Type.instance, null);
     public static final CFMetaData IndexCf = newSystemMetadata(SystemTable.INDEX_CF, 5, "indexes
that have been completed", UTF8Type.instance, null);
     public static final CFMetaData NodeIdCf = newSystemMetadata(SystemTable.NODE_ID_CF, 6,
"nodeId and their metadata", TimeUUIDType.instance, null);
+    public static final CFMetaData VersionCf = newSystemMetadata(SystemTable.VERSION_CF,
7, "server version information", UTF8Type.instance, null);
+    static
+    {
+        try
+        {
+            VersionCf.keyAlias(ByteBufferUtil.bytes("component"))
+                     .keyValidator(UTF8Type.instance)
+                     .columnMetadata(Collections.singletonMap(ByteBufferUtil.bytes("version"),
+                                                              new ColumnDefinition(ByteBufferUtil.bytes("version"),
+                                                                                   UTF8Type.instance,
+                                                                                   null,
+                                                                                   null,
+                                                                                   null)));
+        }
+        catch (ConfigurationException e)
+        {
+            throw new RuntimeException(e);
+        }
+    }
 
     private static IRowCacheProvider initDefaultRowCacheProvider()
     {

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=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java Mon Oct 
3 21:53:28 2011
@@ -34,6 +34,7 @@ import org.apache.cassandra.auth.IAuthor
 import org.apache.cassandra.config.Config.RequestSchedulerId;
 import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.DefsTable;
+import org.apache.cassandra.db.SystemTable;
 import org.apache.cassandra.db.Table;
 import org.apache.cassandra.db.migration.Migration;
 import org.apache.cassandra.dht.IPartitioner;
@@ -402,16 +403,18 @@ public class DatabaseDescriptor
                                                    CFMetaData.MigrationsCf,
                                                    CFMetaData.SchemaCf,
                                                    CFMetaData.IndexCf,
-                                                   CFMetaData.NodeIdCf);
+                                                   CFMetaData.NodeIdCf,
+                                                   CFMetaData.VersionCf);
             Schema.instance.load(CFMetaData.StatusCf);
             Schema.instance.load(CFMetaData.HintsCf);
             Schema.instance.load(CFMetaData.MigrationsCf);
             Schema.instance.load(CFMetaData.SchemaCf);
             Schema.instance.load(CFMetaData.IndexCf);
             Schema.instance.load(CFMetaData.NodeIdCf);
+            Schema.instance.load(CFMetaData.VersionCf);
 
             Schema.instance.addSystemTable(systemMeta);
-            
+
             /* Load the seeds for node contact points */
             if (conf.seed_provider == null)
             {

Modified: cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java Mon Oct  3 21:53:28
2011
@@ -64,6 +64,8 @@ import static org.apache.cassandra.thrif
 
 public class QueryProcessor
 {
+    public static final String CQL_VERSION = "2.0.0";
+
     private static final Logger logger = LoggerFactory.getLogger(QueryProcessor.class);
 
     private static final long timeLimitForSchemaAgreement = 10 * 1000;

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/SystemTable.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/SystemTable.java?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/SystemTable.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/SystemTable.java Mon Oct  3 21:53:28
2011
@@ -35,12 +35,14 @@ import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.cql.QueryProcessor;
 import org.apache.cassandra.db.filter.QueryFilter;
 import org.apache.cassandra.db.filter.QueryPath;
 import org.apache.cassandra.db.marshal.BytesType;
 import org.apache.cassandra.dht.IPartitioner;
 import org.apache.cassandra.dht.Token;
 import org.apache.cassandra.service.StorageService;
+import org.apache.cassandra.thrift.Constants;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.NodeId;
@@ -51,6 +53,7 @@ public class SystemTable
     public static final String STATUS_CF = "LocationInfo"; // keep the old CF string for
backwards-compatibility
     public static final String INDEX_CF = "IndexInfo";
     public static final String NODE_ID_CF = "NodeIdInfo";
+    public static final String VERSION_CF = "Versions";
     private static final ByteBuffer LOCATION_KEY = ByteBufferUtil.bytes("L");
     private static final ByteBuffer RING_KEY = ByteBufferUtil.bytes("Ring");
     private static final ByteBuffer BOOTSTRAP_KEY = ByteBufferUtil.bytes("Bootstrap");
@@ -68,8 +71,38 @@ public class SystemTable
         return StorageService.getPartitioner().decorateKey(key);
     }
     
-    /* if hints become incompatible across versions of cassandra, that logic (and associated
purging) is managed here. */
-    public static void purgeIncompatibleHints() throws IOException
+    public static void finishStartup() throws IOException
+    {
+        setupVersion();
+        purgeIncompatibleHints();
+    }
+
+    private static void setupVersion() throws IOException
+    {
+        RowMutation rm;
+        ColumnFamily cf;
+
+        rm = new RowMutation(Table.SYSTEM_TABLE, ByteBufferUtil.bytes("build"));
+        cf = ColumnFamily.create(Table.SYSTEM_TABLE, VERSION_CF);
+        cf.addColumn(new Column(ByteBufferUtil.bytes("version"), ByteBufferUtil.bytes(FBUtilities.getReleaseVersionString())));
+        rm.add(cf);
+        rm.apply();
+
+        rm = new RowMutation(Table.SYSTEM_TABLE, ByteBufferUtil.bytes("cql"));
+        cf = ColumnFamily.create(Table.SYSTEM_TABLE, VERSION_CF);
+        cf.addColumn(new Column(ByteBufferUtil.bytes("version"), ByteBufferUtil.bytes(QueryProcessor.CQL_VERSION)));
+        rm.add(cf);
+        rm.apply();
+
+        rm = new RowMutation(Table.SYSTEM_TABLE, ByteBufferUtil.bytes("thrift"));
+        cf = ColumnFamily.create(Table.SYSTEM_TABLE, VERSION_CF);
+        cf.addColumn(new Column(ByteBufferUtil.bytes("version"), ByteBufferUtil.bytes(Constants.VERSION)));
+        rm.add(cf);
+        rm.apply();
+    }
+
+    /** if hints become incompatible across versions of cassandra, that logic (and associated
purging) is managed here. */
+    private static void purgeIncompatibleHints() throws IOException
     {
         ByteBuffer upgradeMarker = ByteBufferUtil.bytes("Pre-1.0 hints purged");
         Table table = Table.open(Table.SYSTEM_TABLE);

Modified: cassandra/trunk/src/java/org/apache/cassandra/gms/FailureDetector.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/gms/FailureDetector.java?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/gms/FailureDetector.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/gms/FailureDetector.java Mon Oct  3 21:53:28
2011
@@ -149,7 +149,14 @@ public class FailureDetector implements 
             logger_.error("unknown endpoint " + ep);
         return epState != null && epState.isAlive();
     }
-    
+
+    public void clear(InetAddress ep)
+    {
+        ArrivalWindow heartbeatWindow = arrivalSamples_.get(ep);
+        if (heartbeatWindow != null)
+            heartbeatWindow.clear();
+    }
+
     public void report(InetAddress ep)
     {
         if (logger_.isTraceEnabled())
@@ -177,7 +184,9 @@ public class FailureDetector implements 
             logger_.trace("PHI for " + ep + " : " + phi);
         
         if ( phi > phiConvictThreshold_ )
-        {     
+        {
+            logger_.trace("notifying listeners that {} is down", ep);
+            logger_.trace("intervals: {} mean: {}", hbWnd, hbWnd.mean());
             for ( IFailureDetectionEventListener listener : fdEvntListeners_ )
             {
                 listener.convict(ep, phi);
@@ -234,6 +243,11 @@ class ArrivalWindow
     // change.
     private final double PHI_FACTOR = 1.0 / Math.log(10.0);
 
+    // in the event of a long partition, never record an interval longer than the rpc timeout,
+    // since if a host is regularly experiencing connectivity problems lasting this long
we'd
+    // rather mark it down quickly instead of adapting
+    private final double MAX_INTERVAL_IN_MS = DatabaseDescriptor.getRpcTimeout();
+
     ArrivalWindow(int size)
     {
         arrivalIntervals_ = new BoundedStatsDeque(size);
@@ -244,14 +258,17 @@ class ArrivalWindow
         double interArrivalTime;
         if ( tLast_ > 0L )
         {                        
-            interArrivalTime = (value - tLast_);            
+            interArrivalTime = (value - tLast_);
         }
         else
         {
             interArrivalTime = Gossiper.intervalInMillis / 2;
         }
-        tLast_ = value;            
-        arrivalIntervals_.add(interArrivalTime);        
+        if (interArrivalTime <= MAX_INTERVAL_IN_MS)
+            arrivalIntervals_.add(interArrivalTime);
+        else
+            logger_.debug("Ignoring interval time of {}", interArrivalTime);
+        tLast_ = value;
     }
     
     synchronized double sum()

Modified: cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java Mon Oct  3 21:53:28 2011
@@ -321,6 +321,17 @@ public class Gossiper implements IFailur
     }
 
     /**
+     * Remove the Endpoint and evict immediately, to avoid gossiping about this node.
+     * This should only be called when a token is taken over by a new IP address.
+     * @param endpoint The endpoint that has been replaced
+     */
+    public void replacedEndpoint(InetAddress endpoint)
+    {
+        removeEndpoint(endpoint);
+        evictFromMembership(endpoint);
+    }
+
+    /**
      * The gossip digest is built based on randomization
      * rather than just looping through the collection of live endpoints.
      *
@@ -674,6 +685,13 @@ public class Gossiper implements IFailur
             if ( remoteGeneration > localGeneration )
             {
                 localEndpointState.updateTimestamp();
+                // this node was dead and the generation changed, this indicates a reboot,
or possibly a takeover
+                // we will clean the fd intervals for it and relearn them
+                if (!localEndpointState.isAlive())
+                {
+                    logger.debug("Clearing interval times for {} due to generation change",
endpoint);
+                    fd.clear(endpoint);
+                }
                 fd.report(endpoint);
                 return;
             }
@@ -685,6 +703,7 @@ public class Gossiper implements IFailur
                 if ( remoteVersion > localVersion )
                 {
                     localEndpointState.updateTimestamp();
+                    // just a version change, report to the fd
                     fd.report(endpoint);
                 }
             }

Modified: cassandra/trunk/src/java/org/apache/cassandra/gms/IFailureDetector.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/gms/IFailureDetector.java?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/gms/IFailureDetector.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/gms/IFailureDetector.java Mon Oct  3 21:53:28
2011
@@ -37,7 +37,13 @@ public interface IFailureDetector
      * @return true if UP and false if DOWN.
      */
     public boolean isAlive(InetAddress ep);
-    
+
+    /**
+     * Clear any existing interval timings for this endpoint
+     * @param ep
+     */
+    public void clear(InetAddress ep);
+
     /**
      * This method is invoked by any entity wanting to interrogate the status of an endpoint.

      * In our case it would be the Gossiper. The Failure Detector will then calculate Phi
and

Modified: cassandra/trunk/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/hadoop/ColumnFamilyInputFormat.java Mon
Oct  3 21:53:28 2011
@@ -134,13 +134,13 @@ public class ColumnFamilyInputFormat ext
 
                     if (dhtRange.intersects(jobRange))
                     {
-                        Set<Range> intersections = dhtRange.intersectionWith(jobRange);
-                        assert intersections.size() == 1 : "wrapping ranges not yet supported";
-                        Range intersection = intersections.iterator().next();
-                        range.start_token = partitioner.getTokenFactory().toString(intersection.left);
-                        range.end_token = partitioner.getTokenFactory().toString(intersection.right);
-                        // for each range, pick a live owner and ask it to compute bite-sized
splits
-                        splitfutures.add(executor.submit(new SplitCallable(range, conf)));
+                        for (Range intersection: dhtRange.intersectionWith(jobRange))
+                        {
+                            range.start_token = partitioner.getTokenFactory().toString(intersection.left);
+                            range.end_token = partitioner.getTokenFactory().toString(intersection.right);
+                            // for each range, pick a live owner and ask it to compute bite-sized
splits
+                            splitfutures.add(executor.submit(new SplitCallable(range, conf)));
+                        }
                     }
                 }
             }

Modified: cassandra/trunk/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java Mon
Oct  3 21:53:28 2011
@@ -23,6 +23,8 @@ package org.apache.cassandra.hadoop;
 
 import java.io.IOException;
 import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.net.SocketException;
 import java.net.UnknownHostException;
 import java.nio.ByteBuffer;
 import java.util.*;
@@ -31,14 +33,11 @@ import com.google.common.collect.Abstrac
 
 import org.apache.cassandra.auth.SimpleAuthenticator;
 import org.apache.cassandra.config.ConfigurationException;
-import org.apache.cassandra.db.*;
+import org.apache.cassandra.db.IColumn;
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.db.marshal.TypeParser;
 import org.apache.cassandra.dht.IPartitioner;
 import org.apache.cassandra.thrift.*;
-import org.apache.cassandra.thrift.Column;
-import org.apache.cassandra.thrift.CounterColumn;
-import org.apache.cassandra.thrift.SuperColumn;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.Pair;
@@ -147,15 +146,18 @@ public class ColumnFamilyRecordReader ex
     // not necessarily on Cassandra machines, too.  This should be adequate for single-DC
clusters, at least.
     private String getLocation()
     {
-        InetAddress[] localAddresses;
+        ArrayList<InetAddress> localAddresses = new ArrayList<InetAddress>();
         try
         {
-            localAddresses = InetAddress.getAllByName(InetAddress.getLocalHost().getHostAddress());
+            Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces();
+            while (nets.hasMoreElements())
+                localAddresses.addAll(Collections.list(nets.nextElement().getInetAddresses()));
         }
-        catch (UnknownHostException e)
+        catch (SocketException e)
         {
             throw new AssertionError(e);
         }
+
         for (InetAddress address : localAddresses)
         {
             for (String location : split.getLocations())

Modified: cassandra/trunk/src/java/org/apache/cassandra/locator/SimpleSeedProvider.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/locator/SimpleSeedProvider.java?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/locator/SimpleSeedProvider.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/locator/SimpleSeedProvider.java Mon Oct
 3 21:53:28 2011
@@ -43,7 +43,7 @@ public class SimpleSeedProvider implemen
         {
             try
             {
-                seeds.add(InetAddress.getByName(host));
+                seeds.add(InetAddress.getByName(host.trim()));
             }
             catch (UnknownHostException ex)
             {

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java Mon
Oct  3 21:53:28 2011
@@ -206,7 +206,7 @@ public abstract class AbstractCassandraD
             MigrationManager.applyMigrations(currentMigration, lastMigration);
         }
         
-        SystemTable.purgeIncompatibleHints();
+        SystemTable.finishStartup();
 
         // start server internals
         StorageService.instance.registerDaemon(this);

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java Mon Oct  3 21:53:28
2011
@@ -492,6 +492,7 @@ public class StorageService implements I
                 && !SystemTable.isBootstrapped())
             logger_.info("This node will not auto bootstrap because it is configured to be
a seed node.");
 
+        InetAddress current = null;
         // first startup is only chance to bootstrap
         Token<?> token;
         if (DatabaseDescriptor.isAutoBootstrap()
@@ -535,7 +536,7 @@ public class StorageService implements I
                 }
                 token = StorageService.getPartitioner().getTokenFactory().fromString(DatabaseDescriptor.getReplaceToken());
                 // check for operator errors...
-                InetAddress current = tokenMetadata_.getEndpoint(token);
+                current = tokenMetadata_.getEndpoint(token);
                 if (null != current && Gossiper.instance.getEndpointStateForEndpoint(current).getUpdateTimestamp()
> (System.currentTimeMillis() - delay))
                     throw new UnsupportedOperationException("Cannnot replace a token for
a Live node... ");
                 setMode("Joining: Replacing a node with token: " + token, true);
@@ -570,6 +571,9 @@ public class StorageService implements I
         // start participating in the ring.
         SystemTable.setBootstrapped(true);
         setToken(token);
+        // remove the existing info about the replaced node.
+        if (current != null)
+            Gossiper.instance.replacedEndpoint(current);
         logger_.info("Bootstrap/Replace/Move completed! Now serving reads.");
         assert tokenMetadata_.sortedTokens().size() > 0;
     }

Modified: cassandra/trunk/test/unit/org/apache/cassandra/dht/BootStrapperTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/dht/BootStrapperTest.java?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/dht/BootStrapperTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/dht/BootStrapperTest.java Mon Oct  3 21:53:28
2011
@@ -187,6 +187,7 @@ public class BootStrapperTest extends Cl
             public void registerFailureDetectionEventListener(IFailureDetectionEventListener
listener) { throw new UnsupportedOperationException(); }
             public void unregisterFailureDetectionEventListener(IFailureDetectionEventListener
listener) { throw new UnsupportedOperationException(); }
             public void remove(InetAddress ep) { throw new UnsupportedOperationException();
}
+            public void clear(InetAddress ep) { throw new UnsupportedOperationException();
}
         };
         Multimap<InetAddress, Range> temp = BootStrapper.getWorkMap(res, mockFailureDetector);
         // there isn't any point in testing the size of these collections for any specific
size.  When a random partitioner

Modified: cassandra/trunk/test/unit/org/apache/cassandra/io/compress/CompressedRandomAccessReaderTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/io/compress/CompressedRandomAccessReaderTest.java?rev=1178600&r1=1178599&r2=1178600&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/io/compress/CompressedRandomAccessReaderTest.java
(original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/io/compress/CompressedRandomAccessReaderTest.java
Mon Oct  3 21:53:28 2011
@@ -78,7 +78,7 @@ public class CompressedRandomAccessReade
                 ? new CompressedRandomAccessReader(filename, new CompressionMetadata(filename
+ ".metadata", f.length()), false)
                 : new RandomAccessReader(f, CompressionParameters.DEFAULT_CHUNK_LENGTH, false);
             String expected = "The quick brown fox jumps over the lazy dog";
-            assert reader.length() == expected.length();
+            assertEquals(expected.length(), reader.length());
             byte[] b = new byte[expected.length()];
             reader.readFully(b);
             assert new String(b).equals(expected) : "Expecting '" + expected + "', got '"
+ new String(b) + "'";



Mime
View raw message