Author: jbellis
Date: Tue Oct 26 03:35:58 2010
New Revision: 1027353

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

Added:
    cassandra/trunk/src/java/org/apache/cassandra/cli/CliUserHelp.java
      - copied unchanged from r1027349, 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliUserHelp.java
Modified:
    cassandra/trunk/   (props changed)
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/contrib/client_only/ClientOnlyExample.java
    
cassandra/trunk/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
    cassandra/trunk/contrib/word_count/src/WordCount.java
    cassandra/trunk/contrib/word_count/src/WordCountSetup.java
    cassandra/trunk/interface/cassandra.genavro
    cassandra/trunk/interface/cassandra.thrift
    
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/ConsistencyLevel.java
    
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java
    
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/avro/CassandraServer.java
    cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
    cassandra/trunk/src/java/org/apache/cassandra/cli/CliCompiler.java
    cassandra/trunk/src/java/org/apache/cassandra/cli/CliMain.java
    cassandra/trunk/src/java/org/apache/cassandra/cli/CliUtils.java
    cassandra/trunk/src/java/org/apache/cassandra/db/DefsTable.java
    cassandra/trunk/src/java/org/apache/cassandra/db/HintedHandOffManager.java
    cassandra/trunk/src/java/org/apache/cassandra/db/SystemTable.java
    cassandra/trunk/src/java/org/apache/cassandra/db/migration/Migration.java
    cassandra/trunk/src/java/org/apache/cassandra/dht/RandomPartitioner.java
    cassandra/trunk/src/java/org/apache/cassandra/dht/Range.java
    
cassandra/trunk/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java
    cassandra/trunk/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
    
cassandra/trunk/src/java/org/apache/cassandra/service/DatacenterSyncWriteResponseHandler.java
    
cassandra/trunk/src/java/org/apache/cassandra/service/DatacenterWriteResponseHandler.java
    cassandra/trunk/src/java/org/apache/cassandra/utils/ByteBufferUtil.java
    cassandra/trunk/src/java/org/apache/cassandra/utils/FBUtilities.java
    cassandra/trunk/src/java/org/apache/cassandra/utils/GuidGenerator.java
    cassandra/trunk/test/unit/org/apache/cassandra/client/TestRingCache.java
    
cassandra/trunk/test/unit/org/apache/cassandra/config/ColumnDefinitionTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/ColumnFamilyTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/CompactionsPurgeTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/NameSortTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/OneCompactionTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/ReadMessageTest.java
    
cassandra/trunk/test/unit/org/apache/cassandra/db/RecoveryManagerTruncateTest.java
    
cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveColumnFamilyTest.java
    
cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveColumnFamilyWithFlush1Test.java
    
cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveColumnFamilyWithFlush2Test.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveColumnTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveSubColumnTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveSuperColumnTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/RowIterationTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/RowTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/SuperColumnTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/TableTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/TimeSortTest.java
    
cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/TypeCompareTest.java
    
cassandra/trunk/test/unit/org/apache/cassandra/io/LazilyCompactedRowTest.java
    
cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
    
cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTest.java
    
cassandra/trunk/test/unit/org/apache/cassandra/service/AntiEntropyServiceTest.java
    
cassandra/trunk/test/unit/org/apache/cassandra/service/EmbeddedCassandraServiceTest.java
    
cassandra/trunk/test/unit/org/apache/cassandra/streaming/StreamingTransferTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/tools/SSTableExportTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/tools/SSTableImportTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/utils/BloomFilterTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/utils/FilterTest.java

Propchange: cassandra/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 26 03:35:58 2010
@@ -1,5 +1,5 @@
 /cassandra/branches/cassandra-0.6:922689-1024328
-/cassandra/branches/cassandra-0.7:1026517-1026859
+/cassandra/branches/cassandra-0.7:1026517-1027349
 /incubator/cassandra/branches/cassandra-0.3:774578-796573
 /incubator/cassandra/branches/cassandra-0.4:810145-834239,834349-834350
 /incubator/cassandra/branches/cassandra-0.5:888872-915439

Modified: cassandra/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1027353&r1=1027352&r2=1027353&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Tue Oct 26 03:35:58 2010
@@ -58,6 +58,7 @@
  * fix commitlog recovery deleting the newly-created segment as well as
    the old ones (CASSANDRA-1644)
  * upgrade to Thrift 0.5 (CASSANDRA-1367)
+ * renamed CL.DCQUORUM to LOCAL_QUORUM and DCQUORUMSYNC to EACH_QUORUM
 
 
 0.7-beta2

Modified: cassandra/trunk/contrib/client_only/ClientOnlyExample.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/contrib/client_only/ClientOnlyExample.java?rev=1027353&r1=1027352&r2=1027353&view=diff
==============================================================================
--- cassandra/trunk/contrib/client_only/ClientOnlyExample.java (original)
+++ cassandra/trunk/contrib/client_only/ClientOnlyExample.java Tue Oct 26 
03:35:58 2010
@@ -80,7 +80,7 @@ public class ClientOnlyExample
         // do some queries.
         Collection<ByteBuffer> cols = new ArrayList<ByteBuffer>()
         {{
-            add(ByteBuffer.wrap("colb".getBytes()));
+            add(ByteBufferUtil.bytes("colb"));
         }};
         for (int i = 0; i < 100; i++)
         {
@@ -97,7 +97,7 @@ public class ClientOnlyExample
             {
                 for (IColumn col : cf.getSortedColumns())
                 {
-                    System.out.println(ByteBufferUtil.string(col.name(), 
Charsets.UTF_8) + ", " + ByteBufferUtil.string(col.value(), Charsets.UTF_8));
+                    System.out.println(ByteBufferUtil.string(col.name()) + ", 
" + ByteBufferUtil.string(col.value()));
                 }
             }
             else

Modified: 
cassandra/trunk/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java?rev=1027353&r1=1027352&r2=1027353&view=diff
==============================================================================
--- 
cassandra/trunk/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
 (original)
+++ 
cassandra/trunk/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
 Tue Oct 26 03:35:58 2010
@@ -17,6 +17,7 @@
 package org.apache.cassandra.hadoop.pig;
 
 import java.io.IOException;
+import java.nio.ByteBuffer;
 import java.util.*;
 
 import org.apache.cassandra.db.Column;
@@ -25,6 +26,7 @@ import org.apache.cassandra.db.SuperColu
 import org.apache.cassandra.hadoop.*;
 import org.apache.cassandra.thrift.SlicePredicate;
 import org.apache.cassandra.thrift.SliceRange;
+import org.apache.cassandra.utils.FBUtilities;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
@@ -52,7 +54,7 @@ public class CassandraStorage extends Lo
     public final static String PIG_INITIAL_ADDRESS = "PIG_INITIAL_ADDRESS";
     public final static String PIG_PARTITIONER = "PIG_PARTITIONER";
 
-    private final static byte[] BOUND = new byte[0];
+    private final static ByteBuffer BOUND = FBUtilities.EMPTY_BYTE_BUFFER;
     private final static int LIMIT = 1024;
 
     private Configuration conf;
@@ -75,7 +77,11 @@ public class CassandraStorage extends Lo
             ArrayList<Tuple> columns = new ArrayList<Tuple>();
             tuple.set(0, new DataByteArray(key));
             for (Map.Entry<byte[], IColumn> entry : cf.entrySet())
-                columns.add(columnToTuple(entry.getKey(), entry.getValue()));
+            {                    
+                byte[] name = entry.getKey();
+                columns.add(columnToTuple(name, 0, name.length, 
entry.getValue()));
+            }
+         
             tuple.set(1, new DefaultDataBag(columns));
             return tuple;
         }
@@ -85,21 +91,26 @@ public class CassandraStorage extends Lo
         }
     }
 
-    private Tuple columnToTuple(byte[] name, IColumn col) throws IOException
+    private Tuple columnToTuple(byte[] name, int nameOffset, int nameLength, 
IColumn col) throws IOException
     {
         Tuple pair = TupleFactory.getInstance().newTuple(2);
-        pair.set(0, new DataByteArray(name));
+        pair.set(0, new DataByteArray(name, nameOffset, nameLength));
         if (col instanceof Column)
         {
             // standard
-            pair.set(1, new DataByteArray(col.value()));
+            pair.set(1, new DataByteArray(col.value().array(), 
+                                          
col.value().position()+col.value().arrayOffset(),
+                                          col.value().remaining()));
             return pair;
         }
 
         // super
         ArrayList<Tuple> subcols = new ArrayList<Tuple>();
         for (IColumn subcol : ((SuperColumn)col).getSubColumns())
-            subcols.add(columnToTuple(subcol.name(), subcol));
+            subcols.add(columnToTuple(subcol.name().array(), 
+                                      
subcol.name().position()+subcol.name().arrayOffset(),
+                                      subcol.name().remaining(), subcol));
+        
         pair.set(1, new DefaultDataBag(subcols));
         return pair;
     }

Modified: cassandra/trunk/contrib/word_count/src/WordCount.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/contrib/word_count/src/WordCount.java?rev=1027353&r1=1027352&r2=1027353&view=diff
==============================================================================
--- cassandra/trunk/contrib/word_count/src/WordCount.java (original)
+++ cassandra/trunk/contrib/word_count/src/WordCount.java Tue Oct 26 03:35:58 
2010
@@ -81,7 +81,7 @@ public class WordCount extends Configure
             IColumn column = columns.get(columnName.getBytes());
             if (column == null)
                 return;
-            String value = ByteBufferUtil.string(column.value(), 
Charsets.UTF_8);
+            String value = ByteBufferUtil.string(column.value());
             logger.debug("read " + key + ":" + value + " from " + 
context.getInputSplit());
 
             StringTokenizer itr = new StringTokenizer(value);

Modified: cassandra/trunk/contrib/word_count/src/WordCountSetup.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/contrib/word_count/src/WordCountSetup.java?rev=1027353&r1=1027352&r2=1027353&view=diff
==============================================================================
--- cassandra/trunk/contrib/word_count/src/WordCountSetup.java (original)
+++ cassandra/trunk/contrib/word_count/src/WordCountSetup.java Tue Oct 26 
03:35:58 2010
@@ -16,9 +16,11 @@
  * limitations under the License.
  */
 
+import java.nio.ByteBuffer;
 import java.util.*;
 
 import org.apache.cassandra.thrift.*;
+import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.thrift.TException;
 import org.apache.thrift.protocol.TBinaryProtocol;
 import org.apache.thrift.protocol.TProtocol;
@@ -43,29 +45,29 @@ public class WordCountSetup
 
         client.set_keyspace(WordCount.KEYSPACE);
 
-        Map<byte[], Map<String,List<Mutation>>> mutationMap;
+        Map<ByteBuffer, Map<String,List<Mutation>>> mutationMap;
         Column c;
 
         // text0: no rows
 
         // text1: 1 row, 1 word
-        c = new Column("text1".getBytes(), "word1".getBytes(), 
System.currentTimeMillis());
-        mutationMap = getMutationMap("key0".getBytes(), 
WordCount.COLUMN_FAMILY, c);
+        c = new Column(ByteBufferUtil.bytes("text1"), 
ByteBufferUtil.bytes("word1"), System.currentTimeMillis());
+        mutationMap = getMutationMap(ByteBufferUtil.bytes("key0"), 
WordCount.COLUMN_FAMILY, c);
         client.batch_mutate(mutationMap, ConsistencyLevel.ONE);
         logger.info("added text1");
 
         // text1: 1 row, 2 word
-        c = new Column("text2".getBytes(), "word1 word2".getBytes(), 
System.currentTimeMillis());
-        mutationMap = getMutationMap("key0".getBytes(), 
WordCount.COLUMN_FAMILY, c);
+        c = new Column(ByteBufferUtil.bytes("text2"), 
ByteBufferUtil.bytes("word1 word2"), System.currentTimeMillis());
+        mutationMap = getMutationMap(ByteBufferUtil.bytes("key0"), 
WordCount.COLUMN_FAMILY, c);
         client.batch_mutate(mutationMap, ConsistencyLevel.ONE);
         logger.info("added text2");
 
         // text3: 1000 rows, 1 word
-        mutationMap = new HashMap<byte[],Map<String,List<Mutation>>>();
+        mutationMap = new HashMap<ByteBuffer,Map<String,List<Mutation>>>();
         for (int i=0; i<1000; i++)
         {
-            c = new Column("text3".getBytes(), "word1".getBytes(), 
System.currentTimeMillis());
-            addToMutationMap(mutationMap, ("key" + i).getBytes(), 
WordCount.COLUMN_FAMILY, c);
+            c = new Column(ByteBufferUtil.bytes("text3"), 
ByteBufferUtil.bytes("word1"), System.currentTimeMillis());
+            addToMutationMap(mutationMap, ByteBufferUtil.bytes("key" + i), 
WordCount.COLUMN_FAMILY, c);
         }
         client.batch_mutate(mutationMap, ConsistencyLevel.ONE);
         logger.info("added text3");
@@ -73,14 +75,14 @@ public class WordCountSetup
         System.exit(0);
     }
 
-    private static Map<byte[],Map<String,List<Mutation>>> 
getMutationMap(byte[] key, String cf, Column c)
+    private static Map<ByteBuffer,Map<String,List<Mutation>>> 
getMutationMap(ByteBuffer key, String cf, Column c)
     {
-        Map<byte[],Map<String,List<Mutation>>> mutationMap = new 
HashMap<byte[],Map<String,List<Mutation>>>();
+        Map<ByteBuffer,Map<String,List<Mutation>>> mutationMap = new 
HashMap<ByteBuffer,Map<String,List<Mutation>>>();
         addToMutationMap(mutationMap, key, cf, c);
         return mutationMap;
     }
 
-    private static void 
addToMutationMap(Map<byte[],Map<String,List<Mutation>>> mutationMap, byte[] 
key, String cf, Column c)
+    private static void 
addToMutationMap(Map<ByteBuffer,Map<String,List<Mutation>>> mutationMap, 
ByteBuffer key, String cf, Column c)
     {
         Map<String,List<Mutation>> cfMutation = new 
HashMap<String,List<Mutation>>();
         List<Mutation> mList = new ArrayList<Mutation>();

Modified: cassandra/trunk/interface/cassandra.genavro
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/interface/cassandra.genavro?rev=1027353&r1=1027352&r2=1027353&view=diff
==============================================================================
--- cassandra/trunk/interface/cassandra.genavro (original)
+++ cassandra/trunk/interface/cassandra.genavro Tue Oct 26 03:35:58 2010
@@ -194,7 +194,7 @@ protocol Cassandra {
     }
 
     enum ConsistencyLevel {
-        ONE, QUORUM, DCQUORUM, DCQUORUMSYNC, ALL
+        ONE, QUORUM, LOCAL_QUORUM, EACH_QUORUM, ALL
     }
 
     error InvalidRequestException {

Modified: cassandra/trunk/interface/cassandra.thrift
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/interface/cassandra.thrift?rev=1027353&r1=1027352&r2=1027353&view=diff
==============================================================================
--- cassandra/trunk/interface/cassandra.thrift (original)
+++ cassandra/trunk/interface/cassandra.thrift Tue Oct 26 03:35:58 2010
@@ -46,7 +46,7 @@ namespace rb CassandraThrift
 #           for every edit that doesn't result in a change to major/minor.
 #
 # See the Semantic Versioning Specification (SemVer) http://semver.org.
-const string VERSION = "19.3.0"
+const string VERSION = "19.4.0"
 
 
 #
@@ -142,23 +142,23 @@ exception AuthorizationException {
  *   ANY          Ensure that the write has been written once somewhere, 
including possibly being hinted in a non-target node.
  *   ONE          Ensure that the write has been written to at least 1 node's 
commit log and memory table
  *   QUORUM       Ensure that the write has been written to 
<ReplicationFactor> / 2 + 1 nodes
- *   DCQUORUM     Ensure that the write has been written to 
<ReplicationFactor> / 2 + 1 nodes, within the local datacenter (requires 
NetworkTopologyStrategy)
- *   DCQUORUMSYNC Ensure that the write has been written to 
<ReplicationFactor> / 2 + 1 nodes in each datacenter (requires 
NetworkTopologyStrategy)
+ *   LOCAL_QUORUM Ensure that the write has been written to 
<ReplicationFactor> / 2 + 1 nodes, within the local datacenter (requires 
NetworkTopologyStrategy)
+ *   EACH_QUORUM  Ensure that the write has been written to 
<ReplicationFactor> / 2 + 1 nodes in each datacenter (requires 
NetworkTopologyStrategy)
  *   ALL          Ensure that the write is written to 
<code>&lt;ReplicationFactor&gt;</code> nodes before responding to the client.
  *
  * Read:
  *   ANY          Not supported. You probably want ONE instead.
  *   ONE          Will return the record returned by the first node to 
respond. A consistency check is always done in a background thread to fix any 
consistency issues when ConsistencyLevel.ONE is used. This means subsequent 
calls will have correct data even if the initial read gets an older value. 
(This is called 'read repair'.)
  *   QUORUM       Will query all storage nodes and return the record with the 
most recent timestamp once it has at least a majority of replicas reported. 
Again, the remaining replicas will be checked in the background.
- *   DCQUORUM     Returns the record with the most recent timestamp once a 
majority of replicas within the local datacenter have replied.
- *   DCQUORUMSYNC Returns the record with the most recent timestamp once a 
majority of replicas within each datacenter have replied.
+ *   LOCAL_QUORUM Returns the record with the most recent timestamp once a 
majority of replicas within the local datacenter have replied.
+ *   EACH_QUORUM  Returns the record with the most recent timestamp once a 
majority of replicas within each datacenter have replied.
  *   ALL          Queries all storage nodes and returns the record with the 
most recent timestamp.
 */
 enum ConsistencyLevel {
     ONE = 1,
     QUORUM = 2,
-    DCQUORUM = 3,
-    DCQUORUMSYNC = 4,
+    LOCAL_QUORUM = 3,
+    EACH_QUORUM = 4,
     ALL = 5,
     ANY = 6,
 }

Propchange: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 26 03:35:58 2010
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1024328
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026517-1026859
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026517-1027349
 
/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
 
/incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/Cassandra.java:888872-903502

Propchange: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 26 03:35:58 2010
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1024328
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026517-1026859
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026517-1027349
 
/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
 
/incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/Column.java:888872-903502

Modified: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ConsistencyLevel.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ConsistencyLevel.java?rev=1027353&r1=1027352&r2=1027353&view=diff
==============================================================================
--- 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ConsistencyLevel.java
 (original)
+++ 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ConsistencyLevel.java
 Tue Oct 26 03:35:58 2010
@@ -44,23 +44,23 @@ import org.apache.thrift.TEnum;
  *   ANY          Ensure that the write has been written once somewhere, 
including possibly being hinted in a non-target node.
  *   ONE          Ensure that the write has been written to at least 1 node's 
commit log and memory table
  *   QUORUM       Ensure that the write has been written to 
<ReplicationFactor> / 2 + 1 nodes
- *   DCQUORUM     Ensure that the write has been written to 
<ReplicationFactor> / 2 + 1 nodes, within the local datacenter (requires 
NetworkTopologyStrategy)
- *   DCQUORUMSYNC Ensure that the write has been written to 
<ReplicationFactor> / 2 + 1 nodes in each datacenter (requires 
NetworkTopologyStrategy)
+ *   LOCAL_QUORUM Ensure that the write has been written to 
<ReplicationFactor> / 2 + 1 nodes, within the local datacenter (requires 
NetworkTopologyStrategy)
+ *   EACH_QUORUM  Ensure that the write has been written to 
<ReplicationFactor> / 2 + 1 nodes in each datacenter (requires 
NetworkTopologyStrategy)
  *   ALL          Ensure that the write is written to 
<code>&lt;ReplicationFactor&gt;</code> nodes before responding to the client.
  * 
  * Read:
  *   ANY          Not supported. You probably want ONE instead.
  *   ONE          Will return the record returned by the first node to 
respond. A consistency check is always done in a background thread to fix any 
consistency issues when ConsistencyLevel.ONE is used. This means subsequent 
calls will have correct data even if the initial read gets an older value. 
(This is called 'read repair'.)
  *   QUORUM       Will query all storage nodes and return the record with the 
most recent timestamp once it has at least a majority of replicas reported. 
Again, the remaining replicas will be checked in the background.
- *   DCQUORUM     Returns the record with the most recent timestamp once a 
majority of replicas within the local datacenter have replied.
- *   DCQUORUMSYNC Returns the record with the most recent timestamp once a 
majority of replicas within each datacenter have replied.
+ *   LOCAL_QUORUM Returns the record with the most recent timestamp once a 
majority of replicas within the local datacenter have replied.
+ *   EACH_QUORUM  Returns the record with the most recent timestamp once a 
majority of replicas within each datacenter have replied.
  *   ALL          Queries all storage nodes and returns the record with the 
most recent timestamp.
  */
 public enum ConsistencyLevel implements TEnum {
   ONE(1),
   QUORUM(2),
-  DCQUORUM(3),
-  DCQUORUMSYNC(4),
+  LOCAL_QUORUM(3),
+  EACH_QUORUM(4),
   ALL(5),
   ANY(6);
 
@@ -88,9 +88,9 @@ public enum ConsistencyLevel implements 
       case 2:
         return QUORUM;
       case 3:
-        return DCQUORUM;
+        return LOCAL_QUORUM;
       case 4:
-        return DCQUORUMSYNC;
+        return EACH_QUORUM;
       case 5:
         return ALL;
       case 6:

Modified: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java?rev=1027353&r1=1027352&r2=1027353&view=diff
==============================================================================
--- 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java
 (original)
+++ 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java
 Tue Oct 26 03:35:58 2010
@@ -44,6 +44,6 @@ import org.slf4j.LoggerFactory;
 
 public class Constants {
 
-  public static final String VERSION = "19.3.0";
+  public static final String VERSION = "19.4.0";
 
 }

Propchange: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 26 03:35:58 2010
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-1024328
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1026517-1026859
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1026517-1027349
 
/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
 
/incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:888872-903502

Propchange: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 26 03:35:58 2010
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:922689-1024328
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1026517-1026859
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1026517-1027349
 
/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
 
/incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:888872-903502

Propchange: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 26 03:35:58 2010
@@ -1,5 +1,5 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:922689-1024328
-/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1026517-1026859
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1026517-1027349
 
/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
 
/incubator/cassandra/branches/cassandra-0.5/interface/gen-java/org/apache/cassandra/service/SuperColumn.java:888872-903502

Modified: 
cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java?rev=1027353&r1=1027352&r2=1027353&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java 
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java Tue 
Oct 26 03:35:58 2010
@@ -591,8 +591,8 @@ public class CassandraServer implements 
         {
             case ONE: return org.apache.cassandra.thrift.ConsistencyLevel.ONE;
             case QUORUM: return 
org.apache.cassandra.thrift.ConsistencyLevel.QUORUM;
-            case DCQUORUM: return 
org.apache.cassandra.thrift.ConsistencyLevel.DCQUORUM;
-            case DCQUORUMSYNC: return 
org.apache.cassandra.thrift.ConsistencyLevel.DCQUORUMSYNC;
+            case LOCAL_QUORUM: return 
org.apache.cassandra.thrift.ConsistencyLevel.LOCAL_QUORUM;
+            case EACH_QUORUM: return 
org.apache.cassandra.thrift.ConsistencyLevel.EACH_QUORUM;
             case ALL: return org.apache.cassandra.thrift.ConsistencyLevel.ALL;
         }
         return null;


Reply via email to