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 2012/10/20 01:31:30 UTC
[2/4] git commit: add describe_splits_ex providing improved split
size estimate patch by Piotr Kolaczkowski;
reviewed by jbellis for CASSANDRA-4803
add describe_splits_ex providing improved split size estimate
patch by Piotr Kolaczkowski; reviewed by jbellis for CASSANDRA-4803
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/533bf3f6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/533bf3f6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/533bf3f6
Branch: refs/heads/cassandra-1.1
Commit: 533bf3f6a8c3a1802c5a88a79dba34027a60075a
Parents: 0bb3a06
Author: Jonathan Ellis <jb...@apache.org>
Authored: Fri Oct 19 18:06:52 2012 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Fri Oct 19 18:07:47 2012 -0500
----------------------------------------------------------------------
interface/cassandra.thrift | 14 +-
.../org/apache/cassandra/thrift/Cassandra.java | 1529 +++++++++++++--
.../org/apache/cassandra/thrift/CfSplit.java | 549 ++++++
.../org/apache/cassandra/thrift/Constants.java | 2 +-
.../cassandra/hadoop/ColumnFamilyInputFormat.java | 36 +-
.../cassandra/hadoop/ColumnFamilyRecordReader.java | 11 +-
.../apache/cassandra/hadoop/ColumnFamilySplit.java | 14 +-
.../apache/cassandra/service/StorageService.java | 49 +-
.../apache/cassandra/thrift/CassandraServer.java | 31 +-
9 files changed, 1991 insertions(+), 244 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/533bf3f6/interface/cassandra.thrift
----------------------------------------------------------------------
diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift
index 6df9628..bf73c4f 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 = "19.32.0"
+const string VERSION = "19.33.0"
#
@@ -501,6 +501,12 @@ struct CqlPreparedResult {
4: optional list<string> variable_names
}
+/** Represents input splits used by hadoop ColumnFamilyRecordReaders */
+struct CfSplit {
+ 1: required string start_token,
+ 2: required string end_token,
+ 3: required i64 row_count
+}
service Cassandra {
# auth methods
@@ -709,6 +715,12 @@ service Cassandra {
4:required i32 keys_per_split)
throws (1:InvalidRequestException ire),
+ list<CfSplit> describe_splits_ex(1:required string cfName,
+ 2:required string start_token,
+ 3:required string end_token,
+ 4:required i32 keys_per_split)
+ throws (1:InvalidRequestException ire),
+
/** adds a column family. returns the new schema id. */
string system_add_column_family(1:required CfDef cf_def)
throws (1:InvalidRequestException ire, 2:SchemaDisagreementException sde),
http://git-wip-us.apache.org/repos/asf/cassandra/blob/533bf3f6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
----------------------------------------------------------------------
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 1c6ec69..c759610 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
@@ -273,6 +273,8 @@ public class Cassandra {
*/
public List<String> describe_splits(String cfName, String start_token, String end_token, int keys_per_split) throws InvalidRequestException, org.apache.thrift.TException;
+ public List<CfSplit> describe_splits_ex(String cfName, String start_token, String end_token, int keys_per_split) throws InvalidRequestException, org.apache.thrift.TException;
+
/**
* adds a column family. returns the new schema id.
*
@@ -402,6 +404,8 @@ public class Cassandra {
public void describe_splits(String cfName, String start_token, String end_token, int keys_per_split, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.describe_splits_call> resultHandler) throws org.apache.thrift.TException;
+ public void describe_splits_ex(String cfName, String start_token, String end_token, int keys_per_split, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.describe_splits_ex_call> resultHandler) throws org.apache.thrift.TException;
+
public void system_add_column_family(CfDef cf_def, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.system_add_column_family_call> resultHandler) throws org.apache.thrift.TException;
public void system_drop_column_family(String column_family, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.system_drop_column_family_call> resultHandler) throws org.apache.thrift.TException;
@@ -1208,6 +1212,35 @@ public class Cassandra {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "describe_splits failed: unknown result");
}
+ public List<CfSplit> describe_splits_ex(String cfName, String start_token, String end_token, int keys_per_split) throws InvalidRequestException, org.apache.thrift.TException
+ {
+ send_describe_splits_ex(cfName, start_token, end_token, keys_per_split);
+ return recv_describe_splits_ex();
+ }
+
+ public void send_describe_splits_ex(String cfName, String start_token, String end_token, int keys_per_split) throws org.apache.thrift.TException
+ {
+ describe_splits_ex_args args = new describe_splits_ex_args();
+ args.setCfName(cfName);
+ args.setStart_token(start_token);
+ args.setEnd_token(end_token);
+ args.setKeys_per_split(keys_per_split);
+ sendBase("describe_splits_ex", args);
+ }
+
+ public List<CfSplit> recv_describe_splits_ex() throws InvalidRequestException, org.apache.thrift.TException
+ {
+ describe_splits_ex_result result = new describe_splits_ex_result();
+ receiveBase(result, "describe_splits_ex");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "describe_splits_ex failed: unknown result");
+ }
+
public String system_add_column_family(CfDef cf_def) throws InvalidRequestException, SchemaDisagreementException, org.apache.thrift.TException
{
send_system_add_column_family(cf_def);
@@ -2447,6 +2480,47 @@ public class Cassandra {
}
}
+ public void describe_splits_ex(String cfName, String start_token, String end_token, int keys_per_split, org.apache.thrift.async.AsyncMethodCallback<describe_splits_ex_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ describe_splits_ex_call method_call = new describe_splits_ex_call(cfName, start_token, end_token, keys_per_split, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class describe_splits_ex_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String cfName;
+ private String start_token;
+ private String end_token;
+ private int keys_per_split;
+ public describe_splits_ex_call(String cfName, String start_token, String end_token, int keys_per_split, org.apache.thrift.async.AsyncMethodCallback<describe_splits_ex_call> 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.cfName = cfName;
+ this.start_token = start_token;
+ this.end_token = end_token;
+ this.keys_per_split = keys_per_split;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("describe_splits_ex", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ describe_splits_ex_args args = new describe_splits_ex_args();
+ args.setCfName(cfName);
+ args.setStart_token(start_token);
+ args.setEnd_token(end_token);
+ args.setKeys_per_split(keys_per_split);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<CfSplit> getResult() throws InvalidRequestException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_describe_splits_ex();
+ }
+ }
+
public void system_add_column_family(CfDef cf_def, org.apache.thrift.async.AsyncMethodCallback<system_add_column_family_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
system_add_column_family_call method_call = new system_add_column_family_call(cf_def, resultHandler, this, ___protocolFactory, ___transport);
@@ -2815,6 +2889,7 @@ public class Cassandra {
processMap.put("describe_snitch", new describe_snitch());
processMap.put("describe_keyspace", new describe_keyspace());
processMap.put("describe_splits", new describe_splits());
+ processMap.put("describe_splits_ex", new describe_splits_ex());
processMap.put("system_add_column_family", new system_add_column_family());
processMap.put("system_drop_column_family", new system_drop_column_family());
processMap.put("system_add_keyspace", new system_add_keyspace());
@@ -3395,6 +3470,26 @@ public class Cassandra {
}
}
+ private static class describe_splits_ex<I extends Iface> extends org.apache.thrift.ProcessFunction<I, describe_splits_ex_args> {
+ public describe_splits_ex() {
+ super("describe_splits_ex");
+ }
+
+ protected describe_splits_ex_args getEmptyArgsInstance() {
+ return new describe_splits_ex_args();
+ }
+
+ protected describe_splits_ex_result getResult(I iface, describe_splits_ex_args args) throws org.apache.thrift.TException {
+ describe_splits_ex_result result = new describe_splits_ex_result();
+ try {
+ result.success = iface.describe_splits_ex(args.cfName, args.start_token, args.end_token, args.keys_per_split);
+ } catch (InvalidRequestException ire) {
+ result.ire = ire;
+ }
+ return result;
+ }
+ }
+
private static class system_add_column_family<I extends Iface> extends org.apache.thrift.ProcessFunction<I, system_add_column_family_args> {
public system_add_column_family() {
super("system_add_column_family");
@@ -17817,6 +17912,8 @@ public class Cassandra {
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bit_vector = new BitSet(1);
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
@@ -26113,9 +26210,1055 @@ public class Cassandra {
break;
}
switch (field.id) {
- case 1: // KEYSPACE
+ case 1: // KEYSPACE
+ if (field.type == org.apache.thrift.protocol.TType.STRING) {
+ this.keyspace = iprot.readString();
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.keyspace != null) {
+ oprot.writeFieldBegin(KEYSPACE_FIELD_DESC);
+ oprot.writeString(this.keyspace);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("describe_keyspace_args(");
+ boolean first = true;
+
+ sb.append("keyspace:");
+ if (this.keyspace == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.keyspace);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (keyspace == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString());
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ }
+
+ public static class describe_keyspace_result implements org.apache.thrift.TBase<describe_keyspace_result, describe_keyspace_result._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_keyspace_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
+ private static final org.apache.thrift.protocol.TField NFE_FIELD_DESC = new org.apache.thrift.protocol.TField("nfe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+
+ public KsDef success; // required
+ public NotFoundException nfe; // required
+ public InvalidRequestException ire; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ NFE((short)1, "nfe"),
+ IRE((short)2, "ire");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // NFE
+ return NFE;
+ case 2: // IRE
+ return IRE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, KsDef.class)));
+ tmpMap.put(_Fields.NFE, new org.apache.thrift.meta_data.FieldMetaData("nfe", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_keyspace_result.class, metaDataMap);
+ }
+
+ public describe_keyspace_result() {
+ }
+
+ public describe_keyspace_result(
+ KsDef success,
+ NotFoundException nfe,
+ InvalidRequestException ire)
+ {
+ this();
+ this.success = success;
+ this.nfe = nfe;
+ this.ire = ire;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public describe_keyspace_result(describe_keyspace_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new KsDef(other.success);
+ }
+ if (other.isSetNfe()) {
+ this.nfe = new NotFoundException(other.nfe);
+ }
+ if (other.isSetIre()) {
+ this.ire = new InvalidRequestException(other.ire);
+ }
+ }
+
+ public describe_keyspace_result deepCopy() {
+ return new describe_keyspace_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.nfe = null;
+ this.ire = null;
+ }
+
+ public KsDef getSuccess() {
+ return this.success;
+ }
+
+ public describe_keyspace_result setSuccess(KsDef success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public NotFoundException getNfe() {
+ return this.nfe;
+ }
+
+ public describe_keyspace_result setNfe(NotFoundException nfe) {
+ this.nfe = nfe;
+ return this;
+ }
+
+ public void unsetNfe() {
+ this.nfe = null;
+ }
+
+ /** Returns true if field nfe is set (has been assigned a value) and false otherwise */
+ public boolean isSetNfe() {
+ return this.nfe != null;
+ }
+
+ public void setNfeIsSet(boolean value) {
+ if (!value) {
+ this.nfe = null;
+ }
+ }
+
+ public InvalidRequestException getIre() {
+ return this.ire;
+ }
+
+ public describe_keyspace_result setIre(InvalidRequestException ire) {
+ this.ire = ire;
+ return this;
+ }
+
+ public void unsetIre() {
+ this.ire = null;
+ }
+
+ /** Returns true if field ire is set (has been assigned a value) and false otherwise */
+ public boolean isSetIre() {
+ return this.ire != null;
+ }
+
+ public void setIreIsSet(boolean value) {
+ if (!value) {
+ this.ire = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((KsDef)value);
+ }
+ break;
+
+ case NFE:
+ if (value == null) {
+ unsetNfe();
+ } else {
+ setNfe((NotFoundException)value);
+ }
+ break;
+
+ case IRE:
+ if (value == null) {
+ unsetIre();
+ } else {
+ setIre((InvalidRequestException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case NFE:
+ return getNfe();
+
+ case IRE:
+ return getIre();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case NFE:
+ return isSetNfe();
+ case IRE:
+ return isSetIre();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof describe_keyspace_result)
+ return this.equals((describe_keyspace_result)that);
+ return false;
+ }
+
+ public boolean equals(describe_keyspace_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_nfe = true && this.isSetNfe();
+ boolean that_present_nfe = true && that.isSetNfe();
+ if (this_present_nfe || that_present_nfe) {
+ if (!(this_present_nfe && that_present_nfe))
+ return false;
+ if (!this.nfe.equals(that.nfe))
+ return false;
+ }
+
+ boolean this_present_ire = true && this.isSetIre();
+ boolean that_present_ire = true && that.isSetIre();
+ if (this_present_ire || that_present_ire) {
+ if (!(this_present_ire && that_present_ire))
+ return false;
+ if (!this.ire.equals(that.ire))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_success = true && (isSetSuccess());
+ builder.append(present_success);
+ if (present_success)
+ builder.append(success);
+
+ boolean present_nfe = true && (isSetNfe());
+ builder.append(present_nfe);
+ if (present_nfe)
+ builder.append(nfe);
+
+ boolean present_ire = true && (isSetIre());
+ builder.append(present_ire);
+ if (present_ire)
+ builder.append(ire);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(describe_keyspace_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ describe_keyspace_result typedOther = (describe_keyspace_result)other;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNfe()).compareTo(typedOther.isSetNfe());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNfe()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nfe, typedOther.nfe);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIre()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, typedOther.ire);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (field.id) {
+ case 0: // SUCCESS
+ if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
+ this.success = new KsDef();
+ this.success.read(iprot);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 1: // NFE
+ if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
+ this.nfe = new NotFoundException();
+ this.nfe.read(iprot);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 2: // IRE
+ if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
+ this.ire = new InvalidRequestException();
+ this.ire.read(iprot);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ if (this.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ this.success.write(oprot);
+ oprot.writeFieldEnd();
+ } else if (this.isSetNfe()) {
+ oprot.writeFieldBegin(NFE_FIELD_DESC);
+ this.nfe.write(oprot);
+ oprot.writeFieldEnd();
+ } else if (this.isSetIre()) {
+ oprot.writeFieldBegin(IRE_FIELD_DESC);
+ this.ire.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("describe_keyspace_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("nfe:");
+ if (this.nfe == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nfe);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ire:");
+ if (this.ire == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ire);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ }
+
+ public static class describe_splits_args implements org.apache.thrift.TBase<describe_splits_args, describe_splits_args._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_splits_args");
+
+ private static final org.apache.thrift.protocol.TField CF_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("cfName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField START_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("start_token", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField END_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("end_token", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField KEYS_PER_SPLIT_FIELD_DESC = new org.apache.thrift.protocol.TField("keys_per_split", org.apache.thrift.protocol.TType.I32, (short)4);
+
+ public String cfName; // required
+ public String start_token; // required
+ public String end_token; // required
+ public int keys_per_split; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ CF_NAME((short)1, "cfName"),
+ START_TOKEN((short)2, "start_token"),
+ END_TOKEN((short)3, "end_token"),
+ KEYS_PER_SPLIT((short)4, "keys_per_split");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // CF_NAME
+ return CF_NAME;
+ case 2: // START_TOKEN
+ return START_TOKEN;
+ case 3: // END_TOKEN
+ return END_TOKEN;
+ case 4: // KEYS_PER_SPLIT
+ return KEYS_PER_SPLIT;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __KEYS_PER_SPLIT_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
+
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.CF_NAME, new org.apache.thrift.meta_data.FieldMetaData("cfName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.START_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("start_token", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.END_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("end_token", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.KEYS_PER_SPLIT, new org.apache.thrift.meta_data.FieldMetaData("keys_per_split", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_splits_args.class, metaDataMap);
+ }
+
+ public describe_splits_args() {
+ }
+
+ public describe_splits_args(
+ String cfName,
+ String start_token,
+ String end_token,
+ int keys_per_split)
+ {
+ this();
+ this.cfName = cfName;
+ this.start_token = start_token;
+ this.end_token = end_token;
+ this.keys_per_split = keys_per_split;
+ setKeys_per_splitIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public describe_splits_args(describe_splits_args other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ if (other.isSetCfName()) {
+ this.cfName = other.cfName;
+ }
+ if (other.isSetStart_token()) {
+ this.start_token = other.start_token;
+ }
+ if (other.isSetEnd_token()) {
+ this.end_token = other.end_token;
+ }
+ this.keys_per_split = other.keys_per_split;
+ }
+
+ public describe_splits_args deepCopy() {
+ return new describe_splits_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.cfName = null;
+ this.start_token = null;
+ this.end_token = null;
+ setKeys_per_splitIsSet(false);
+ this.keys_per_split = 0;
+ }
+
+ public String getCfName() {
+ return this.cfName;
+ }
+
+ public describe_splits_args setCfName(String cfName) {
+ this.cfName = cfName;
+ return this;
+ }
+
+ public void unsetCfName() {
+ this.cfName = null;
+ }
+
+ /** Returns true if field cfName is set (has been assigned a value) and false otherwise */
+ public boolean isSetCfName() {
+ return this.cfName != null;
+ }
+
+ public void setCfNameIsSet(boolean value) {
+ if (!value) {
+ this.cfName = null;
+ }
+ }
+
+ public String getStart_token() {
+ return this.start_token;
+ }
+
+ public describe_splits_args setStart_token(String start_token) {
+ this.start_token = start_token;
+ return this;
+ }
+
+ public void unsetStart_token() {
+ this.start_token = null;
+ }
+
+ /** Returns true if field start_token is set (has been assigned a value) and false otherwise */
+ public boolean isSetStart_token() {
+ return this.start_token != null;
+ }
+
+ public void setStart_tokenIsSet(boolean value) {
+ if (!value) {
+ this.start_token = null;
+ }
+ }
+
+ public String getEnd_token() {
+ return this.end_token;
+ }
+
+ public describe_splits_args setEnd_token(String end_token) {
+ this.end_token = end_token;
+ return this;
+ }
+
+ public void unsetEnd_token() {
+ this.end_token = null;
+ }
+
+ /** Returns true if field end_token is set (has been assigned a value) and false otherwise */
+ public boolean isSetEnd_token() {
+ return this.end_token != null;
+ }
+
+ public void setEnd_tokenIsSet(boolean value) {
+ if (!value) {
+ this.end_token = null;
+ }
+ }
+
+ public int getKeys_per_split() {
+ return this.keys_per_split;
+ }
+
+ public describe_splits_args setKeys_per_split(int keys_per_split) {
+ this.keys_per_split = keys_per_split;
+ setKeys_per_splitIsSet(true);
+ return this;
+ }
+
+ public void unsetKeys_per_split() {
+ __isset_bit_vector.clear(__KEYS_PER_SPLIT_ISSET_ID);
+ }
+
+ /** Returns true if field keys_per_split is set (has been assigned a value) and false otherwise */
+ public boolean isSetKeys_per_split() {
+ return __isset_bit_vector.get(__KEYS_PER_SPLIT_ISSET_ID);
+ }
+
+ public void setKeys_per_splitIsSet(boolean value) {
+ __isset_bit_vector.set(__KEYS_PER_SPLIT_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case CF_NAME:
+ if (value == null) {
+ unsetCfName();
+ } else {
+ setCfName((String)value);
+ }
+ break;
+
+ case START_TOKEN:
+ if (value == null) {
+ unsetStart_token();
+ } else {
+ setStart_token((String)value);
+ }
+ break;
+
+ case END_TOKEN:
+ if (value == null) {
+ unsetEnd_token();
+ } else {
+ setEnd_token((String)value);
+ }
+ break;
+
+ case KEYS_PER_SPLIT:
+ if (value == null) {
+ unsetKeys_per_split();
+ } else {
+ setKeys_per_split((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case CF_NAME:
+ return getCfName();
+
+ case START_TOKEN:
+ return getStart_token();
+
+ case END_TOKEN:
+ return getEnd_token();
+
+ case KEYS_PER_SPLIT:
+ return Integer.valueOf(getKeys_per_split());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case CF_NAME:
+ return isSetCfName();
+ case START_TOKEN:
+ return isSetStart_token();
+ case END_TOKEN:
+ return isSetEnd_token();
+ case KEYS_PER_SPLIT:
+ return isSetKeys_per_split();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof describe_splits_args)
+ return this.equals((describe_splits_args)that);
+ return false;
+ }
+
+ public boolean equals(describe_splits_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_cfName = true && this.isSetCfName();
+ boolean that_present_cfName = true && that.isSetCfName();
+ if (this_present_cfName || that_present_cfName) {
+ if (!(this_present_cfName && that_present_cfName))
+ return false;
+ if (!this.cfName.equals(that.cfName))
+ return false;
+ }
+
+ boolean this_present_start_token = true && this.isSetStart_token();
+ boolean that_present_start_token = true && that.isSetStart_token();
+ if (this_present_start_token || that_present_start_token) {
+ if (!(this_present_start_token && that_present_start_token))
+ return false;
+ if (!this.start_token.equals(that.start_token))
+ return false;
+ }
+
+ boolean this_present_end_token = true && this.isSetEnd_token();
+ boolean that_present_end_token = true && that.isSetEnd_token();
+ if (this_present_end_token || that_present_end_token) {
+ if (!(this_present_end_token && that_present_end_token))
+ return false;
+ if (!this.end_token.equals(that.end_token))
+ return false;
+ }
+
+ boolean this_present_keys_per_split = true;
+ boolean that_present_keys_per_split = true;
+ if (this_present_keys_per_split || that_present_keys_per_split) {
+ if (!(this_present_keys_per_split && that_present_keys_per_split))
+ return false;
+ if (this.keys_per_split != that.keys_per_split)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_cfName = true && (isSetCfName());
+ builder.append(present_cfName);
+ if (present_cfName)
+ builder.append(cfName);
+
+ boolean present_start_token = true && (isSetStart_token());
+ builder.append(present_start_token);
+ if (present_start_token)
+ builder.append(start_token);
+
+ boolean present_end_token = true && (isSetEnd_token());
+ builder.append(present_end_token);
+ if (present_end_token)
+ builder.append(end_token);
+
+ boolean present_keys_per_split = true;
+ builder.append(present_keys_per_split);
+ if (present_keys_per_split)
+ builder.append(keys_per_split);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(describe_splits_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ describe_splits_args typedOther = (describe_splits_args)other;
+
+ lastComparison = Boolean.valueOf(isSetCfName()).compareTo(typedOther.isSetCfName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCfName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cfName, typedOther.cfName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetStart_token()).compareTo(typedOther.isSetStart_token());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStart_token()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start_token, typedOther.start_token);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetEnd_token()).compareTo(typedOther.isSetEnd_token());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEnd_token()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.end_token, typedOther.end_token);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetKeys_per_split()).compareTo(typedOther.isSetKeys_per_split());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetKeys_per_split()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keys_per_split, typedOther.keys_per_split);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (field.id) {
+ case 1: // CF_NAME
if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.keyspace = iprot.readString();
+ this.cfName = iprot.readString();
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 2: // START_TOKEN
+ if (field.type == org.apache.thrift.protocol.TType.STRING) {
+ this.start_token = iprot.readString();
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 3: // END_TOKEN
+ if (field.type == org.apache.thrift.protocol.TType.STRING) {
+ this.end_token = iprot.readString();
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 4: // KEYS_PER_SPLIT
+ if (field.type == org.apache.thrift.protocol.TType.I32) {
+ this.keys_per_split = iprot.readI32();
+ setKeys_per_splitIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
@@ -26128,6 +27271,9 @@ public class Cassandra {
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
+ if (!isSetKeys_per_split()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'keys_per_split' was not found in serialized data! Struct: " + toString());
+ }
validate();
}
@@ -26135,36 +27281,76 @@ public class Cassandra {
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.keyspace != null) {
- oprot.writeFieldBegin(KEYSPACE_FIELD_DESC);
- oprot.writeString(this.keyspace);
+ if (this.cfName != null) {
+ oprot.writeFieldBegin(CF_NAME_FIELD_DESC);
+ oprot.writeString(this.cfName);
+ oprot.writeFieldEnd();
+ }
+ if (this.start_token != null) {
+ oprot.writeFieldBegin(START_TOKEN_FIELD_DESC);
+ oprot.writeString(this.start_token);
+ oprot.writeFieldEnd();
+ }
+ if (this.end_token != null) {
+ oprot.writeFieldBegin(END_TOKEN_FIELD_DESC);
+ oprot.writeString(this.end_token);
oprot.writeFieldEnd();
}
+ oprot.writeFieldBegin(KEYS_PER_SPLIT_FIELD_DESC);
+ oprot.writeI32(this.keys_per_split);
+ oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("describe_keyspace_args(");
+ StringBuilder sb = new StringBuilder("describe_splits_args(");
boolean first = true;
- sb.append("keyspace:");
- if (this.keyspace == null) {
+ sb.append("cfName:");
+ if (this.cfName == null) {
sb.append("null");
} else {
- sb.append(this.keyspace);
+ sb.append(this.cfName);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("start_token:");
+ if (this.start_token == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.start_token);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("end_token:");
+ if (this.end_token == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.end_token);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("keys_per_split:");
+ sb.append(this.keys_per_split);
+ first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
- if (keyspace == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyspace' was not present! Struct: " + toString());
+ if (cfName == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'cfName' was not present! Struct: " + toString());
+ }
+ if (start_token == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'start_token' was not present! Struct: " + toString());
+ }
+ if (end_token == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'end_token' was not present! Struct: " + toString());
}
+ // alas, we cannot check 'keys_per_split' because it's a primitive and you chose the non-beans generator.
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -26177,6 +27363,8 @@ public class Cassandra {
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bit_vector = new BitSet(1);
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
@@ -26185,22 +27373,19 @@ public class Cassandra {
}
- public static class describe_keyspace_result implements org.apache.thrift.TBase<describe_keyspace_result, describe_keyspace_result._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_keyspace_result");
+ public static class describe_splits_result implements org.apache.thrift.TBase<describe_splits_result, describe_splits_result._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_splits_result");
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
- private static final org.apache.thrift.protocol.TField NFE_FIELD_DESC = new org.apache.thrift.protocol.TField("nfe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+ private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- public KsDef success; // required
- public NotFoundException nfe; // required
+ public List<String> success; // required
public InvalidRequestException ire; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
- NFE((short)1, "nfe"),
- IRE((short)2, "ire");
+ IRE((short)1, "ire");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -26217,9 +27402,7 @@ public class Cassandra {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
- case 1: // NFE
- return NFE;
- case 2: // IRE
+ case 1: // IRE
return IRE;
default:
return null;
@@ -26266,60 +27449,72 @@ public class Cassandra {
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, KsDef.class)));
- tmpMap.put(_Fields.NFE, new org.apache.thrift.meta_data.FieldMetaData("nfe", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_keyspace_result.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_splits_result.class, metaDataMap);
}
- public describe_keyspace_result() {
+ public describe_splits_result() {
}
- public describe_keyspace_result(
- KsDef success,
- NotFoundException nfe,
+ public describe_splits_result(
+ List<String> success,
InvalidRequestException ire)
{
this();
this.success = success;
- this.nfe = nfe;
this.ire = ire;
}
/**
* Performs a deep copy on <i>other</i>.
*/
- public describe_keyspace_result(describe_keyspace_result other) {
+ public describe_splits_result(describe_splits_result other) {
if (other.isSetSuccess()) {
- this.success = new KsDef(other.success);
- }
- if (other.isSetNfe()) {
- this.nfe = new NotFoundException(other.nfe);
+ List<String> __this__success = new ArrayList<String>();
+ for (String other_element : other.success) {
+ __this__success.add(other_element);
+ }
+ this.success = __this__success;
}
if (other.isSetIre()) {
this.ire = new InvalidRequestException(other.ire);
}
}
- public describe_keyspace_result deepCopy() {
- return new describe_keyspace_result(this);
+ public describe_splits_result deepCopy() {
+ return new describe_splits_result(this);
}
@Override
public void clear() {
this.success = null;
- this.nfe = null;
this.ire = null;
}
- public KsDef getSuccess() {
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<String> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(String elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<String>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<String> getSuccess() {
return this.success;
}
- public describe_keyspace_result setSuccess(KsDef success) {
+ public describe_splits_result setSuccess(List<String> success) {
this.success = success;
return this;
}
@@ -26339,35 +27534,11 @@ public class Cassandra {
}
}
- public NotFoundException getNfe() {
- return this.nfe;
- }
-
- public describe_keyspace_result setNfe(NotFoundException nfe) {
- this.nfe = nfe;
- return this;
- }
-
- public void unsetNfe() {
- this.nfe = null;
- }
-
- /** Returns true if field nfe is set (has been assigned a value) and false otherwise */
- public boolean isSetNfe() {
- return this.nfe != null;
- }
-
- public void setNfeIsSet(boolean value) {
- if (!value) {
- this.nfe = null;
- }
- }
-
public InvalidRequestException getIre() {
return this.ire;
}
- public describe_keyspace_result setIre(InvalidRequestException ire) {
+ public describe_splits_result setIre(InvalidRequestException ire) {
this.ire = ire;
return this;
}
@@ -26393,15 +27564,7 @@ public class Cassandra {
if (value == null) {
unsetSuccess();
} else {
- setSuccess((KsDef)value);
- }
- break;
-
- case NFE:
- if (value == null) {
- unsetNfe();
- } else {
- setNfe((NotFoundException)value);
+ setSuccess((List<String>)value);
}
break;
@@ -26421,9 +27584,6 @@ public class Cassandra {
case SUCCESS:
return getSuccess();
- case NFE:
- return getNfe();
-
case IRE:
return getIre();
@@ -26440,8 +27600,6 @@ public class Cassandra {
switch (field) {
case SUCCESS:
return isSetSuccess();
- case NFE:
- return isSetNfe();
case IRE:
return isSetIre();
}
@@ -26452,12 +27610,12 @@ public class Cassandra {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof describe_keyspace_result)
- return this.equals((describe_keyspace_result)that);
+ if (that instanceof describe_splits_result)
+ return this.equals((describe_splits_result)that);
return false;
}
- public boolean equals(describe_keyspace_result that) {
+ public boolean equals(describe_splits_result that) {
if (that == null)
return false;
@@ -26470,15 +27628,6 @@ public class Cassandra {
return false;
}
- boolean this_present_nfe = true && this.isSetNfe();
- boolean that_present_nfe = true && that.isSetNfe();
- if (this_present_nfe || that_present_nfe) {
- if (!(this_present_nfe && that_present_nfe))
- return false;
- if (!this.nfe.equals(that.nfe))
- return false;
- }
-
boolean this_present_ire = true && this.isSetIre();
boolean that_present_ire = true && that.isSetIre();
if (this_present_ire || that_present_ire) {
@@ -26500,11 +27649,6 @@ public class Cassandra {
if (present_success)
builder.append(success);
- boolean present_nfe = true && (isSetNfe());
- builder.append(present_nfe);
- if (present_nfe)
- builder.append(nfe);
-
boolean present_ire = true && (isSetIre());
builder.append(present_ire);
if (present_ire)
@@ -26513,13 +27657,13 @@ public class Cassandra {
return builder.toHashCode();
}
- public int compareTo(describe_keyspace_result other) {
+ public int compareTo(describe_splits_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- describe_keyspace_result typedOther = (describe_keyspace_result)other;
+ describe_splits_result typedOther = (describe_splits_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
@@ -26531,16 +27675,6 @@ public class Cassandra {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNfe()).compareTo(typedOther.isSetNfe());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNfe()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nfe, typedOther.nfe);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
lastComparison = Boolean.valueOf(isSetIre()).compareTo(typedOther.isSetIre());
if (lastComparison != 0) {
return lastComparison;
@@ -26569,22 +27703,23 @@ public class Cassandra {
}
switch (field.id) {
case 0: // SUCCESS
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.success = new KsDef();
- this.success.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 1: // NFE
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.nfe = new NotFoundException();
- this.nfe.read(iprot);
+ if (field.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list169 = iprot.readListBegin();
+ this.success = new ArrayList<String>(_list169.size);
+ for (int _i170 = 0; _i170 < _list169.size; ++_i170)
+ {
+ String _elem171; // required
+ _elem171 = iprot.readString();
+ this.success.add(_elem171);
+ }
+ iprot.readListEnd();
+ }
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
- case 2: // IRE
+ case 1: // IRE
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
this.ire = new InvalidRequestException();
this.ire.read(iprot);
@@ -26608,11 +27743,14 @@ public class Cassandra {
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- this.success.write(oprot);
- oprot.writeFieldEnd();
- } else if (this.isSetNfe()) {
- oprot.writeFieldBegin(NFE_FIELD_DESC);
- this.nfe.write(oprot);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
+ for (String _iter172 : this.success)
+ {
+ oprot.writeString(_iter172);
+ }
+ oprot.writeListEnd();
+ }
oprot.writeFieldEnd();
} else if (this.isSetIre()) {
oprot.writeFieldBegin(IRE_FIELD_DESC);
@@ -26625,7 +27763,7 @@ public class Cassandra {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("describe_keyspace_result(");
+ StringBuilder sb = new StringBuilder("describe_splits_result(");
boolean first = true;
sb.append("success:");
@@ -26636,14 +27774,6 @@ public class Cassandra {
}
first = false;
if (!first) sb.append(", ");
- sb.append("nfe:");
- if (this.nfe == null) {
- sb.append("null");
- } else {
- sb.append(this.nfe);
- }
- first = false;
- if (!first) sb.append(", ");
sb.append("ire:");
if (this.ire == null) {
sb.append("null");
@@ -26677,8 +27807,8 @@ public class Cassandra {
}
- public static class describe_splits_args implements org.apache.thrift.TBase<describe_splits_args, describe_splits_args._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_splits_args");
+ public static class describe_splits_ex_args implements org.apache.thrift.TBase<describe_splits_ex_args, describe_splits_ex_args._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_splits_ex_args");
private static final org.apache.thrift.protocol.TField CF_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("cfName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField START_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("start_token", org.apache.thrift.protocol.TType.STRING, (short)2);
@@ -26773,13 +27903,13 @@ public class Cassandra {
tmpMap.put(_Fields.KEYS_PER_SPLIT, new org.apache.thrift.meta_data.FieldMetaData("keys_per_split", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_splits_args.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_splits_ex_args.class, metaDataMap);
}
- public describe_splits_args() {
+ public describe_splits_ex_args() {
}
- public describe_splits_args(
+ public describe_splits_ex_args(
String cfName,
String start_token,
String end_token,
@@ -26796,7 +27926,7 @@ public class Cassandra {
/**
* Performs a deep copy on <i>other</i>.
*/
- public describe_splits_args(describe_splits_args other) {
+ public describe_splits_ex_args(describe_splits_ex_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetCfName()) {
@@ -26811,8 +27941,8 @@ public class Cassandra {
this.keys_per_split = other.keys_per_split;
}
- public describe_splits_args deepCopy() {
- return new describe_splits_args(this);
+ public describe_splits_ex_args deepCopy() {
+ return new describe_splits_ex_args(this);
}
@Override
@@ -26828,7 +27958,7 @@ public class Cassandra {
return this.cfName;
}
- public describe_splits_args setCfName(String cfName) {
+ public describe_splits_ex_args setCfName(String cfName) {
this.cfName = cfName;
return this;
}
@@ -26852,7 +27982,7 @@ public class Cassandra {
return this.start_token;
}
- public describe_splits_args setStart_token(String start_token) {
+ public describe_splits_ex_args setStart_token(String start_token) {
this.start_token = start_token;
return this;
}
@@ -26876,7 +28006,7 @@ public class Cassandra {
return this.end_token;
}
- public describe_splits_args setEnd_token(String end_token) {
+ public describe_splits_ex_args setEnd_token(String end_token) {
this.end_token = end_token;
return this;
}
@@ -26900,7 +28030,7 @@ public class Cassandra {
return this.keys_per_split;
}
- public describe_splits_args setKeys_per_split(int keys_per_split) {
+ public describe_splits_ex_args setKeys_per_split(int keys_per_split) {
this.keys_per_split = keys_per_split;
setKeys_per_splitIsSet(true);
return this;
@@ -26997,12 +28127,12 @@ public class Cassandra {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof describe_splits_args)
- return this.equals((describe_splits_args)that);
+ if (that instanceof describe_splits_ex_args)
+ return this.equals((describe_splits_ex_args)that);
return false;
}
- public boolean equals(describe_splits_args that) {
+ public boolean equals(describe_splits_ex_args that) {
if (that == null)
return false;
@@ -27072,13 +28202,13 @@ public class Cassandra {
return builder.toHashCode();
}
- public int compareTo(describe_splits_args other) {
+ public int compareTo(describe_splits_ex_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- describe_splits_args typedOther = (describe_splits_args)other;
+ describe_splits_ex_args typedOther = (describe_splits_ex_args)other;
lastComparison = Boolean.valueOf(isSetCfName()).compareTo(typedOther.isSetCfName());
if (lastComparison != 0) {
@@ -27208,7 +28338,7 @@ public class Cassandra {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("describe_splits_args(");
+ StringBuilder sb = new StringBuilder("describe_splits_ex_args(");
boolean first = true;
sb.append("cfName:");
@@ -27276,13 +28406,13 @@ public class Cassandra {
}
- public static class describe_splits_result implements org.apache.thrift.TBase<describe_splits_result, describe_splits_result._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_splits_result");
+ public static class describe_splits_ex_result implements org.apache.thrift.TBase<describe_splits_ex_result, describe_splits_ex_result._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("describe_splits_ex_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- public List<String> success; // required
+ public List<CfSplit> success; // required
public InvalidRequestException ire; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -27353,18 +28483,18 @@ public class Cassandra {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CfSplit.class))));
tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_splits_result.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(describe_splits_ex_result.class, metaDataMap);
}
- public describe_splits_result() {
+ public describe_splits_ex_result() {
}
- public describe_splits_result(
- List<String> success,
+ public describe_splits_ex_result(
+ List<CfSplit> success,
InvalidRequestException ire)
{
this();
@@ -27375,11 +28505,11 @@ public class Cassandra {
/**
* Performs a deep copy on <i>other</i>.
*/
- public describe_splits_result(describe_splits_result other) {
+ public describe_splits_ex_result(describe_splits_ex_result other) {
if (other.isSetSuccess()) {
- List<String> __this__success = new ArrayList<String>();
- for (String other_element : other.success) {
- __this__success.add(other_element);
+ List<CfSplit> __this__success = new ArrayList<CfSplit>();
+ for (CfSplit other_element : other.success) {
+ __this__success.add(new CfSplit(other_element));
}
this.success = __this__success;
}
@@ -27388,8 +28518,8 @@ public class Cassandra {
}
}
- public describe_splits_result deepCopy() {
- return new describe_splits_result(this);
+ public describe_splits_ex_result deepCopy() {
+ return new describe_splits_ex_result(this);
}
@Override
@@ -27402,22 +28532,22 @@ public class Cassandra {
return (this.success == null) ? 0 : this.success.size();
}
- public java.util.Iterator<String> getSuccessIterator() {
+ public java.util.Iterator<CfSplit> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
- public void addToSuccess(String elem) {
+ public void addToSuccess(CfSplit elem) {
if (this.success == null) {
- this.success = new ArrayList<String>();
+ this.success = new ArrayList<CfSplit>();
}
this.success.add(elem);
}
- public List<String> getSuccess() {
+ public List<CfSplit> getSuccess() {
return this.success;
}
- public describe_splits_result setSuccess(List<String> success) {
+ public describe_splits_ex_result setSuccess(List<CfSplit> success) {
this.success = success;
return this;
}
@@ -27441,7 +28571,7 @@ public class Cassandra {
return this.ire;
}
- public describe_splits_result setIre(InvalidRequestException ire) {
+ public describe_splits_ex_result setIre(InvalidRequestException ire) {
this.ire = ire;
return this;
}
@@ -27467,7 +28597,7 @@ public class Cassandra {
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<String>)value);
+ setSuccess((List<CfSplit>)value);
}
break;
@@ -27513,12 +28643,12 @@ public class Cassandra {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof describe_splits_result)
- return this.equals((describe_splits_result)that);
+ if (that instanceof describe_splits_ex_result)
+ return this.equals((describe_splits_ex_result)that);
return false;
}
- public boolean equals(describe_splits_result that) {
+ public boolean equals(describe_splits_ex_result that) {
if (that == null)
return false;
@@ -27560,13 +28690,13 @@ public class Cassandra {
return builder.toHashCode();
}
- public int compareTo(describe_splits_result other) {
+ public int compareTo(describe_splits_ex_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- describe_splits_result typedOther = (describe_splits_result)other;
+ describe_splits_ex_result typedOther = (describe_splits_ex_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
@@ -27608,13 +28738,14 @@ public class Cassandra {
case 0: // SUCCESS
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list169 = iprot.readListBegin();
- this.success = new ArrayList<String>(_list169.size);
- for (int _i170 = 0; _i170 < _list169.size; ++_i170)
+ org.apache.thrift.protocol.TList _list173 = iprot.readListBegin();
+ this.success = new ArrayList<CfSplit>(_list173.size);
+ for (int _i174 = 0; _i174 < _list173.size; ++_i174)
{
- String _elem171; // required
- _elem171 = iprot.readString();
- this.success.add(_elem171);
+ CfSplit _elem175; // required
+ _elem175 = new CfSplit();
+ _elem175.read(iprot);
+ this.success.add(_elem175);
}
iprot.readListEnd();
}
@@ -27647,10 +28778,10 @@ public class Cassandra {
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
- for (String _iter172 : this.success)
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
+ for (CfSplit _iter176 : this.success)
{
- oprot.writeString(_iter172);
+ _iter176.write(oprot);
}
oprot.writeListEnd();
}
@@ -27666,7 +28797,7 @@ public class Cassandra {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("describe_splits_result(");
+ StringBuilder sb = new StringBuilder("describe_splits_ex_result(");
boolean first = true;
sb.append("success:");
@@ -34787,13 +35918,13 @@ public class Cassandra {
case 2: // VALUES
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list173 = iprot.readListBegin();
- this.values = new ArrayList<ByteBuffer>(_list173.size);
- for (int _i174 = 0; _i174 < _list173.size; ++_i174)
+ org.apache.thrift.protocol.TList _list177 = iprot.readListBegin();
+ this.values = new ArrayList<ByteBuffer>(_list177.size);
+ for (int _i178 = 0; _i178 < _list177.size; ++_i178)
{
- ByteBuffer _elem175; // required
- _elem175 = iprot.readBinary();
- this.values.add(_elem175);
+ ByteBuffer _elem179; // required
+ _elem179 = iprot.readBinary();
+ this.values.add(_elem179);
}
iprot.readListEnd();
}
@@ -34826,9 +35957,9 @@ public class Cassandra {
oprot.writeFieldBegin(VALUES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.values.size()));
- for (ByteBuffer _iter176 : this.values)
+ for (ByteBuffer _iter180 : this.values)
{
- oprot.writeBinary(_iter176);
+ oprot.writeBinary(_iter180);
}
oprot.writeListEnd();
}
@@ -34876,6 +36007,8 @@ public class Cassandra {
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bit_vector = new BitSet(1);
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);