You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2014/03/05 15:03:10 UTC

[3/3] git commit: add Thrift get_multi_slice call patch by Ed Capriolo; reviewed by Tyler Hobbs for CASSANDRA-6757

add Thrift get_multi_slice call
patch by Ed Capriolo; reviewed by Tyler Hobbs for CASSANDRA-6757


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/60fb9230
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/60fb9230
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/60fb9230

Branch: refs/heads/trunk
Commit: 60fb923018a6fd2dabf04a1d4500f7b29a23a6f1
Parents: 630d3b9
Author: Jonathan Ellis <jb...@apache.org>
Authored: Wed Mar 5 07:57:25 2014 -0600
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Wed Mar 5 08:02:59 2014 -0600

----------------------------------------------------------------------
 CHANGES.txt                                     |    1 +
 interface/cassandra.thrift                      |   37 +-
 .../org/apache/cassandra/thrift/Cassandra.java  | 3071 +++++++++++++-----
 .../apache/cassandra/thrift/ColumnSlice.java    |  551 ++++
 .../cassandra/thrift/MultiSliceRequest.java     | 1042 ++++++
 .../cassandra/thrift/cassandraConstants.java    |    2 +-
 .../cassandra/thrift/CassandraServer.java       |   68 +
 test/system/test_thrift_server.py               |   34 +
 .../cassandra/db/ColumnFamilyStoreTest.java     |    1 +
 .../apache/cassandra/thrift/MultiSliceTest.java |  149 +
 10 files changed, 4050 insertions(+), 906 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/60fb9230/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e324225..1c0941b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
 3.0
  * Remove CQL2 (CASSANDRA-5918)
+ * add Thrift get_multi_slice call (CASSANDRA-6757)
 
 
 2.1.0-beta2

http://git-wip-us.apache.org/repos/asf/cassandra/blob/60fb9230/interface/cassandra.thrift
----------------------------------------------------------------------
diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift
index e46b85e..b6b06dc 100644
--- a/interface/cassandra.thrift
+++ b/interface/cassandra.thrift
@@ -55,7 +55,7 @@ namespace rb CassandraThrift
 # An effort should be made not to break forward-client-compatibility either
 # (e.g. one should avoid removing obsolete fields from the IDL), but no
 # guarantees in this respect are made by the Cassandra project.
-const string VERSION = "20.0.0"
+const string VERSION = "20.1.0"
 
 
 #
@@ -563,6 +563,35 @@ struct CfSplit {
     3: required i64 row_count
 }
 
+/** The ColumnSlice is used to select a set of columns from inside a row. 
+ * If start or finish are unspecified they will default to the start-of
+ * end-of value.
+ * @param start. The start of the ColumnSlice inclusive
+ * @param finish. The end of the ColumnSlice inclusive
+ */
+struct ColumnSlice {
+    1: optional binary start,
+    2: optional binary finish
+}
+
+/**
+ * Used to perform multiple slices on a single row key in one rpc operation
+ * @param key. The row key to be multi sliced
+ * @param column_parent. The column family (super columns are unsupported)
+ * @param column_slices. 0 to many ColumnSlice objects each will be used to select columns
+ * @param reversed. Direction of slice
+ * @param count. Maximum number of columns
+ * @param consistency_level. Level to perform the operation at
+ */
+struct MultiSliceRequest {
+    1: optional binary key,
+    2: optional ColumnParent column_parent,
+    3: optional list<ColumnSlice> column_slices,
+    4: optional bool reversed=false,
+    5: optional i32 count=1000,
+    6: optional ConsistencyLevel consistency_level=ConsistencyLevel.ONE
+}
+
 service Cassandra {
   # auth methods
   void login(1: required AuthenticationRequest auth_request) throws (1:AuthenticationException authnx, 2:AuthorizationException authzx),
@@ -741,7 +770,11 @@ service Cassandra {
   void truncate(1:required string cfname)
        throws (1: InvalidRequestException ire, 2: UnavailableException ue, 3: TimedOutException te),
 
-
+  /**
+  * Select multiple slices of a key in a single RPC operation
+  */
+  list<ColumnOrSuperColumn> get_multi_slice(1:required MultiSliceRequest request)
+       throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
     
   // Meta-APIs -- APIs to get information about the node or cluster,
   // rather than user data.  The nodeprobe program provides usage examples.