You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ja...@apache.org on 2014/05/28 19:58:58 UTC
[4/6] git commit: Backport MultiSliceRequest
Backport MultiSliceRequest
Patch by Ed Capriolo; Reviewed by tjake for CASSANDRA-7027
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7f63b1f9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7f63b1f9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7f63b1f9
Branch: refs/heads/trunk
Commit: 7f63b1f958f0f502f04d24f8d820d29bd484786d
Parents: 4a295b6
Author: Jake Luciani <ja...@apache.org>
Authored: Tue May 27 11:27:17 2014 -0400
Committer: Jake Luciani <ja...@apache.org>
Committed: Wed May 28 12:50:35 2014 -0400
----------------------------------------------------------------------
CHANGES.txt | 1 +
interface/cassandra.thrift | 35 +-
.../org/apache/cassandra/thrift/Cassandra.java | 3071 +++++++++++++-----
.../org/apache/cassandra/thrift/CfDef.java | 298 +-
.../apache/cassandra/thrift/ColumnSlice.java | 551 ++++
.../org/apache/cassandra/thrift/CqlRow.java | 7 +-
.../cassandra/thrift/MultiSliceRequest.java | 1042 ++++++
.../cassandra/thrift/CassandraServer.java | 68 +
.../apache/cassandra/thrift/MultiSliceTest.java | 149 +
9 files changed, 4174 insertions(+), 1048 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/7f63b1f9/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a71867a..a7cc872 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -25,6 +25,7 @@
* Fix broken paging state with prepared statement (CASSANDRA-7120)
* Fix IllegalArgumentException in CqlStorage (CASSANDRA-7287)
* Allow nulls/non-existant fields in UDT (CASSANDRA-7206)
+ * Backport Thrift MultiSliceRequest (CASSANDRA-7027)
Merged from 2.0:
* Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
* Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/7f63b1f9/interface/cassandra.thrift
----------------------------------------------------------------------
diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift
index 4beb2eb..2484a5d 100644
--- a/interface/cassandra.thrift
+++ b/interface/cassandra.thrift
@@ -117,7 +117,6 @@ struct ColumnOrSuperColumn {
4: optional CounterSuperColumn counter_super_column
}
-
#
# Exceptions
# (note that internal server errors will raise a TApplicationException, courtesy of Thrift)
@@ -571,6 +570,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),
@@ -749,6 +777,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,