diff --git a/build.xml b/build.xml
index 437674fd72..65b752c328 100644
--- a/build.xml
+++ b/build.xml
@@ -399,6 +399,7 @@
+
@@ -479,6 +480,7 @@
artifactId="cassandra-parent"
version="${version}"/>
+
@@ -503,6 +505,7 @@
artifactId="cassandra-parent"
version="${version}"/>
+
diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift
index fac1d1e00c..105e782bcd 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.1.0-pt1"
+const string VERSION = "20.1.0-pt2"
#
@@ -600,6 +600,15 @@ struct MultiSliceRequest {
6: optional ConsistencyLevel consistency_level=ConsistencyLevel.ONE
}
+/**
+ * A pair of a row (key) and selection of columns, used in calls to multiget_multislice() specifying which rows should
+ * be queried and which columns within said rows.
+ */
+struct KeyPredicate {
+ 1: optional binary key,
+ 2: optional SlicePredicate predicate,
+}
+
service Cassandra {
# auth methods
void login(1: required AuthenticationRequest auth_request) throws (1:AuthenticationException authnx, 2:AuthorizationException authzx),
@@ -649,11 +658,21 @@ service Cassandra {
/**
Performs multiple get_slice commands in parallel for the given column_parent. Differently from multiget_slice,
- users may specify a distinct SlicePredicate
for each key in the request
.
+ users may specify more than one KeyPredicate
for each distinct key in the request
.
+
+ Each list of ColumnOrSuperColumn
present in the list associated with a specific key in the result
+ map corresponds to the result of a get_slice for one of the KeyPredicate
s provided that matches
+ that key.
+
+ If there is more than one KeyPredicate
associated with a specific key, we require that the types
+ of associated SlicePredicate
s are of the same type (where type is defined as named columns,
+ slice range or reversed slice range).
+
+ We also do not make guarantees on the ordering of the lists for each key.
*/
- map> multiget_multislice(1:required map request,
- 2:required ColumnParent column_parent,
- 3:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
+ map>> multiget_multislice(1:required list request,
+ 2:required ColumnParent column_parent,
+ 3:required ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
/**
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
index f8b80179c6..2afff728e7 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
@@ -6,7 +6,7 @@
*/
package org.apache.cassandra.thrift;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -14,19 +14,18 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
-
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
@@ -106,13 +105,23 @@ public interface Iface {
/**
* Performs multiple get_slice commands in parallel for the given column_parent. Differently from multiget_slice,
- * users may specify a distinct SlicePredicate
for each key in the request
.
+ * users may specify more than one KeyPredicate
for each distinct key in the request
.
+ *
+ * Each list of ColumnOrSuperColumn
present in the list associated with a specific key in the result
+ * map corresponds to the result of a get_slice for one of the KeyPredicate
s provided that matches
+ * that key.
+ *
+ * If there is more than one KeyPredicate
associated with a specific key, we require that the types
+ * of associated SlicePredicate
s are of the same type (where type is defined as named columns,
+ * slice range or reversed slice range).
+ *
+ * We also do not make guarantees on the ordering of the lists for each key.
*
* @param request
* @param column_parent
* @param consistency_level
*/
- public Map> multiget_multislice(Map request, ColumnParent column_parent, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException;
+ public Map>> multiget_multislice(List request, ColumnParent column_parent, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException;
/**
* Perform a get_count in parallel on the given list keys. The return value maps keys to the count found.
@@ -492,7 +501,7 @@ public interface AsyncIface {
public void multiget_slice(List keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void multiget_multislice(Map request, ColumnParent column_parent, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void multiget_multislice(List request, ColumnParent column_parent, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void multiget_count(List keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -787,13 +796,13 @@ public Map> recv_multiget_slice() throws In
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "multiget_slice failed: unknown result");
}
- public Map> multiget_multislice(Map request, ColumnParent column_parent, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
+ public Map>> multiget_multislice(List request, ColumnParent column_parent, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
{
send_multiget_multislice(request, column_parent, consistency_level);
return recv_multiget_multislice();
}
- public void send_multiget_multislice(Map request, ColumnParent column_parent, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
+ public void send_multiget_multislice(List request, ColumnParent column_parent, ConsistencyLevel consistency_level) throws org.apache.thrift.TException
{
multiget_multislice_args args = new multiget_multislice_args();
args.setRequest(request);
@@ -802,7 +811,7 @@ public void send_multiget_multislice(Map request, Col
sendBase("multiget_multislice", args);
}
- public Map> recv_multiget_multislice() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
+ public Map>> recv_multiget_multislice() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
{
multiget_multislice_result result = new multiget_multislice_result();
receiveBase(result, "multiget_multislice");
@@ -2246,7 +2255,7 @@ public Map> getResult() throws InvalidReque
}
}
- public void multiget_multislice(Map request, ColumnParent column_parent, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void multiget_multislice(List request, ColumnParent column_parent, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
multiget_multislice_call method_call = new multiget_multislice_call(request, column_parent, consistency_level, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
@@ -2254,10 +2263,10 @@ public void multiget_multislice(Map request, ColumnPa
}
public static class multiget_multislice_call extends org.apache.thrift.async.TAsyncMethodCall {
- private Map request;
+ private List request;
private ColumnParent column_parent;
private ConsistencyLevel consistency_level;
- public multiget_multislice_call(Map request, ColumnParent column_parent, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public multiget_multislice_call(List request, ColumnParent column_parent, ConsistencyLevel consistency_level, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.request = request;
this.column_parent = column_parent;
@@ -2274,7 +2283,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa
prot.writeMessageEnd();
}
- public Map> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException {
+ public Map>> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
@@ -5428,7 +5437,7 @@ public void start(I iface, multiget_slice_args args, org.apache.thrift.async.Asy
}
}
- public static class multiget_multislice extends org.apache.thrift.AsyncProcessFunction>> {
+ public static class multiget_multislice extends org.apache.thrift.AsyncProcessFunction>>> {
public multiget_multislice() {
super("multiget_multislice");
}
@@ -5437,10 +5446,10 @@ public multiget_multislice_args getEmptyArgsInstance() {
return new multiget_multislice_args();
}
- public AsyncMethodCallback