cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r916964 - in /incubator/cassandra/trunk: ./ contrib/bmt_example/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/db/
Date Sat, 27 Feb 2010 15:21:40 GMT
Author: jbellis
Date: Sat Feb 27 15:21:39 2010
New Revision: 916964

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

Modified:
    incubator/cassandra/trunk/   (props changed)
    incubator/cassandra/trunk/CHANGES.txt
    incubator/cassandra/trunk/NEWS.txt
    incubator/cassandra/trunk/contrib/bmt_example/CassandraBulkLoader.java
    incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
  (props changed)
    incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
  (props changed)
    incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
  (props changed)
    incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
  (props changed)
    incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
  (props changed)
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java

Propchange: incubator/cassandra/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 27 15:21:39 2010
@@ -1,4 +1,4 @@
 /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
-/incubator/cassandra/branches/cassandra-0.6:911237-916430,916955-916960
+/incubator/cassandra/branches/cassandra-0.6:911237-916963

Modified: incubator/cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/CHANGES.txt?rev=916964&r1=916963&r2=916964&view=diff
==============================================================================
--- incubator/cassandra/trunk/CHANGES.txt (original)
+++ incubator/cassandra/trunk/CHANGES.txt Sat Feb 27 15:21:39 2010
@@ -4,6 +4,8 @@
 0.6.0-RC1
  * fix compaction bucketing bug (CASSANDRA-814)
  * update windows batch file (CASSANDRA-824)
+ * deprecate KeysCachedFraction configuration directive in favor
+   of KeysCached; move to unified-per-CF key cache (CASSANDRA-801)
 
 0.6.0-beta1/beta2
  * add batch_mutate thrift command, deprecating batch_insert (CASSANDRA-336)

Modified: incubator/cassandra/trunk/NEWS.txt
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/NEWS.txt?rev=916964&r1=916963&r2=916964&view=diff
==============================================================================
--- incubator/cassandra/trunk/NEWS.txt (original)
+++ incubator/cassandra/trunk/NEWS.txt Sat Feb 27 15:21:39 2010
@@ -28,6 +28,7 @@
     - Like MemtableSizeInMB, BinaryMemtableSizeInMB has been replaced by
       BinaryMemtableThroughputInMB.
     - Replication factor is now per-keyspace, rather than global.
+    - KeysCachedFraction is deprecated in favor of KeysCached
 
 Thrift API
 ----------

Modified: incubator/cassandra/trunk/contrib/bmt_example/CassandraBulkLoader.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/contrib/bmt_example/CassandraBulkLoader.java?rev=916964&r1=916963&r2=916964&view=diff
==============================================================================
--- incubator/cassandra/trunk/contrib/bmt_example/CassandraBulkLoader.java (original)
+++ incubator/cassandra/trunk/contrib/bmt_example/CassandraBulkLoader.java Sat Feb 27 15:21:39
2010
@@ -63,7 +63,6 @@
 
 import org.apache.cassandra.net.Message;
 import org.apache.cassandra.net.MessagingService;
-import org.apache.cassandra.net.SelectorManager;
 import org.apache.cassandra.service.StorageService;
 import org.apache.hadoop.filecache.DistributedCache;
 import org.apache.hadoop.fs.Path;
@@ -102,7 +101,14 @@
 
             System.setProperty("storage-config",cassConfig);
 
-            StorageService.instance().startClient();
+            try
+            {
+                StorageService.instance.initClient();
+            }
+            catch (IOException e)
+            {
+                throw new RuntimeException(e);
+            }
             try
             {
                 Thread.sleep(10*1000);
@@ -137,21 +143,21 @@
             {
                 throw new RuntimeException(e);
             }
-            StorageService.instance().stopClient();
+            StorageService.instance.stopClient();
         }
 
         public void reduce(Text key, Iterator<Text> values, OutputCollector<Text,
Text> output, Reporter reporter) throws IOException
         {
             ColumnFamily columnFamily;
-            String Keyspace = "Keyspace1";
-            String CFName = "Super1";
+            String keyspace = "Keyspace1";
+            String cfName = "Super1";
             Message message;
             List<ColumnFamily> columnFamilies;
             columnFamilies = new LinkedList<ColumnFamily>();
             String line;
 
             /* Create a column family */
-            columnFamily = ColumnFamily.create(Keyspace, CFName);
+            columnFamily = ColumnFamily.create(keyspace, cfName);
             while (values.hasNext()) {
                 // Split the value (line based on your own delimiter)
                 line = values.next().toString();
@@ -160,17 +166,17 @@
                 String ColumnName = fields[2];
                 String ColumnValue = fields[3];
                 int timestamp = 0;
-                columnFamily.addColumn(new QueryPath(CFName, SuperColumnName.getBytes("UTF-8"),
ColumnName.getBytes("UTF-8")), ColumnValue.getBytes(), timestamp);
+                columnFamily.addColumn(new QueryPath(cfName, SuperColumnName.getBytes("UTF-8"),
ColumnName.getBytes("UTF-8")), ColumnValue.getBytes(), timestamp);
             }
 
             columnFamilies.add(columnFamily);
 
             /* Get serialized message to send to cluster */
-            message = createMessage(Keyspace, key.toString(), CFName, columnFamilies);
-            for (InetAddress endpoint: StorageService.instance().getNaturalEndPoints(key.toString()))
+            message = createMessage(keyspace, key.toString(), cfName, columnFamilies);
+            for (InetAddress endpoint: StorageService.instance.getNaturalEndpoints(keyspace,
key.toString()))
             {
                 /* Send message to end point */
-                MessagingService.instance().sendOneWay(message, endpoint);
+                MessagingService.instance.sendOneWay(message, endpoint);
             }
             
             output.collect(key, new Text(" inserted into Cassandra node(s)"));
@@ -248,7 +254,7 @@
         try
         {
             /* Make message */
-            message = rm.makeRowMutationMessage(StorageService.binaryVerbHandler_);
+            message = rm.makeRowMutationMessage(StorageService.Verb.BINARY);
         }
         catch (IOException e)
         {

Propchange: incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 27 15:21:39 2010
@@ -1,6 +1,6 @@
 /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
-/incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:911237-916430,916955-916960
+/incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:911237-916963
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java:749219-768588
 /incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:749219-904544

Propchange: incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 27 15:21:39 2010
@@ -1,7 +1,7 @@
 /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
-/incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:911237-916430,916955-916960
+/incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:911237-916963
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Column.java:749219-794428
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/column_t.java:749219-768588
 /incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:749219-904544

Propchange: incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 27 15:21:39 2010
@@ -1,6 +1,6 @@
 /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
-/incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:911237-916430,916955-916960
+/incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:911237-916963
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:749219-768588
 /incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:749219-904544

Propchange: incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 27 15:21:39 2010
@@ -1,5 +1,5 @@
 /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
-/incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:911237-916430,916955-916960
+/incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:911237-916963
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:749219-768588

Propchange: incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 27 15:21:39 2010
@@ -1,7 +1,7 @@
 /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
-/incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:911237-916430,916955-916960
+/incubator/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:911237-916963
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/SuperColumn.java:749219-794428
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/superColumn_t.java:749219-768588
 /incubator/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:749219-904544

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java?rev=916964&r1=916963&r2=916964&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java Sat Feb 27
15:21:39 2010
@@ -211,10 +211,15 @@
 
     public Message makeRowMutationMessage() throws IOException
     {
+        return makeRowMutationMessage(StorageService.Verb.MUTATION);
+    }
+
+    public Message makeRowMutationMessage(StorageService.Verb verb) throws IOException
+    {
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         DataOutputStream dos = new DataOutputStream(bos);
         serializer().serialize(this, dos);
-        return new Message(FBUtilities.getLocalAddress(), StageManager.MUTATION_STAGE, StorageService.Verb.MUTATION,
bos.toByteArray());
+        return new Message(FBUtilities.getLocalAddress(), StageManager.MUTATION_STAGE, verb,
bos.toByteArray());
     }
 
     public static RowMutation getRowMutationFromMutations(String keyspace, String key, Map<String,
List<Mutation>> cfmap)



Mime
View raw message