cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1172705 - in /cassandra/trunk: ./ bin/ conf/ contrib/ doc/cql/ interface/thrift/gen-java/org/apache/cassandra/thrift/ lib/ src/java/org/apache/cassandra/config/ src/java/org/apache/cassandra/cql/ src/java/org/apache/cassandra/db/ src/java/...
Date Mon, 19 Sep 2011 17:03:45 GMT
Author: jbellis
Date: Mon Sep 19 17:03:44 2011
New Revision: 1172705

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

Removed:
    cassandra/trunk/lib/jamm-0.2.4.jar
Modified:
    cassandra/trunk/   (props changed)
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/NEWS.txt
    cassandra/trunk/bin/cassandra.bat
    cassandra/trunk/conf/cassandra.yaml
    cassandra/trunk/contrib/   (props changed)
    cassandra/trunk/doc/cql/CQL.textile
    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/Config.java
    cassandra/trunk/src/java/org/apache/cassandra/cql/AbstractModification.java
    cassandra/trunk/src/java/org/apache/cassandra/cql/DeleteStatement.java
    cassandra/trunk/src/java/org/apache/cassandra/cql/UpdateStatement.java
    cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
    cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java
    cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java
    cassandra/trunk/src/java/org/apache/cassandra/service/ClientState.java
    cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java

Propchange: cassandra/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 19 17:03:44 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-1171096,1172026,1172591
+/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1171737,1172026,1172591
 /cassandra/branches/cassandra-0.8.0:1125021-1130369
 /cassandra/branches/cassandra-0.8.1:1101014-1125018
-/cassandra/branches/cassandra-1.0:1167085-1171099,1172598,1172665
-/cassandra/branches/cassandra-1.0.0:1167104-1167229,1167232-1171098,1172027,1172597,1172663
+/cassandra/branches/cassandra-1.0:1167085-1172704
+/cassandra/branches/cassandra-1.0.0:1167104-1167229,1167232-1172702
 /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=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Mon Sep 19 17:03:44 2011
@@ -3,10 +3,17 @@
 
 
 1.0.0-rc1
+ * Update CQL to generate microsecond timestamps by default (CASSANDRA-3227)
  * Fix counting CFMetadata towards Memtable liveRatio (CASSANDRA-3023)
+ * Kill server on wrapped OOME such as from FileChannel.map (CASSANDRA-3201)
+ * remove unnecessary copy when adding to row cache (CASSANDRA-3223)
  * Log message when a full repair operation completes (CASSANDRA-3207)
  * Fix streamOutSession keeping sstables references forever if the remote end
    dies (CASSANDRA-3216)
+ * Remove dynamic_snitch boolean from example configuration (defaulting to 
+   true) and set default badness threshold to 0.1 (CASSANDRA-3229)
+ * Base choice of random or "balanced" token on bootstrap on whether
+   schema definitions were found (CASSANDRA-3219)
 
 
 1.0.0-beta1
@@ -87,6 +94,7 @@
    (CASSANDRA-3181)
  * Reduce copies done for intra-host messages (CASSANDRA-1788, 3144)
  * support of compaction strategy option for stress.java (CASSANDRA-3204)
+ * make memtable throughput and column count thresholds no-ops (CASSANDRA-2449)
 
 
 0.8.6
@@ -109,9 +117,12 @@
  * Fix using read_repair_chance instead of merge_shard_change (CASSANDRA-3202)
  * Avoid streaming data to nodes that already have it, on move as well as
    decommission (CASSANDRA-3041)
- * Fix divide by zero error in GCInspector
+ * Fix divide by zero error in GCInspector (CASSANDRA-3164)
  * allow quoting of the ColumnFamily name in CLI `create column family`
    statement (CASSANDRA-3195)
+ * Fix rolling upgrade from 0.7 to 0.8 problem (CASANDRA-3166)
+ * Accomodate missing encryption_options in IncomingTcpConnection.stream
+   (CASSANDRA-3212)
 
 
 0.8.5

Modified: cassandra/trunk/NEWS.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/NEWS.txt?rev=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/NEWS.txt (original)
+++ cassandra/trunk/NEWS.txt Mon Sep 19 17:03:44 2011
@@ -3,6 +3,13 @@
 
 Upgrading
 ---------
+    - CQL inserts/updates now generate microsecond resolution timestamps
+      by default, instead of millisecond. THIS MEANS A ROLLING UPGRADE COULD
+      MIX milliseconds and microseconds, with clients talking to servers
+      generating milliseconds unable to overwrite the larger microsecond
+      timestamps. If this is important for your application, you can either
+      perform a non-rolling upgrade to 1.0, or update your application first
+      to use explicit timestamps with the "USING timestamp=X" syntax.
     - the BinaryMemtable bulk-load interface has been removed. Use the
       sstableloader tool instead.
     - the compaction_thread_priority setting has been removed from 

Modified: cassandra/trunk/bin/cassandra.bat
URL: http://svn.apache.org/viewvc/cassandra/trunk/bin/cassandra.bat?rev=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/bin/cassandra.bat (original)
+++ cassandra/trunk/bin/cassandra.bat Mon Sep 19 17:03:44 2011
@@ -26,7 +26,7 @@ if NOT DEFINED JAVA_HOME goto err
 
 REM ***** JAVA options *****
 set JAVA_OPTS=-ea^
- -javaagent:"%CASSANDRA_HOME%\lib\jamm-0.2.2.jar"^
+ -javaagent:"%CASSANDRA_HOME%\lib\jamm-0.2.5.jar"^
  -Xms1G^
  -Xmx1G^
  -XX:+HeapDumpOnOutOfMemoryError^

Modified: cassandra/trunk/conf/cassandra.yaml
URL: http://svn.apache.org/viewvc/cassandra/trunk/conf/cassandra.yaml?rev=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/conf/cassandra.yaml (original)
+++ cassandra/trunk/conf/cassandra.yaml Mon Sep 19 17:03:44 2011
@@ -331,11 +331,6 @@ rpc_timeout_in_ms: 10000
 #    explicitly configured in cassandra-topology.properties.
 endpoint_snitch: org.apache.cassandra.locator.SimpleSnitch
 
-# dynamic_snitch -- This boolean controls whether the above snitch is
-# wrapped with a dynamic snitch, which will monitor read latencies
-# and avoid reading from hosts that have slowed (due to compaction,
-# for instance)
-dynamic_snitch: true
 # controls how often to perform the more expensive part of host score
 # calculation
 dynamic_snitch_update_interval_in_ms: 100 
@@ -349,7 +344,7 @@ dynamic_snitch_reset_interval_in_ms: 600
 # expressed as a double which represents a percentage.  Thus, a value of
 # 0.2 means Cassandra would continue to prefer the static snitch values
 # until the pinned host was 20% worse than the fastest.
-dynamic_snitch_badness_threshold: 0.0
+dynamic_snitch_badness_threshold: 0.1
 
 # request_scheduler -- Set this to a class that implements
 # RequestScheduler, which will schedule incoming client requests

Propchange: cassandra/trunk/contrib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 19 17:03:44 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-1171096,1172026,1172591
+/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1171737,1172026,1172591
 /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-1171099,1172598,1172665
-/cassandra/branches/cassandra-1.0.0/contrib:1167104-1167229,1167232-1171098,1172027,1172597,1172663
+/cassandra/branches/cassandra-1.0/contrib:1167085-1172704
+/cassandra/branches/cassandra-1.0.0/contrib:1167104-1167229,1167232-1172702
 /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/doc/cql/CQL.textile
URL: http://svn.apache.org/viewvc/cassandra/trunk/doc/cql/CQL.textile?rev=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/doc/cql/CQL.textile (original)
+++ cassandra/trunk/doc/cql/CQL.textile Mon Sep 19 17:03:44 2011
@@ -96,6 +96,8 @@ INSERT INTO <COLUMN FAMILY> (<KEY>, <col
 
 An @INSERT@ is used to write one or more columns to a record in a Cassandra column family.
No results are returned. 
 
+If timestamp is unspecified, the server will generate a timestamp based on microseconds since
1970.
+
 Unlike SQL, the semantics of @INSERT@ and @UPDATE@ are identical, in either case a record
is created if none existed before, and updated when it does.  For information on modifiers
and types, see the "@UPDATE@":#update section below.
 
 h2(#update). UPDATE

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 19 17:03:44 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-1171096,1172026,1172591
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125019-1171737,1172026,1172591
 /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-1171099,1172598,1172665
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1167104-1167229,1167232-1171098,1172027,1172597,1172663
+/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1167085-1172704
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1167104-1167229,1167232-1172702
 /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 Sep 19 17:03:44 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-1171096,1172026,1172591
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090934-1125013,1125019-1171737,1172026,1172591
 /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-1171099,1172598,1172665
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1167104-1167229,1167232-1171098,1172027,1172597,1172663
+/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1167085-1172704
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1167104-1167229,1167232-1172702
 /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 Sep 19 17:03:44 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-1171096,1172026,1172591
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1090934-1125013,1125019-1171737,1172026,1172591
 /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-1171099,1172598,1172665
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1167104-1167229,1167232-1171098,1172027,1172597,1172663
+/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1167085-1172704
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1167104-1167229,1167232-1172702
 /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 Sep 19 17:03:44 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-1171096,1172026,1172591
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1090934-1125013,1125019-1171737,1172026,1172591
 /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-1171099,1172598,1172665
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1167104-1167229,1167232-1171098,1172027,1172597,1172663
+/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1167085-1172704
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1167104-1167229,1167232-1172702
 /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 Sep 19 17:03:44 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-1171096,1172026,1172591
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1090934-1125013,1125019-1171737,1172026,1172591
 /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-1171099,1172598,1172665
-/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1167104-1167229,1167232-1171098,1172027,1172597,1172663
+/cassandra/branches/cassandra-1.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1167085-1172704
+/cassandra/branches/cassandra-1.0.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1167104-1167229,1167232-1172702
 /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/Config.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/Config.java?rev=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/Config.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/Config.java Mon Sep 19 17:03:44 2011
@@ -99,10 +99,10 @@ public class Config
     public Integer commitlog_sync_period_in_ms;
     
     public String endpoint_snitch;
-    public Boolean dynamic_snitch = false;
+    public Boolean dynamic_snitch = true;
     public Integer dynamic_snitch_update_interval_in_ms = 100;
     public Integer dynamic_snitch_reset_interval_in_ms = 600000;
-    public Double dynamic_snitch_badness_threshold = 0.0;
+    public Double dynamic_snitch_badness_threshold = 0.1;
 
     public String request_scheduler;
     public RequestSchedulerId request_scheduler_id;

Modified: cassandra/trunk/src/java/org/apache/cassandra/cql/AbstractModification.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cql/AbstractModification.java?rev=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cql/AbstractModification.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cql/AbstractModification.java Mon Sep 19
17:03:44 2011
@@ -71,9 +71,9 @@ public abstract class AbstractModificati
         return cLevel != null;
     }
 
-    public long getTimestamp()
+    public long getTimestamp(ClientState clientState)
     {
-        return timestamp == null ? System.currentTimeMillis() : timestamp;
+        return timestamp == null ? clientState.getTimestamp() : timestamp;
     }
 
     public boolean isSetTimestamp()

Modified: cassandra/trunk/src/java/org/apache/cassandra/cql/DeleteStatement.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cql/DeleteStatement.java?rev=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cql/DeleteStatement.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cql/DeleteStatement.java Mon Sep 19 17:03:44
2011
@@ -81,41 +81,39 @@ public class DeleteStatement extends Abs
 
         for (Term key : keys)
         {
-            rowMutations.add(mutationForKey(key.getByteBuffer(keyType), keyspace, timestamp));
+            rowMutations.add(mutationForKey(key.getByteBuffer(keyType), keyspace, timestamp,
clientState));
         }
 
         return rowMutations;
     }
 
     /** {@inheritDoc} */
-    public RowMutation mutationForKey(ByteBuffer key, String keyspace, Long timestamp) throws
InvalidRequestException
+    public RowMutation mutationForKey(ByteBuffer key, String keyspace, Long timestamp, ClientState
clientState) throws InvalidRequestException
     {
         RowMutation rm = new RowMutation(keyspace, key);
 
-        mutationForKey(rm, keyspace, timestamp);
-
-        return rm;
-    }
-
-    /** {@inheritDoc} */
-    public void mutationForKey(RowMutation mutation, String keyspace, Long timestamp) throws
InvalidRequestException
-    {
         CFMetaData metadata = validateColumnFamily(keyspace, columnFamily);
         QueryProcessor.validateKeyAlias(metadata, keyName);
 
         AbstractType comparator = metadata.getComparatorFor(null);
 
-        if (columns.size() < 1) // No columns, delete the row
-            mutation.delete(new QueryPath(columnFamily), (timestamp == null) ? getTimestamp()
: timestamp);
-        else    // Delete specific columns
+        if (columns.size() < 1)
+        {
+            // No columns, delete the row
+            rm.delete(new QueryPath(columnFamily), (timestamp == null) ? getTimestamp(clientState)
: timestamp);
+        }
+        else
         {
+            // Delete specific columns
             for (Term column : columns)
             {
                 ByteBuffer columnName = column.getByteBuffer(comparator);
                 validateColumnName(columnName);
-                mutation.delete(new QueryPath(columnFamily, null, columnName), (timestamp
== null) ? getTimestamp() : timestamp);
+                rm.delete(new QueryPath(columnFamily, null, columnName), (timestamp == null)
? getTimestamp(clientState) : timestamp);
             }
         }
+
+        return rm;
     }
 
     public String toString()

Modified: cassandra/trunk/src/java/org/apache/cassandra/cql/UpdateStatement.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cql/UpdateStatement.java?rev=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cql/UpdateStatement.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cql/UpdateStatement.java Mon Sep 19 17:03:44
2011
@@ -159,7 +159,7 @@ public class UpdateStatement extends Abs
 
         for (Term key: keys)
         {
-            rowMutations.add(mutationForKey(keyspace, key.getByteBuffer(getKeyType(keyspace)),
metadata, timestamp));
+            rowMutations.add(mutationForKey(keyspace, key.getByteBuffer(getKeyType(keyspace)),
metadata, timestamp, clientState));
         }
 
         return rowMutations;
@@ -168,16 +168,18 @@ public class UpdateStatement extends Abs
     /**
      * Compute a row mutation for a single key
      *
+     *
      * @param keyspace working keyspace
      * @param key key to change
      * @param metadata information about CF
      * @param timestamp global timestamp to use for every key mutation
      *
+     * @param clientState
      * @return row mutation
      *
      * @throws InvalidRequestException on the wrong request
      */
-    private IMutation mutationForKey(String keyspace, ByteBuffer key, CFMetaData metadata,
Long timestamp) throws InvalidRequestException
+    private IMutation mutationForKey(String keyspace, ByteBuffer key, CFMetaData metadata,
Long timestamp, ClientState clientState) throws InvalidRequestException
     {
         AbstractType<?> comparator = getComparator(keyspace);
 
@@ -200,7 +202,7 @@ public class UpdateStatement extends Abs
                 validateColumn(metadata, colName, colValue);
                 rm.add(new QueryPath(columnFamily, null, colName),
                        colValue,
-                       (timestamp == null) ? getTimestamp() : timestamp,
+                       (timestamp == null) ? getTimestamp(clientState) : timestamp,
                        getTimeToLive());
             }
             else

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Mon Sep 19 17:03:44
2011
@@ -1121,17 +1121,6 @@ public class ColumnFamilyStore implement
             if (cached == null)
                 return null;
 
-            if (!rowCache.isPutCopying())
-            {
-                // make a deep copy of column data so we don't keep references to direct
buffers, which
-                // would prevent munmap post-compaction.
-                for (IColumn column : cached)
-                {
-                    cached.remove(column.name());
-                    cached.addColumn(column.localCopy(this));
-                }
-            }
-
             // avoid keeping a permanent reference to the original key buffer
             rowCache.put(new DecoratedKey(key.token, ByteBufferUtil.clone(key.key)), cached);
         }

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java?rev=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java Mon Sep
19 17:03:44 2011
@@ -100,9 +100,7 @@ public class CommitLogSegment
         long currentPosition = -1L;
         try
         {
-            currentPosition = logWriter.getFilePointer();
-            assert currentPosition <= Integer.MAX_VALUE;
-            ReplayPosition cLogCtx = new ReplayPosition(id, (int) currentPosition);
+            ReplayPosition cLogCtx = getContext();
 
             for (ColumnFamily columnFamily : rowMutation.getColumnFamilies())
             {

Modified: cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java?rev=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java Mon Sep 19 17:03:44
2011
@@ -127,24 +127,6 @@ public class BootStrapper
         }
     }
 
-    /**
-     * if initialtoken was specified, use that.
-     * otherwise, pick a token to assume half the load of the most-loaded node.
-     */
-    public static Token getBootstrapToken(final TokenMetadata metadata, final Map<InetAddress,
Double> load) throws IOException, ConfigurationException
-    {
-        if (DatabaseDescriptor.getInitialToken() != null)
-        {
-            logger.debug("token manually specified as " + DatabaseDescriptor.getInitialToken());
-            Token token = StorageService.getPartitioner().getTokenFactory().fromString(DatabaseDescriptor.getInitialToken());
-            if (metadata.getEndpoint(token) != null)
-                throw new ConfigurationException("Bootstraping to existing token " + token
+ " is not allowed (decommission/removetoken the old node first).");
-            return token;
-        }
-
-        return getBalancedToken(metadata, load);
-    }
-
     public static Token getBalancedToken(TokenMetadata metadata, Map<InetAddress, Double>
load)
     {
         InetAddress maxEndpoint = getBootstrapSource(metadata, load);

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=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/AbstractCassandraDaemon.java Mon
Sep 19 17:03:44 2011
@@ -131,9 +131,11 @@ public abstract class AbstractCassandraD
             {
                 exceptions.incrementAndGet();
                 logger.error("Fatal exception in thread " + t, e);
-                if (e instanceof OutOfMemoryError)
+                for (Throwable e2 = e; e2 != null; e2 = e2.getCause())
                 {
-                    System.exit(100);
+                    // some code, like FileChannel.map, will wrap an OutOfMemoryError in
another exception
+                    if (e2 instanceof OutOfMemoryError)
+                        System.exit(100);
                 }
             }
         });

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/ClientState.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/ClientState.java?rev=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/ClientState.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/ClientState.java Mon Sep 19 17:03:44
2011
@@ -48,6 +48,8 @@ public class ClientState
     // Reusable array for authorization
     private final List<Object> resource = new ArrayList<Object>();
 
+    private long clock;
+
     /**
      * Construct a new, empty ClientState: can be reused after logout() or reset().
      */
@@ -180,4 +182,16 @@ public class ClientState
                                                         perm,
                                                         Resources.toString(resource)));
     }
+
+    /**
+     * This clock guarantees that updates from a given client will be ordered in the sequence
seen,
+     * even if multiple updates happen in the same millisecond.  This can be useful when
a client
+     * wants to perform multiple updates to a single column.
+     */
+    public long getTimestamp()
+    {
+        long current = System.currentTimeMillis() * 1000;
+        clock = clock >= current ? clock + 1 : current;
+        return clock;
+    }
 }

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=1172705&r1=1172704&r2=1172705&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java Mon Sep 19 17:03:44
2011
@@ -27,13 +27,11 @@ import java.net.UnknownHostException;
 import java.nio.ByteBuffer;
 import java.util.*;
 import java.util.concurrent.*;
-import javax.lang.model.type.TypeKind;
 import java.util.concurrent.atomic.AtomicInteger;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import com.google.common.collect.*;
-import org.apache.cassandra.config.*;
 import org.apache.log4j.Level;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
@@ -42,6 +40,7 @@ import org.slf4j.LoggerFactory;
 import org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor;
 import org.apache.cassandra.concurrent.Stage;
 import org.apache.cassandra.concurrent.StageManager;
+import org.apache.cassandra.config.*;
 import org.apache.cassandra.db.*;
 import org.apache.cassandra.db.Table;
 import org.apache.cassandra.db.commitlog.CommitLog;
@@ -509,11 +508,22 @@ public class StorageService implements I
             }
             if (logger_.isDebugEnabled())
                 logger_.debug("... got ring + schema info");
-            if (null != DatabaseDescriptor.getReplaceToken())
+
+            if (DatabaseDescriptor.getReplaceToken() == null)
+            {
+                if (tokenMetadata_.isMember(FBUtilities.getBroadcastAddress()))
+                {
+                    String s = "This node is already a member of the token ring; bootstrap
aborted. (If replacing a dead node, remove the old one from the ring first.)";
+                    throw new UnsupportedOperationException(s);
+                }
+                setMode("Joining: getting bootstrap token", true);
+                token = getNewToken();
+            }
+            else
             {
                 try
                 {
-                    // Sleeping additionally to make sure that the server actually is not
alive 
+                    // Sleeping additionally to make sure that the server actually is not
alive
                     // and giving it more time to gossip if alive.
                     Thread.sleep(LoadBroadcaster.BROADCAST_INTERVAL);
                 }
@@ -528,16 +538,7 @@ public class StorageService implements I
                     throw new UnsupportedOperationException("Cannnot replace a token for
a Live node... ");
                 setMode("Joining: Replacing a node with token: " + token, true);
             }
-            else
-            {
-                if (tokenMetadata_.isMember(FBUtilities.getBroadcastAddress()))
-                {
-                    String s = "This node is already a member of the token ring; bootstrap
aborted. (If replacing a dead node, remove the old one from the ring first.)";
-                    throw new UnsupportedOperationException(s);
-                }
-                setMode("Joining: getting bootstrap token", true);
-                token = BootStrapper.getBootstrapToken(tokenMetadata_, LoadBroadcaster.instance.getLoadInfo());
-            }
+
             // don't bootstrap if there are no tables defined.
             if (Schema.instance.getNonSystemTables().size() > 0)
             {
@@ -550,23 +551,9 @@ public class StorageService implements I
         {
             token = SystemTable.getSavedToken();
             if (token == null)
-            {
-                String initialToken = DatabaseDescriptor.getInitialToken();
-                if (initialToken == null)
-                {
-                    token = partitioner.getRandomToken();
-                    logger_.warn("Generated random token " + token + ". Random tokens will
result in an unbalanced ring; see http://wiki.apache.org/cassandra/Operations");
-                }
-                else
-                {
-                    token = partitioner.getTokenFactory().fromString(initialToken);
-                    logger_.info("Saved token not found. Using " + token + " from configuration");
-                }
-            }
+                token = getNewToken();
             else
-            {
                 logger_.info("Using saved token " + token);
-            }
         }
 
         // start participating in the ring.
@@ -576,6 +563,33 @@ public class StorageService implements I
         assert tokenMetadata_.sortedTokens().size() > 0;
     }
 
+    /**
+     * Return a new token for this node.
+     */
+    private Token getNewToken() throws ConfigurationException
+    {
+        Token token;
+        if (DatabaseDescriptor.getInitialToken() != null)
+        {
+            logger_.debug("token manually specified as {}", DatabaseDescriptor.getInitialToken());
+            token = StorageService.getPartitioner().getTokenFactory().fromString(DatabaseDescriptor.getInitialToken());
+        }
+        else if (Schema.instance.getNonSystemTables().size() > 0)
+        {
+            // We are not bootstrapping, we are an initial node, getBalancedToken is not
safe.
+            token = partitioner.getRandomToken();
+            logger_.warn("Generated random token " + token + ". Random tokens will result
in an unbalanced ring; see http://wiki.apache.org/cassandra/Operation");
+        }
+        else
+        {
+            token = BootStrapper.getBalancedToken(tokenMetadata_, LoadBroadcaster.instance.getLoadInfo());
+        }
+
+        if (tokenMetadata_.getEndpoint(token) != null)
+            throw new ConfigurationException("Bootstraping to existing token " + token +
" is not allowed (decommission/removetoken the old node first)");
+        return token;
+    }
+
     public synchronized void joinRing() throws IOException, org.apache.cassandra.config.ConfigurationException
     {
         if (!joined)



Mime
View raw message