Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
Backport MultiSliceRequest
Browse files Browse the repository at this point in the history
Patch by Ed Capriolo; Reviewed by tjake for CASSANDRA-7027
  • Loading branch information
tjake committed May 28, 2014
1 parent 4a295b6 commit 7f63b1f
Show file tree
Hide file tree
Showing 9 changed files with 4,174 additions and 1,048 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -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)
Expand Down
35 changes: 34 additions & 1 deletion interface/cassandra.thrift
Expand Up @@ -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)
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand Down
3,071 changes: 2,168 additions & 903 deletions interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java

Large diffs are not rendered by default.

298 changes: 155 additions & 143 deletions interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java

Large diffs are not rendered by default.

0 comments on commit 7f63b1f

Please sign in to comment.