Followup to CASSANDRA-5619

This commit is contained in:
Sylvain Lebresne 2013-07-03 08:32:59 +02:00
parent 9c0ca5d603
commit bfe1e1cef7
16 changed files with 1180 additions and 642 deletions

View File

@ -387,6 +387,11 @@ struct EndpointDetails {
3: optional string rack
}
struct CASResult {
1: required bool success,
2: optional list<Column> current_values,
}
/**
A TokenRange describes part of the Cassandra ring, it is a mapping from a range to
endpoints responsible for that range.
@ -645,16 +650,17 @@ service Cassandra {
throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
/**
* Atomic compare and set
* Atomic compare and set.
*
* The returned list of columns will be null if the cas succeed. Otherwise, it will contain the current
* values for the columns in {@param expected}.
* If the cas is successfull, the success boolean in CASResult will be true and there will be no current_values.
* Otherwise, success will be false and current_values will contain the current values for the columns in
* expected (that, by definition of compare-and-set, will differ from the values in expected).
*/
list<Column> cas(1:required binary key,
2:required string column_family,
3:list<Column> expected,
4:list<Column> updates,
5:required ConsistencyLevel consistency_level=ConsistencyLevel.QUORUM)
CASResult cas(1:required binary key,
2:required string column_family,
3:list<Column> expected,
4:list<Column> updates,
5:required ConsistencyLevel consistency_level=ConsistencyLevel.QUORUM)
throws (1:InvalidRequestException ire, 2:UnavailableException ue, 3:TimedOutException te),
/**

View File

@ -379,15 +379,15 @@ public class AuthenticationRequest implements org.apache.thrift.TBase<Authentica
case 1: // CREDENTIALS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map72 = iprot.readMapBegin();
struct.credentials = new HashMap<String,String>(2*_map72.size);
for (int _i73 = 0; _i73 < _map72.size; ++_i73)
org.apache.thrift.protocol.TMap _map80 = iprot.readMapBegin();
struct.credentials = new HashMap<String,String>(2*_map80.size);
for (int _i81 = 0; _i81 < _map80.size; ++_i81)
{
String _key74; // required
String _val75; // required
_key74 = iprot.readString();
_val75 = iprot.readString();
struct.credentials.put(_key74, _val75);
String _key82; // required
String _val83; // required
_key82 = iprot.readString();
_val83 = iprot.readString();
struct.credentials.put(_key82, _val83);
}
iprot.readMapEnd();
}
@ -415,10 +415,10 @@ public class AuthenticationRequest implements org.apache.thrift.TBase<Authentica
oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.credentials.size()));
for (Map.Entry<String, String> _iter76 : struct.credentials.entrySet())
for (Map.Entry<String, String> _iter84 : struct.credentials.entrySet())
{
oprot.writeString(_iter76.getKey());
oprot.writeString(_iter76.getValue());
oprot.writeString(_iter84.getKey());
oprot.writeString(_iter84.getValue());
}
oprot.writeMapEnd();
}
@ -443,10 +443,10 @@ public class AuthenticationRequest implements org.apache.thrift.TBase<Authentica
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.credentials.size());
for (Map.Entry<String, String> _iter77 : struct.credentials.entrySet())
for (Map.Entry<String, String> _iter85 : struct.credentials.entrySet())
{
oprot.writeString(_iter77.getKey());
oprot.writeString(_iter77.getValue());
oprot.writeString(_iter85.getKey());
oprot.writeString(_iter85.getValue());
}
}
}
@ -455,15 +455,15 @@ public class AuthenticationRequest implements org.apache.thrift.TBase<Authentica
public void read(org.apache.thrift.protocol.TProtocol prot, AuthenticationRequest struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
org.apache.thrift.protocol.TMap _map78 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.credentials = new HashMap<String,String>(2*_map78.size);
for (int _i79 = 0; _i79 < _map78.size; ++_i79)
org.apache.thrift.protocol.TMap _map86 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.credentials = new HashMap<String,String>(2*_map86.size);
for (int _i87 = 0; _i87 < _map86.size; ++_i87)
{
String _key80; // required
String _val81; // required
_key80 = iprot.readString();
_val81 = iprot.readString();
struct.credentials.put(_key80, _val81);
String _key88; // required
String _val89; // required
_key88 = iprot.readString();
_val89 = iprot.readString();
struct.credentials.put(_key88, _val89);
}
}
struct.setCredentialsIsSet(true);

View File

@ -0,0 +1,572 @@
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
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
* regarding copyright ownership. The ASF licenses this file
* 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.lang.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class CASResult implements org.apache.thrift.TBase<CASResult, CASResult._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CASResult");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)1);
private static final org.apache.thrift.protocol.TField CURRENT_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("current_values", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new CASResultStandardSchemeFactory());
schemes.put(TupleScheme.class, new CASResultTupleSchemeFactory());
}
public boolean success; // required
public List<Column> current_values; // optional
/** 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)1, "success"),
CURRENT_VALUES((short)2, "current_values");
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: // SUCCESS
return SUCCESS;
case 2: // CURRENT_VALUES
return CURRENT_VALUES;
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 __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private _Fields optionals[] = {_Fields.CURRENT_VALUES};
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.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.CURRENT_VALUES, new org.apache.thrift.meta_data.FieldMetaData("current_values", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Column.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CASResult.class, metaDataMap);
}
public CASResult() {
}
public CASResult(
boolean success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public CASResult(CASResult other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetCurrent_values()) {
List<Column> __this__current_values = new ArrayList<Column>();
for (Column other_element : other.current_values) {
__this__current_values.add(new Column(other_element));
}
this.current_values = __this__current_values;
}
}
public CASResult deepCopy() {
return new CASResult(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.current_values = null;
}
public boolean isSuccess() {
return this.success;
}
public CASResult setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public int getCurrent_valuesSize() {
return (this.current_values == null) ? 0 : this.current_values.size();
}
public java.util.Iterator<Column> getCurrent_valuesIterator() {
return (this.current_values == null) ? null : this.current_values.iterator();
}
public void addToCurrent_values(Column elem) {
if (this.current_values == null) {
this.current_values = new ArrayList<Column>();
}
this.current_values.add(elem);
}
public List<Column> getCurrent_values() {
return this.current_values;
}
public CASResult setCurrent_values(List<Column> current_values) {
this.current_values = current_values;
return this;
}
public void unsetCurrent_values() {
this.current_values = null;
}
/** Returns true if field current_values is set (has been assigned a value) and false otherwise */
public boolean isSetCurrent_values() {
return this.current_values != null;
}
public void setCurrent_valuesIsSet(boolean value) {
if (!value) {
this.current_values = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case CURRENT_VALUES:
if (value == null) {
unsetCurrent_values();
} else {
setCurrent_values((List<Column>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(isSuccess());
case CURRENT_VALUES:
return getCurrent_values();
}
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 CURRENT_VALUES:
return isSetCurrent_values();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof CASResult)
return this.equals((CASResult)that);
return false;
}
public boolean equals(CASResult that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_current_values = true && this.isSetCurrent_values();
boolean that_present_current_values = true && that.isSetCurrent_values();
if (this_present_current_values || that_present_current_values) {
if (!(this_present_current_values && that_present_current_values))
return false;
if (!this.current_values.equals(that.current_values))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_success = true;
builder.append(present_success);
if (present_success)
builder.append(success);
boolean present_current_values = true && (isSetCurrent_values());
builder.append(present_current_values);
if (present_current_values)
builder.append(current_values);
return builder.toHashCode();
}
public int compareTo(CASResult other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
CASResult typedOther = (CASResult)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(isSetCurrent_values()).compareTo(typedOther.isSetCurrent_values());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCurrent_values()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.current_values, typedOther.current_values);
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 {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("CASResult(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (isSetCurrent_values()) {
if (!first) sb.append(", ");
sb.append("current_values:");
if (this.current_values == null) {
sb.append("null");
} else {
sb.append(this.current_values);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'success' because it's a primitive and you chose the non-beans generator.
// check for sub-struct validity
}
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 {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
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);
}
}
private static class CASResultStandardSchemeFactory implements SchemeFactory {
public CASResultStandardScheme getScheme() {
return new CASResultStandardScheme();
}
}
private static class CASResultStandardScheme extends StandardScheme<CASResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, CASResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // CURRENT_VALUES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
struct.current_values = new ArrayList<Column>(_list48.size);
for (int _i49 = 0; _i49 < _list48.size; ++_i49)
{
Column _elem50; // required
_elem50 = new Column();
_elem50.read(iprot);
struct.current_values.add(_elem50);
}
iprot.readListEnd();
}
struct.setCurrent_valuesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
if (!struct.isSetSuccess()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'success' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, CASResult struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
if (struct.current_values != null) {
if (struct.isSetCurrent_values()) {
oprot.writeFieldBegin(CURRENT_VALUES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.current_values.size()));
for (Column _iter51 : struct.current_values)
{
_iter51.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class CASResultTupleSchemeFactory implements SchemeFactory {
public CASResultTupleScheme getScheme() {
return new CASResultTupleScheme();
}
}
private static class CASResultTupleScheme extends TupleScheme<CASResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, CASResult struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeBool(struct.success);
BitSet optionals = new BitSet();
if (struct.isSetCurrent_values()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetCurrent_values()) {
{
oprot.writeI32(struct.current_values.size());
for (Column _iter52 : struct.current_values)
{
_iter52.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, CASResult struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list53 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.current_values = new ArrayList<Column>(_list53.size);
for (int _i54 = 0; _i54 < _list53.size; ++_i54)
{
Column _elem55; // required
_elem55 = new Column();
_elem55.read(iprot);
struct.current_values.add(_elem55);
}
}
struct.setCurrent_valuesIsSet(true);
}
}
}
}

View File

@ -164,10 +164,11 @@ public class Cassandra {
public void add(ByteBuffer key, ColumnParent column_parent, CounterColumn column, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException;
/**
* Atomic compare and set
* Atomic compare and set.
*
* The returned list of columns will be null if the cas succeed. Otherwise, it will contain the current
* values for the columns in {@param expected}.
* If the cas is successfull, the success boolean in CASResult will be true and there will be no current_values.
* Otherwise, success will be false and current_values will contain the current values for the columns in
* expected (that, by definition of compare-and-set, will differ from the values in expected).
*
* @param key
* @param column_family
@ -175,7 +176,7 @@ public class Cassandra {
* @param updates
* @param consistency_level
*/
public List<Column> cas(ByteBuffer key, String column_family, List<Column> expected, List<Column> updates, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException;
public CASResult cas(ByteBuffer key, String column_family, List<Column> expected, List<Column> updates, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException;
/**
* Remove data from the row specified by key at the granularity specified by column_path, and the given timestamp. Note
@ -907,7 +908,7 @@ public class Cassandra {
return;
}
public List<Column> cas(ByteBuffer key, String column_family, List<Column> expected, List<Column> updates, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
public CASResult cas(ByteBuffer key, String column_family, List<Column> expected, List<Column> updates, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
{
send_cas(key, column_family, expected, updates, consistency_level);
return recv_cas();
@ -924,7 +925,7 @@ public class Cassandra {
sendBase("cas", args);
}
public List<Column> recv_cas() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
public CASResult recv_cas() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException
{
cas_result result = new cas_result();
receiveBase(result, "cas");
@ -2313,7 +2314,7 @@ public class Cassandra {
prot.writeMessageEnd();
}
public List<Column> getResult() throws InvalidRequestException, UnavailableException, TimedOutException, org.apache.thrift.TException {
public CASResult 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!");
}
@ -8692,14 +8693,14 @@ public class Cassandra {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list210 = iprot.readListBegin();
struct.success = new ArrayList<ColumnOrSuperColumn>(_list210.size);
for (int _i211 = 0; _i211 < _list210.size; ++_i211)
org.apache.thrift.protocol.TList _list218 = iprot.readListBegin();
struct.success = new ArrayList<ColumnOrSuperColumn>(_list218.size);
for (int _i219 = 0; _i219 < _list218.size; ++_i219)
{
ColumnOrSuperColumn _elem212; // required
_elem212 = new ColumnOrSuperColumn();
_elem212.read(iprot);
struct.success.add(_elem212);
ColumnOrSuperColumn _elem220; // required
_elem220 = new ColumnOrSuperColumn();
_elem220.read(iprot);
struct.success.add(_elem220);
}
iprot.readListEnd();
}
@ -8754,9 +8755,9 @@ public class Cassandra {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
for (ColumnOrSuperColumn _iter213 : struct.success)
for (ColumnOrSuperColumn _iter221 : struct.success)
{
_iter213.write(oprot);
_iter221.write(oprot);
}
oprot.writeListEnd();
}
@ -8811,9 +8812,9 @@ public class Cassandra {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (ColumnOrSuperColumn _iter214 : struct.success)
for (ColumnOrSuperColumn _iter222 : struct.success)
{
_iter214.write(oprot);
_iter222.write(oprot);
}
}
}
@ -8834,14 +8835,14 @@ public class Cassandra {
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list215 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<ColumnOrSuperColumn>(_list215.size);
for (int _i216 = 0; _i216 < _list215.size; ++_i216)
org.apache.thrift.protocol.TList _list223 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<ColumnOrSuperColumn>(_list223.size);
for (int _i224 = 0; _i224 < _list223.size; ++_i224)
{
ColumnOrSuperColumn _elem217; // required
_elem217 = new ColumnOrSuperColumn();
_elem217.read(iprot);
struct.success.add(_elem217);
ColumnOrSuperColumn _elem225; // required
_elem225 = new ColumnOrSuperColumn();
_elem225.read(iprot);
struct.success.add(_elem225);
}
}
struct.setSuccessIsSet(true);
@ -10846,13 +10847,13 @@ public class Cassandra {
case 1: // KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list218 = iprot.readListBegin();
struct.keys = new ArrayList<ByteBuffer>(_list218.size);
for (int _i219 = 0; _i219 < _list218.size; ++_i219)
org.apache.thrift.protocol.TList _list226 = iprot.readListBegin();
struct.keys = new ArrayList<ByteBuffer>(_list226.size);
for (int _i227 = 0; _i227 < _list226.size; ++_i227)
{
ByteBuffer _elem220; // required
_elem220 = iprot.readBinary();
struct.keys.add(_elem220);
ByteBuffer _elem228; // required
_elem228 = iprot.readBinary();
struct.keys.add(_elem228);
}
iprot.readListEnd();
}
@ -10906,9 +10907,9 @@ public class Cassandra {
oprot.writeFieldBegin(KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size()));
for (ByteBuffer _iter221 : struct.keys)
for (ByteBuffer _iter229 : struct.keys)
{
oprot.writeBinary(_iter221);
oprot.writeBinary(_iter229);
}
oprot.writeListEnd();
}
@ -10948,9 +10949,9 @@ public class Cassandra {
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.keys.size());
for (ByteBuffer _iter222 : struct.keys)
for (ByteBuffer _iter230 : struct.keys)
{
oprot.writeBinary(_iter222);
oprot.writeBinary(_iter230);
}
}
struct.column_parent.write(oprot);
@ -10962,13 +10963,13 @@ public class Cassandra {
public void read(org.apache.thrift.protocol.TProtocol prot, multiget_slice_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
org.apache.thrift.protocol.TList _list223 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.keys = new ArrayList<ByteBuffer>(_list223.size);
for (int _i224 = 0; _i224 < _list223.size; ++_i224)
org.apache.thrift.protocol.TList _list231 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.keys = new ArrayList<ByteBuffer>(_list231.size);
for (int _i232 = 0; _i232 < _list231.size; ++_i232)
{
ByteBuffer _elem225; // required
_elem225 = iprot.readBinary();
struct.keys.add(_elem225);
ByteBuffer _elem233; // required
_elem233 = iprot.readBinary();
struct.keys.add(_elem233);
}
}
struct.setKeysIsSet(true);
@ -11557,26 +11558,26 @@ public class Cassandra {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map226 = iprot.readMapBegin();
struct.success = new HashMap<ByteBuffer,List<ColumnOrSuperColumn>>(2*_map226.size);
for (int _i227 = 0; _i227 < _map226.size; ++_i227)
org.apache.thrift.protocol.TMap _map234 = iprot.readMapBegin();
struct.success = new HashMap<ByteBuffer,List<ColumnOrSuperColumn>>(2*_map234.size);
for (int _i235 = 0; _i235 < _map234.size; ++_i235)
{
ByteBuffer _key228; // required
List<ColumnOrSuperColumn> _val229; // required
_key228 = iprot.readBinary();
ByteBuffer _key236; // required
List<ColumnOrSuperColumn> _val237; // required
_key236 = iprot.readBinary();
{
org.apache.thrift.protocol.TList _list230 = iprot.readListBegin();
_val229 = new ArrayList<ColumnOrSuperColumn>(_list230.size);
for (int _i231 = 0; _i231 < _list230.size; ++_i231)
org.apache.thrift.protocol.TList _list238 = iprot.readListBegin();
_val237 = new ArrayList<ColumnOrSuperColumn>(_list238.size);
for (int _i239 = 0; _i239 < _list238.size; ++_i239)
{
ColumnOrSuperColumn _elem232; // required
_elem232 = new ColumnOrSuperColumn();
_elem232.read(iprot);
_val229.add(_elem232);
ColumnOrSuperColumn _elem240; // required
_elem240 = new ColumnOrSuperColumn();
_elem240.read(iprot);
_val237.add(_elem240);
}
iprot.readListEnd();
}
struct.success.put(_key228, _val229);
struct.success.put(_key236, _val237);
}
iprot.readMapEnd();
}
@ -11631,14 +11632,14 @@ public class Cassandra {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.success.size()));
for (Map.Entry<ByteBuffer, List<ColumnOrSuperColumn>> _iter233 : struct.success.entrySet())
for (Map.Entry<ByteBuffer, List<ColumnOrSuperColumn>> _iter241 : struct.success.entrySet())
{
oprot.writeBinary(_iter233.getKey());
oprot.writeBinary(_iter241.getKey());
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter233.getValue().size()));
for (ColumnOrSuperColumn _iter234 : _iter233.getValue())
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter241.getValue().size()));
for (ColumnOrSuperColumn _iter242 : _iter241.getValue())
{
_iter234.write(oprot);
_iter242.write(oprot);
}
oprot.writeListEnd();
}
@ -11696,14 +11697,14 @@ public class Cassandra {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (Map.Entry<ByteBuffer, List<ColumnOrSuperColumn>> _iter235 : struct.success.entrySet())
for (Map.Entry<ByteBuffer, List<ColumnOrSuperColumn>> _iter243 : struct.success.entrySet())
{
oprot.writeBinary(_iter235.getKey());
oprot.writeBinary(_iter243.getKey());
{
oprot.writeI32(_iter235.getValue().size());
for (ColumnOrSuperColumn _iter236 : _iter235.getValue())
oprot.writeI32(_iter243.getValue().size());
for (ColumnOrSuperColumn _iter244 : _iter243.getValue())
{
_iter236.write(oprot);
_iter244.write(oprot);
}
}
}
@ -11726,25 +11727,25 @@ public class Cassandra {
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map237 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32());
struct.success = new HashMap<ByteBuffer,List<ColumnOrSuperColumn>>(2*_map237.size);
for (int _i238 = 0; _i238 < _map237.size; ++_i238)
org.apache.thrift.protocol.TMap _map245 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32());
struct.success = new HashMap<ByteBuffer,List<ColumnOrSuperColumn>>(2*_map245.size);
for (int _i246 = 0; _i246 < _map245.size; ++_i246)
{
ByteBuffer _key239; // required
List<ColumnOrSuperColumn> _val240; // required
_key239 = iprot.readBinary();
ByteBuffer _key247; // required
List<ColumnOrSuperColumn> _val248; // required
_key247 = iprot.readBinary();
{
org.apache.thrift.protocol.TList _list241 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
_val240 = new ArrayList<ColumnOrSuperColumn>(_list241.size);
for (int _i242 = 0; _i242 < _list241.size; ++_i242)
org.apache.thrift.protocol.TList _list249 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
_val248 = new ArrayList<ColumnOrSuperColumn>(_list249.size);
for (int _i250 = 0; _i250 < _list249.size; ++_i250)
{
ColumnOrSuperColumn _elem243; // required
_elem243 = new ColumnOrSuperColumn();
_elem243.read(iprot);
_val240.add(_elem243);
ColumnOrSuperColumn _elem251; // required
_elem251 = new ColumnOrSuperColumn();
_elem251.read(iprot);
_val248.add(_elem251);
}
}
struct.success.put(_key239, _val240);
struct.success.put(_key247, _val248);
}
}
struct.setSuccessIsSet(true);
@ -12370,13 +12371,13 @@ public class Cassandra {
case 1: // KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list244 = iprot.readListBegin();
struct.keys = new ArrayList<ByteBuffer>(_list244.size);
for (int _i245 = 0; _i245 < _list244.size; ++_i245)
org.apache.thrift.protocol.TList _list252 = iprot.readListBegin();
struct.keys = new ArrayList<ByteBuffer>(_list252.size);
for (int _i253 = 0; _i253 < _list252.size; ++_i253)
{
ByteBuffer _elem246; // required
_elem246 = iprot.readBinary();
struct.keys.add(_elem246);
ByteBuffer _elem254; // required
_elem254 = iprot.readBinary();
struct.keys.add(_elem254);
}
iprot.readListEnd();
}
@ -12430,9 +12431,9 @@ public class Cassandra {
oprot.writeFieldBegin(KEYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size()));
for (ByteBuffer _iter247 : struct.keys)
for (ByteBuffer _iter255 : struct.keys)
{
oprot.writeBinary(_iter247);
oprot.writeBinary(_iter255);
}
oprot.writeListEnd();
}
@ -12472,9 +12473,9 @@ public class Cassandra {
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.keys.size());
for (ByteBuffer _iter248 : struct.keys)
for (ByteBuffer _iter256 : struct.keys)
{
oprot.writeBinary(_iter248);
oprot.writeBinary(_iter256);
}
}
struct.column_parent.write(oprot);
@ -12486,13 +12487,13 @@ public class Cassandra {
public void read(org.apache.thrift.protocol.TProtocol prot, multiget_count_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
org.apache.thrift.protocol.TList _list249 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.keys = new ArrayList<ByteBuffer>(_list249.size);
for (int _i250 = 0; _i250 < _list249.size; ++_i250)
org.apache.thrift.protocol.TList _list257 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.keys = new ArrayList<ByteBuffer>(_list257.size);
for (int _i258 = 0; _i258 < _list257.size; ++_i258)
{
ByteBuffer _elem251; // required
_elem251 = iprot.readBinary();
struct.keys.add(_elem251);
ByteBuffer _elem259; // required
_elem259 = iprot.readBinary();
struct.keys.add(_elem259);
}
}
struct.setKeysIsSet(true);
@ -13077,15 +13078,15 @@ public class Cassandra {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map252 = iprot.readMapBegin();
struct.success = new HashMap<ByteBuffer,Integer>(2*_map252.size);
for (int _i253 = 0; _i253 < _map252.size; ++_i253)
org.apache.thrift.protocol.TMap _map260 = iprot.readMapBegin();
struct.success = new HashMap<ByteBuffer,Integer>(2*_map260.size);
for (int _i261 = 0; _i261 < _map260.size; ++_i261)
{
ByteBuffer _key254; // required
int _val255; // required
_key254 = iprot.readBinary();
_val255 = iprot.readI32();
struct.success.put(_key254, _val255);
ByteBuffer _key262; // required
int _val263; // required
_key262 = iprot.readBinary();
_val263 = iprot.readI32();
struct.success.put(_key262, _val263);
}
iprot.readMapEnd();
}
@ -13140,10 +13141,10 @@ public class Cassandra {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, struct.success.size()));
for (Map.Entry<ByteBuffer, Integer> _iter256 : struct.success.entrySet())
for (Map.Entry<ByteBuffer, Integer> _iter264 : struct.success.entrySet())
{
oprot.writeBinary(_iter256.getKey());
oprot.writeI32(_iter256.getValue());
oprot.writeBinary(_iter264.getKey());
oprot.writeI32(_iter264.getValue());
}
oprot.writeMapEnd();
}
@ -13198,10 +13199,10 @@ public class Cassandra {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (Map.Entry<ByteBuffer, Integer> _iter257 : struct.success.entrySet())
for (Map.Entry<ByteBuffer, Integer> _iter265 : struct.success.entrySet())
{
oprot.writeBinary(_iter257.getKey());
oprot.writeI32(_iter257.getValue());
oprot.writeBinary(_iter265.getKey());
oprot.writeI32(_iter265.getValue());
}
}
}
@ -13222,15 +13223,15 @@ public class Cassandra {
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map258 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32());
struct.success = new HashMap<ByteBuffer,Integer>(2*_map258.size);
for (int _i259 = 0; _i259 < _map258.size; ++_i259)
org.apache.thrift.protocol.TMap _map266 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32());
struct.success = new HashMap<ByteBuffer,Integer>(2*_map266.size);
for (int _i267 = 0; _i267 < _map266.size; ++_i267)
{
ByteBuffer _key260; // required
int _val261; // required
_key260 = iprot.readBinary();
_val261 = iprot.readI32();
struct.success.put(_key260, _val261);
ByteBuffer _key268; // required
int _val269; // required
_key268 = iprot.readBinary();
_val269 = iprot.readI32();
struct.success.put(_key268, _val269);
}
}
struct.setSuccessIsSet(true);
@ -14508,14 +14509,14 @@ public class Cassandra {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list262 = iprot.readListBegin();
struct.success = new ArrayList<KeySlice>(_list262.size);
for (int _i263 = 0; _i263 < _list262.size; ++_i263)
org.apache.thrift.protocol.TList _list270 = iprot.readListBegin();
struct.success = new ArrayList<KeySlice>(_list270.size);
for (int _i271 = 0; _i271 < _list270.size; ++_i271)
{
KeySlice _elem264; // required
_elem264 = new KeySlice();
_elem264.read(iprot);
struct.success.add(_elem264);
KeySlice _elem272; // required
_elem272 = new KeySlice();
_elem272.read(iprot);
struct.success.add(_elem272);
}
iprot.readListEnd();
}
@ -14570,9 +14571,9 @@ public class Cassandra {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
for (KeySlice _iter265 : struct.success)
for (KeySlice _iter273 : struct.success)
{
_iter265.write(oprot);
_iter273.write(oprot);
}
oprot.writeListEnd();
}
@ -14627,9 +14628,9 @@ public class Cassandra {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (KeySlice _iter266 : struct.success)
for (KeySlice _iter274 : struct.success)
{
_iter266.write(oprot);
_iter274.write(oprot);
}
}
}
@ -14650,14 +14651,14 @@ public class Cassandra {
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list267 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<KeySlice>(_list267.size);
for (int _i268 = 0; _i268 < _list267.size; ++_i268)
org.apache.thrift.protocol.TList _list275 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<KeySlice>(_list275.size);
for (int _i276 = 0; _i276 < _list275.size; ++_i276)
{
KeySlice _elem269; // required
_elem269 = new KeySlice();
_elem269.read(iprot);
struct.success.add(_elem269);
KeySlice _elem277; // required
_elem277 = new KeySlice();
_elem277.read(iprot);
struct.success.add(_elem277);
}
}
struct.setSuccessIsSet(true);
@ -15936,14 +15937,14 @@ public class Cassandra {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list270 = iprot.readListBegin();
struct.success = new ArrayList<KeySlice>(_list270.size);
for (int _i271 = 0; _i271 < _list270.size; ++_i271)
org.apache.thrift.protocol.TList _list278 = iprot.readListBegin();
struct.success = new ArrayList<KeySlice>(_list278.size);
for (int _i279 = 0; _i279 < _list278.size; ++_i279)
{
KeySlice _elem272; // required
_elem272 = new KeySlice();
_elem272.read(iprot);
struct.success.add(_elem272);
KeySlice _elem280; // required
_elem280 = new KeySlice();
_elem280.read(iprot);
struct.success.add(_elem280);
}
iprot.readListEnd();
}
@ -15998,9 +15999,9 @@ public class Cassandra {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
for (KeySlice _iter273 : struct.success)
for (KeySlice _iter281 : struct.success)
{
_iter273.write(oprot);
_iter281.write(oprot);
}
oprot.writeListEnd();
}
@ -16055,9 +16056,9 @@ public class Cassandra {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (KeySlice _iter274 : struct.success)
for (KeySlice _iter282 : struct.success)
{
_iter274.write(oprot);
_iter282.write(oprot);
}
}
}
@ -16078,14 +16079,14 @@ public class Cassandra {
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list275 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<KeySlice>(_list275.size);
for (int _i276 = 0; _i276 < _list275.size; ++_i276)
org.apache.thrift.protocol.TList _list283 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<KeySlice>(_list283.size);
for (int _i284 = 0; _i284 < _list283.size; ++_i284)
{
KeySlice _elem277; // required
_elem277 = new KeySlice();
_elem277.read(iprot);
struct.success.add(_elem277);
KeySlice _elem285; // required
_elem285 = new KeySlice();
_elem285.read(iprot);
struct.success.add(_elem285);
}
}
struct.setSuccessIsSet(true);
@ -17363,14 +17364,14 @@ public class Cassandra {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list278 = iprot.readListBegin();
struct.success = new ArrayList<KeySlice>(_list278.size);
for (int _i279 = 0; _i279 < _list278.size; ++_i279)
org.apache.thrift.protocol.TList _list286 = iprot.readListBegin();
struct.success = new ArrayList<KeySlice>(_list286.size);
for (int _i287 = 0; _i287 < _list286.size; ++_i287)
{
KeySlice _elem280; // required
_elem280 = new KeySlice();
_elem280.read(iprot);
struct.success.add(_elem280);
KeySlice _elem288; // required
_elem288 = new KeySlice();
_elem288.read(iprot);
struct.success.add(_elem288);
}
iprot.readListEnd();
}
@ -17425,9 +17426,9 @@ public class Cassandra {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
for (KeySlice _iter281 : struct.success)
for (KeySlice _iter289 : struct.success)
{
_iter281.write(oprot);
_iter289.write(oprot);
}
oprot.writeListEnd();
}
@ -17482,9 +17483,9 @@ public class Cassandra {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (KeySlice _iter282 : struct.success)
for (KeySlice _iter290 : struct.success)
{
_iter282.write(oprot);
_iter290.write(oprot);
}
}
}
@ -17505,14 +17506,14 @@ public class Cassandra {
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list283 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<KeySlice>(_list283.size);
for (int _i284 = 0; _i284 < _list283.size; ++_i284)
org.apache.thrift.protocol.TList _list291 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<KeySlice>(_list291.size);
for (int _i292 = 0; _i292 < _list291.size; ++_i292)
{
KeySlice _elem285; // required
_elem285 = new KeySlice();
_elem285.read(iprot);
struct.success.add(_elem285);
KeySlice _elem293; // required
_elem293 = new KeySlice();
_elem293.read(iprot);
struct.success.add(_elem293);
}
}
struct.setSuccessIsSet(true);
@ -20804,14 +20805,14 @@ public class Cassandra {
case 3: // EXPECTED
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list286 = iprot.readListBegin();
struct.expected = new ArrayList<Column>(_list286.size);
for (int _i287 = 0; _i287 < _list286.size; ++_i287)
org.apache.thrift.protocol.TList _list294 = iprot.readListBegin();
struct.expected = new ArrayList<Column>(_list294.size);
for (int _i295 = 0; _i295 < _list294.size; ++_i295)
{
Column _elem288; // required
_elem288 = new Column();
_elem288.read(iprot);
struct.expected.add(_elem288);
Column _elem296; // required
_elem296 = new Column();
_elem296.read(iprot);
struct.expected.add(_elem296);
}
iprot.readListEnd();
}
@ -20823,14 +20824,14 @@ public class Cassandra {
case 4: // UPDATES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list289 = iprot.readListBegin();
struct.updates = new ArrayList<Column>(_list289.size);
for (int _i290 = 0; _i290 < _list289.size; ++_i290)
org.apache.thrift.protocol.TList _list297 = iprot.readListBegin();
struct.updates = new ArrayList<Column>(_list297.size);
for (int _i298 = 0; _i298 < _list297.size; ++_i298)
{
Column _elem291; // required
_elem291 = new Column();
_elem291.read(iprot);
struct.updates.add(_elem291);
Column _elem299; // required
_elem299 = new Column();
_elem299.read(iprot);
struct.updates.add(_elem299);
}
iprot.readListEnd();
}
@ -20876,9 +20877,9 @@ public class Cassandra {
oprot.writeFieldBegin(EXPECTED_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.expected.size()));
for (Column _iter292 : struct.expected)
for (Column _iter300 : struct.expected)
{
_iter292.write(oprot);
_iter300.write(oprot);
}
oprot.writeListEnd();
}
@ -20888,9 +20889,9 @@ public class Cassandra {
oprot.writeFieldBegin(UPDATES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.updates.size()));
for (Column _iter293 : struct.updates)
for (Column _iter301 : struct.updates)
{
_iter293.write(oprot);
_iter301.write(oprot);
}
oprot.writeListEnd();
}
@ -20932,18 +20933,18 @@ public class Cassandra {
if (struct.isSetExpected()) {
{
oprot.writeI32(struct.expected.size());
for (Column _iter294 : struct.expected)
for (Column _iter302 : struct.expected)
{
_iter294.write(oprot);
_iter302.write(oprot);
}
}
}
if (struct.isSetUpdates()) {
{
oprot.writeI32(struct.updates.size());
for (Column _iter295 : struct.updates)
for (Column _iter303 : struct.updates)
{
_iter295.write(oprot);
_iter303.write(oprot);
}
}
}
@ -20961,28 +20962,28 @@ public class Cassandra {
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list296 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.expected = new ArrayList<Column>(_list296.size);
for (int _i297 = 0; _i297 < _list296.size; ++_i297)
org.apache.thrift.protocol.TList _list304 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.expected = new ArrayList<Column>(_list304.size);
for (int _i305 = 0; _i305 < _list304.size; ++_i305)
{
Column _elem298; // required
_elem298 = new Column();
_elem298.read(iprot);
struct.expected.add(_elem298);
Column _elem306; // required
_elem306 = new Column();
_elem306.read(iprot);
struct.expected.add(_elem306);
}
}
struct.setExpectedIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list299 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.updates = new ArrayList<Column>(_list299.size);
for (int _i300 = 0; _i300 < _list299.size; ++_i300)
org.apache.thrift.protocol.TList _list307 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.updates = new ArrayList<Column>(_list307.size);
for (int _i308 = 0; _i308 < _list307.size; ++_i308)
{
Column _elem301; // required
_elem301 = new Column();
_elem301.read(iprot);
struct.updates.add(_elem301);
Column _elem309; // required
_elem309 = new Column();
_elem309.read(iprot);
struct.updates.add(_elem309);
}
}
struct.setUpdatesIsSet(true);
@ -20995,7 +20996,7 @@ public class Cassandra {
public static class cas_result implements org.apache.thrift.TBase<cas_result, cas_result._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cas_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 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 IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField TE_FIELD_DESC = new org.apache.thrift.protocol.TField("te", org.apache.thrift.protocol.TType.STRUCT, (short)3);
@ -21006,7 +21007,7 @@ public class Cassandra {
schemes.put(TupleScheme.class, new cas_resultTupleSchemeFactory());
}
public List<Column> success; // required
public CASResult success; // required
public InvalidRequestException ire; // required
public UnavailableException ue; // required
public TimedOutException te; // required
@ -21083,8 +21084,7 @@ 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.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Column.class))));
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CASResult.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)));
tmpMap.put(_Fields.UE, new org.apache.thrift.meta_data.FieldMetaData("ue", org.apache.thrift.TFieldRequirementType.DEFAULT,
@ -21099,7 +21099,7 @@ public class Cassandra {
}
public cas_result(
List<Column> success,
CASResult success,
InvalidRequestException ire,
UnavailableException ue,
TimedOutException te)
@ -21116,11 +21116,7 @@ public class Cassandra {
*/
public cas_result(cas_result other) {
if (other.isSetSuccess()) {
List<Column> __this__success = new ArrayList<Column>();
for (Column other_element : other.success) {
__this__success.add(new Column(other_element));
}
this.success = __this__success;
this.success = new CASResult(other.success);
}
if (other.isSetIre()) {
this.ire = new InvalidRequestException(other.ire);
@ -21145,26 +21141,11 @@ public class Cassandra {
this.te = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator<Column> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(Column elem) {
if (this.success == null) {
this.success = new ArrayList<Column>();
}
this.success.add(elem);
}
public List<Column> getSuccess() {
public CASResult getSuccess() {
return this.success;
}
public cas_result setSuccess(List<Column> success) {
public cas_result setSuccess(CASResult success) {
this.success = success;
return this;
}
@ -21262,7 +21243,7 @@ public class Cassandra {
if (value == null) {
unsetSuccess();
} else {
setSuccess((List<Column>)value);
setSuccess((CASResult)value);
}
break;
@ -21515,6 +21496,9 @@ public class Cassandra {
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@ -21552,19 +21536,9 @@ public class Cassandra {
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list302 = iprot.readListBegin();
struct.success = new ArrayList<Column>(_list302.size);
for (int _i303 = 0; _i303 < _list302.size; ++_i303)
{
Column _elem304; // required
_elem304 = new Column();
_elem304.read(iprot);
struct.success.add(_elem304);
}
iprot.readListEnd();
}
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new CASResult();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@ -21614,14 +21588,7 @@ public class Cassandra {
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
for (Column _iter305 : struct.success)
{
_iter305.write(oprot);
}
oprot.writeListEnd();
}
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.ire != null) {
@ -21671,13 +21638,7 @@ public class Cassandra {
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (Column _iter306 : struct.success)
{
_iter306.write(oprot);
}
}
struct.success.write(oprot);
}
if (struct.isSetIre()) {
struct.ire.write(oprot);
@ -21695,17 +21656,8 @@ public class Cassandra {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list307 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList<Column>(_list307.size);
for (int _i308 = 0; _i308 < _list307.size; ++_i308)
{
Column _elem309; // required
_elem309 = new Column();
_elem309.read(iprot);
struct.success.add(_elem309);
}
}
struct.success = new CASResult();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {

View File

@ -3597,14 +3597,14 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
case 13: // COLUMN_METADATA
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list92 = iprot.readListBegin();
struct.column_metadata = new ArrayList<ColumnDef>(_list92.size);
for (int _i93 = 0; _i93 < _list92.size; ++_i93)
org.apache.thrift.protocol.TList _list100 = iprot.readListBegin();
struct.column_metadata = new ArrayList<ColumnDef>(_list100.size);
for (int _i101 = 0; _i101 < _list100.size; ++_i101)
{
ColumnDef _elem94; // required
_elem94 = new ColumnDef();
_elem94.read(iprot);
struct.column_metadata.add(_elem94);
ColumnDef _elem102; // required
_elem102 = new ColumnDef();
_elem102.read(iprot);
struct.column_metadata.add(_elem102);
}
iprot.readListEnd();
}
@ -3688,15 +3688,15 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
case 30: // COMPACTION_STRATEGY_OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map95 = iprot.readMapBegin();
struct.compaction_strategy_options = new HashMap<String,String>(2*_map95.size);
for (int _i96 = 0; _i96 < _map95.size; ++_i96)
org.apache.thrift.protocol.TMap _map103 = iprot.readMapBegin();
struct.compaction_strategy_options = new HashMap<String,String>(2*_map103.size);
for (int _i104 = 0; _i104 < _map103.size; ++_i104)
{
String _key97; // required
String _val98; // required
_key97 = iprot.readString();
_val98 = iprot.readString();
struct.compaction_strategy_options.put(_key97, _val98);
String _key105; // required
String _val106; // required
_key105 = iprot.readString();
_val106 = iprot.readString();
struct.compaction_strategy_options.put(_key105, _val106);
}
iprot.readMapEnd();
}
@ -3708,15 +3708,15 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
case 32: // COMPRESSION_OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map99 = iprot.readMapBegin();
struct.compression_options = new HashMap<String,String>(2*_map99.size);
for (int _i100 = 0; _i100 < _map99.size; ++_i100)
org.apache.thrift.protocol.TMap _map107 = iprot.readMapBegin();
struct.compression_options = new HashMap<String,String>(2*_map107.size);
for (int _i108 = 0; _i108 < _map107.size; ++_i108)
{
String _key101; // required
String _val102; // required
_key101 = iprot.readString();
_val102 = iprot.readString();
struct.compression_options.put(_key101, _val102);
String _key109; // required
String _val110; // required
_key109 = iprot.readString();
_val110 = iprot.readString();
struct.compression_options.put(_key109, _val110);
}
iprot.readMapEnd();
}
@ -3792,27 +3792,27 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
case 43: // TRIGGERS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map103 = iprot.readMapBegin();
struct.triggers = new HashMap<String,Map<String,String>>(2*_map103.size);
for (int _i104 = 0; _i104 < _map103.size; ++_i104)
org.apache.thrift.protocol.TMap _map111 = iprot.readMapBegin();
struct.triggers = new HashMap<String,Map<String,String>>(2*_map111.size);
for (int _i112 = 0; _i112 < _map111.size; ++_i112)
{
String _key105; // required
Map<String,String> _val106; // required
_key105 = iprot.readString();
String _key113; // required
Map<String,String> _val114; // required
_key113 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map107 = iprot.readMapBegin();
_val106 = new HashMap<String,String>(2*_map107.size);
for (int _i108 = 0; _i108 < _map107.size; ++_i108)
org.apache.thrift.protocol.TMap _map115 = iprot.readMapBegin();
_val114 = new HashMap<String,String>(2*_map115.size);
for (int _i116 = 0; _i116 < _map115.size; ++_i116)
{
String _key109; // required
String _val110; // required
_key109 = iprot.readString();
_val110 = iprot.readString();
_val106.put(_key109, _val110);
String _key117; // required
String _val118; // required
_key117 = iprot.readString();
_val118 = iprot.readString();
_val114.put(_key117, _val118);
}
iprot.readMapEnd();
}
struct.triggers.put(_key105, _val106);
struct.triggers.put(_key113, _val114);
}
iprot.readMapEnd();
}
@ -3974,9 +3974,9 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
oprot.writeFieldBegin(COLUMN_METADATA_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.column_metadata.size()));
for (ColumnDef _iter111 : struct.column_metadata)
for (ColumnDef _iter119 : struct.column_metadata)
{
_iter111.write(oprot);
_iter119.write(oprot);
}
oprot.writeListEnd();
}
@ -4078,10 +4078,10 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
oprot.writeFieldBegin(COMPACTION_STRATEGY_OPTIONS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.compaction_strategy_options.size()));
for (Map.Entry<String, String> _iter112 : struct.compaction_strategy_options.entrySet())
for (Map.Entry<String, String> _iter120 : struct.compaction_strategy_options.entrySet())
{
oprot.writeString(_iter112.getKey());
oprot.writeString(_iter112.getValue());
oprot.writeString(_iter120.getKey());
oprot.writeString(_iter120.getValue());
}
oprot.writeMapEnd();
}
@ -4098,10 +4098,10 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
oprot.writeFieldBegin(COMPRESSION_OPTIONS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.compression_options.size()));
for (Map.Entry<String, String> _iter113 : struct.compression_options.entrySet())
for (Map.Entry<String, String> _iter121 : struct.compression_options.entrySet())
{
oprot.writeString(_iter113.getKey());
oprot.writeString(_iter113.getValue());
oprot.writeString(_iter121.getKey());
oprot.writeString(_iter121.getValue());
}
oprot.writeMapEnd();
}
@ -4157,15 +4157,15 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
oprot.writeFieldBegin(TRIGGERS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.triggers.size()));
for (Map.Entry<String, Map<String,String>> _iter114 : struct.triggers.entrySet())
for (Map.Entry<String, Map<String,String>> _iter122 : struct.triggers.entrySet())
{
oprot.writeString(_iter114.getKey());
oprot.writeString(_iter122.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter114.getValue().size()));
for (Map.Entry<String, String> _iter115 : _iter114.getValue().entrySet())
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter122.getValue().size()));
for (Map.Entry<String, String> _iter123 : _iter122.getValue().entrySet())
{
oprot.writeString(_iter115.getKey());
oprot.writeString(_iter115.getValue());
oprot.writeString(_iter123.getKey());
oprot.writeString(_iter123.getValue());
}
oprot.writeMapEnd();
}
@ -4322,9 +4322,9 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
if (struct.isSetColumn_metadata()) {
{
oprot.writeI32(struct.column_metadata.size());
for (ColumnDef _iter116 : struct.column_metadata)
for (ColumnDef _iter124 : struct.column_metadata)
{
_iter116.write(oprot);
_iter124.write(oprot);
}
}
}
@ -4358,20 +4358,20 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
if (struct.isSetCompaction_strategy_options()) {
{
oprot.writeI32(struct.compaction_strategy_options.size());
for (Map.Entry<String, String> _iter117 : struct.compaction_strategy_options.entrySet())
for (Map.Entry<String, String> _iter125 : struct.compaction_strategy_options.entrySet())
{
oprot.writeString(_iter117.getKey());
oprot.writeString(_iter117.getValue());
oprot.writeString(_iter125.getKey());
oprot.writeString(_iter125.getValue());
}
}
}
if (struct.isSetCompression_options()) {
{
oprot.writeI32(struct.compression_options.size());
for (Map.Entry<String, String> _iter118 : struct.compression_options.entrySet())
for (Map.Entry<String, String> _iter126 : struct.compression_options.entrySet())
{
oprot.writeString(_iter118.getKey());
oprot.writeString(_iter118.getValue());
oprot.writeString(_iter126.getKey());
oprot.writeString(_iter126.getValue());
}
}
}
@ -4402,15 +4402,15 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
if (struct.isSetTriggers()) {
{
oprot.writeI32(struct.triggers.size());
for (Map.Entry<String, Map<String,String>> _iter119 : struct.triggers.entrySet())
for (Map.Entry<String, Map<String,String>> _iter127 : struct.triggers.entrySet())
{
oprot.writeString(_iter119.getKey());
oprot.writeString(_iter127.getKey());
{
oprot.writeI32(_iter119.getValue().size());
for (Map.Entry<String, String> _iter120 : _iter119.getValue().entrySet())
oprot.writeI32(_iter127.getValue().size());
for (Map.Entry<String, String> _iter128 : _iter127.getValue().entrySet())
{
oprot.writeString(_iter120.getKey());
oprot.writeString(_iter120.getValue());
oprot.writeString(_iter128.getKey());
oprot.writeString(_iter128.getValue());
}
}
}
@ -4478,14 +4478,14 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
}
if (incoming.get(5)) {
{
org.apache.thrift.protocol.TList _list121 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.column_metadata = new ArrayList<ColumnDef>(_list121.size);
for (int _i122 = 0; _i122 < _list121.size; ++_i122)
org.apache.thrift.protocol.TList _list129 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.column_metadata = new ArrayList<ColumnDef>(_list129.size);
for (int _i130 = 0; _i130 < _list129.size; ++_i130)
{
ColumnDef _elem123; // required
_elem123 = new ColumnDef();
_elem123.read(iprot);
struct.column_metadata.add(_elem123);
ColumnDef _elem131; // required
_elem131 = new ColumnDef();
_elem131.read(iprot);
struct.column_metadata.add(_elem131);
}
}
struct.setColumn_metadataIsSet(true);
@ -4528,30 +4528,30 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
}
if (incoming.get(15)) {
{
org.apache.thrift.protocol.TMap _map124 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.compaction_strategy_options = new HashMap<String,String>(2*_map124.size);
for (int _i125 = 0; _i125 < _map124.size; ++_i125)
org.apache.thrift.protocol.TMap _map132 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.compaction_strategy_options = new HashMap<String,String>(2*_map132.size);
for (int _i133 = 0; _i133 < _map132.size; ++_i133)
{
String _key126; // required
String _val127; // required
_key126 = iprot.readString();
_val127 = iprot.readString();
struct.compaction_strategy_options.put(_key126, _val127);
String _key134; // required
String _val135; // required
_key134 = iprot.readString();
_val135 = iprot.readString();
struct.compaction_strategy_options.put(_key134, _val135);
}
}
struct.setCompaction_strategy_optionsIsSet(true);
}
if (incoming.get(16)) {
{
org.apache.thrift.protocol.TMap _map128 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.compression_options = new HashMap<String,String>(2*_map128.size);
for (int _i129 = 0; _i129 < _map128.size; ++_i129)
org.apache.thrift.protocol.TMap _map136 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.compression_options = new HashMap<String,String>(2*_map136.size);
for (int _i137 = 0; _i137 < _map136.size; ++_i137)
{
String _key130; // required
String _val131; // required
_key130 = iprot.readString();
_val131 = iprot.readString();
struct.compression_options.put(_key130, _val131);
String _key138; // required
String _val139; // required
_key138 = iprot.readString();
_val139 = iprot.readString();
struct.compression_options.put(_key138, _val139);
}
}
struct.setCompression_optionsIsSet(true);
@ -4590,26 +4590,26 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
}
if (incoming.get(25)) {
{
org.apache.thrift.protocol.TMap _map132 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
struct.triggers = new HashMap<String,Map<String,String>>(2*_map132.size);
for (int _i133 = 0; _i133 < _map132.size; ++_i133)
org.apache.thrift.protocol.TMap _map140 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
struct.triggers = new HashMap<String,Map<String,String>>(2*_map140.size);
for (int _i141 = 0; _i141 < _map140.size; ++_i141)
{
String _key134; // required
Map<String,String> _val135; // required
_key134 = iprot.readString();
String _key142; // required
Map<String,String> _val143; // required
_key142 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map136 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
_val135 = new HashMap<String,String>(2*_map136.size);
for (int _i137 = 0; _i137 < _map136.size; ++_i137)
org.apache.thrift.protocol.TMap _map144 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
_val143 = new HashMap<String,String>(2*_map144.size);
for (int _i145 = 0; _i145 < _map144.size; ++_i145)
{
String _key138; // required
String _val139; // required
_key138 = iprot.readString();
_val139 = iprot.readString();
_val135.put(_key138, _val139);
String _key146; // required
String _val147; // required
_key146 = iprot.readString();
_val147 = iprot.readString();
_val143.put(_key146, _val147);
}
}
struct.triggers.put(_key134, _val135);
struct.triggers.put(_key142, _val143);
}
}
struct.setTriggersIsSet(true);

View File

@ -767,15 +767,15 @@ public class ColumnDef implements org.apache.thrift.TBase<ColumnDef, ColumnDef._
case 5: // INDEX_OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map82 = iprot.readMapBegin();
struct.index_options = new HashMap<String,String>(2*_map82.size);
for (int _i83 = 0; _i83 < _map82.size; ++_i83)
org.apache.thrift.protocol.TMap _map90 = iprot.readMapBegin();
struct.index_options = new HashMap<String,String>(2*_map90.size);
for (int _i91 = 0; _i91 < _map90.size; ++_i91)
{
String _key84; // required
String _val85; // required
_key84 = iprot.readString();
_val85 = iprot.readString();
struct.index_options.put(_key84, _val85);
String _key92; // required
String _val93; // required
_key92 = iprot.readString();
_val93 = iprot.readString();
struct.index_options.put(_key92, _val93);
}
iprot.readMapEnd();
}
@ -828,10 +828,10 @@ public class ColumnDef implements org.apache.thrift.TBase<ColumnDef, ColumnDef._
oprot.writeFieldBegin(INDEX_OPTIONS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.index_options.size()));
for (Map.Entry<String, String> _iter86 : struct.index_options.entrySet())
for (Map.Entry<String, String> _iter94 : struct.index_options.entrySet())
{
oprot.writeString(_iter86.getKey());
oprot.writeString(_iter86.getValue());
oprot.writeString(_iter94.getKey());
oprot.writeString(_iter94.getValue());
}
oprot.writeMapEnd();
}
@ -877,10 +877,10 @@ public class ColumnDef implements org.apache.thrift.TBase<ColumnDef, ColumnDef._
if (struct.isSetIndex_options()) {
{
oprot.writeI32(struct.index_options.size());
for (Map.Entry<String, String> _iter87 : struct.index_options.entrySet())
for (Map.Entry<String, String> _iter95 : struct.index_options.entrySet())
{
oprot.writeString(_iter87.getKey());
oprot.writeString(_iter87.getValue());
oprot.writeString(_iter95.getKey());
oprot.writeString(_iter95.getValue());
}
}
}
@ -904,15 +904,15 @@ public class ColumnDef implements org.apache.thrift.TBase<ColumnDef, ColumnDef._
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TMap _map88 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.index_options = new HashMap<String,String>(2*_map88.size);
for (int _i89 = 0; _i89 < _map88.size; ++_i89)
org.apache.thrift.protocol.TMap _map96 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.index_options = new HashMap<String,String>(2*_map96.size);
for (int _i97 = 0; _i97 < _map96.size; ++_i97)
{
String _key90; // required
String _val91; // required
_key90 = iprot.readString();
_val91 = iprot.readString();
struct.index_options.put(_key90, _val91);
String _key98; // required
String _val99; // required
_key98 = iprot.readString();
_val99 = iprot.readString();
struct.index_options.put(_key98, _val99);
}
}
struct.setIndex_optionsIsSet(true);

View File

@ -658,15 +658,15 @@ public class CqlMetadata implements org.apache.thrift.TBase<CqlMetadata, CqlMeta
case 1: // NAME_TYPES
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map166 = iprot.readMapBegin();
struct.name_types = new HashMap<ByteBuffer,String>(2*_map166.size);
for (int _i167 = 0; _i167 < _map166.size; ++_i167)
org.apache.thrift.protocol.TMap _map174 = iprot.readMapBegin();
struct.name_types = new HashMap<ByteBuffer,String>(2*_map174.size);
for (int _i175 = 0; _i175 < _map174.size; ++_i175)
{
ByteBuffer _key168; // required
String _val169; // required
_key168 = iprot.readBinary();
_val169 = iprot.readString();
struct.name_types.put(_key168, _val169);
ByteBuffer _key176; // required
String _val177; // required
_key176 = iprot.readBinary();
_val177 = iprot.readString();
struct.name_types.put(_key176, _val177);
}
iprot.readMapEnd();
}
@ -678,15 +678,15 @@ public class CqlMetadata implements org.apache.thrift.TBase<CqlMetadata, CqlMeta
case 2: // VALUE_TYPES
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map170 = iprot.readMapBegin();
struct.value_types = new HashMap<ByteBuffer,String>(2*_map170.size);
for (int _i171 = 0; _i171 < _map170.size; ++_i171)
org.apache.thrift.protocol.TMap _map178 = iprot.readMapBegin();
struct.value_types = new HashMap<ByteBuffer,String>(2*_map178.size);
for (int _i179 = 0; _i179 < _map178.size; ++_i179)
{
ByteBuffer _key172; // required
String _val173; // required
_key172 = iprot.readBinary();
_val173 = iprot.readString();
struct.value_types.put(_key172, _val173);
ByteBuffer _key180; // required
String _val181; // required
_key180 = iprot.readBinary();
_val181 = iprot.readString();
struct.value_types.put(_key180, _val181);
}
iprot.readMapEnd();
}
@ -730,10 +730,10 @@ public class CqlMetadata implements org.apache.thrift.TBase<CqlMetadata, CqlMeta
oprot.writeFieldBegin(NAME_TYPES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.name_types.size()));
for (Map.Entry<ByteBuffer, String> _iter174 : struct.name_types.entrySet())
for (Map.Entry<ByteBuffer, String> _iter182 : struct.name_types.entrySet())
{
oprot.writeBinary(_iter174.getKey());
oprot.writeString(_iter174.getValue());
oprot.writeBinary(_iter182.getKey());
oprot.writeString(_iter182.getValue());
}
oprot.writeMapEnd();
}
@ -743,10 +743,10 @@ public class CqlMetadata implements org.apache.thrift.TBase<CqlMetadata, CqlMeta
oprot.writeFieldBegin(VALUE_TYPES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.value_types.size()));
for (Map.Entry<ByteBuffer, String> _iter175 : struct.value_types.entrySet())
for (Map.Entry<ByteBuffer, String> _iter183 : struct.value_types.entrySet())
{
oprot.writeBinary(_iter175.getKey());
oprot.writeString(_iter175.getValue());
oprot.writeBinary(_iter183.getKey());
oprot.writeString(_iter183.getValue());
}
oprot.writeMapEnd();
}
@ -781,18 +781,18 @@ public class CqlMetadata implements org.apache.thrift.TBase<CqlMetadata, CqlMeta
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.name_types.size());
for (Map.Entry<ByteBuffer, String> _iter176 : struct.name_types.entrySet())
for (Map.Entry<ByteBuffer, String> _iter184 : struct.name_types.entrySet())
{
oprot.writeBinary(_iter176.getKey());
oprot.writeString(_iter176.getValue());
oprot.writeBinary(_iter184.getKey());
oprot.writeString(_iter184.getValue());
}
}
{
oprot.writeI32(struct.value_types.size());
for (Map.Entry<ByteBuffer, String> _iter177 : struct.value_types.entrySet())
for (Map.Entry<ByteBuffer, String> _iter185 : struct.value_types.entrySet())
{
oprot.writeBinary(_iter177.getKey());
oprot.writeString(_iter177.getValue());
oprot.writeBinary(_iter185.getKey());
oprot.writeString(_iter185.getValue());
}
}
oprot.writeString(struct.default_name_type);
@ -803,28 +803,28 @@ public class CqlMetadata implements org.apache.thrift.TBase<CqlMetadata, CqlMeta
public void read(org.apache.thrift.protocol.TProtocol prot, CqlMetadata struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
org.apache.thrift.protocol.TMap _map178 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.name_types = new HashMap<ByteBuffer,String>(2*_map178.size);
for (int _i179 = 0; _i179 < _map178.size; ++_i179)
org.apache.thrift.protocol.TMap _map186 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.name_types = new HashMap<ByteBuffer,String>(2*_map186.size);
for (int _i187 = 0; _i187 < _map186.size; ++_i187)
{
ByteBuffer _key180; // required
String _val181; // required
_key180 = iprot.readBinary();
_val181 = iprot.readString();
struct.name_types.put(_key180, _val181);
ByteBuffer _key188; // required
String _val189; // required
_key188 = iprot.readBinary();
_val189 = iprot.readString();
struct.name_types.put(_key188, _val189);
}
}
struct.setName_typesIsSet(true);
{
org.apache.thrift.protocol.TMap _map182 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.value_types = new HashMap<ByteBuffer,String>(2*_map182.size);
for (int _i183 = 0; _i183 < _map182.size; ++_i183)
org.apache.thrift.protocol.TMap _map190 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.value_types = new HashMap<ByteBuffer,String>(2*_map190.size);
for (int _i191 = 0; _i191 < _map190.size; ++_i191)
{
ByteBuffer _key184; // required
String _val185; // required
_key184 = iprot.readBinary();
_val185 = iprot.readString();
struct.value_types.put(_key184, _val185);
ByteBuffer _key192; // required
String _val193; // required
_key192 = iprot.readBinary();
_val193 = iprot.readString();
struct.value_types.put(_key192, _val193);
}
}
struct.setValue_typesIsSet(true);

View File

@ -649,13 +649,13 @@ public class CqlPreparedResult implements org.apache.thrift.TBase<CqlPreparedRes
case 3: // VARIABLE_TYPES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list194 = iprot.readListBegin();
struct.variable_types = new ArrayList<String>(_list194.size);
for (int _i195 = 0; _i195 < _list194.size; ++_i195)
org.apache.thrift.protocol.TList _list202 = iprot.readListBegin();
struct.variable_types = new ArrayList<String>(_list202.size);
for (int _i203 = 0; _i203 < _list202.size; ++_i203)
{
String _elem196; // required
_elem196 = iprot.readString();
struct.variable_types.add(_elem196);
String _elem204; // required
_elem204 = iprot.readString();
struct.variable_types.add(_elem204);
}
iprot.readListEnd();
}
@ -667,13 +667,13 @@ public class CqlPreparedResult implements org.apache.thrift.TBase<CqlPreparedRes
case 4: // VARIABLE_NAMES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list197 = iprot.readListBegin();
struct.variable_names = new ArrayList<String>(_list197.size);
for (int _i198 = 0; _i198 < _list197.size; ++_i198)
org.apache.thrift.protocol.TList _list205 = iprot.readListBegin();
struct.variable_names = new ArrayList<String>(_list205.size);
for (int _i206 = 0; _i206 < _list205.size; ++_i206)
{
String _elem199; // required
_elem199 = iprot.readString();
struct.variable_names.add(_elem199);
String _elem207; // required
_elem207 = iprot.readString();
struct.variable_names.add(_elem207);
}
iprot.readListEnd();
}
@ -714,9 +714,9 @@ public class CqlPreparedResult implements org.apache.thrift.TBase<CqlPreparedRes
oprot.writeFieldBegin(VARIABLE_TYPES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.variable_types.size()));
for (String _iter200 : struct.variable_types)
for (String _iter208 : struct.variable_types)
{
oprot.writeString(_iter200);
oprot.writeString(_iter208);
}
oprot.writeListEnd();
}
@ -728,9 +728,9 @@ public class CqlPreparedResult implements org.apache.thrift.TBase<CqlPreparedRes
oprot.writeFieldBegin(VARIABLE_NAMES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.variable_names.size()));
for (String _iter201 : struct.variable_names)
for (String _iter209 : struct.variable_names)
{
oprot.writeString(_iter201);
oprot.writeString(_iter209);
}
oprot.writeListEnd();
}
@ -767,18 +767,18 @@ public class CqlPreparedResult implements org.apache.thrift.TBase<CqlPreparedRes
if (struct.isSetVariable_types()) {
{
oprot.writeI32(struct.variable_types.size());
for (String _iter202 : struct.variable_types)
for (String _iter210 : struct.variable_types)
{
oprot.writeString(_iter202);
oprot.writeString(_iter210);
}
}
}
if (struct.isSetVariable_names()) {
{
oprot.writeI32(struct.variable_names.size());
for (String _iter203 : struct.variable_names)
for (String _iter211 : struct.variable_names)
{
oprot.writeString(_iter203);
oprot.writeString(_iter211);
}
}
}
@ -794,26 +794,26 @@ public class CqlPreparedResult implements org.apache.thrift.TBase<CqlPreparedRes
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list204 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.variable_types = new ArrayList<String>(_list204.size);
for (int _i205 = 0; _i205 < _list204.size; ++_i205)
org.apache.thrift.protocol.TList _list212 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.variable_types = new ArrayList<String>(_list212.size);
for (int _i213 = 0; _i213 < _list212.size; ++_i213)
{
String _elem206; // required
_elem206 = iprot.readString();
struct.variable_types.add(_elem206);
String _elem214; // required
_elem214 = iprot.readString();
struct.variable_types.add(_elem214);
}
}
struct.setVariable_typesIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list207 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.variable_names = new ArrayList<String>(_list207.size);
for (int _i208 = 0; _i208 < _list207.size; ++_i208)
org.apache.thrift.protocol.TList _list215 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.variable_names = new ArrayList<String>(_list215.size);
for (int _i216 = 0; _i216 < _list215.size; ++_i216)
{
String _elem209; // required
_elem209 = iprot.readString();
struct.variable_names.add(_elem209);
String _elem217; // required
_elem217 = iprot.readString();
struct.variable_names.add(_elem217);
}
}
struct.setVariable_namesIsSet(true);

View File

@ -644,14 +644,14 @@ public class CqlResult implements org.apache.thrift.TBase<CqlResult, CqlResult._
case 2: // ROWS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list186 = iprot.readListBegin();
struct.rows = new ArrayList<CqlRow>(_list186.size);
for (int _i187 = 0; _i187 < _list186.size; ++_i187)
org.apache.thrift.protocol.TList _list194 = iprot.readListBegin();
struct.rows = new ArrayList<CqlRow>(_list194.size);
for (int _i195 = 0; _i195 < _list194.size; ++_i195)
{
CqlRow _elem188; // required
_elem188 = new CqlRow();
_elem188.read(iprot);
struct.rows.add(_elem188);
CqlRow _elem196; // required
_elem196 = new CqlRow();
_elem196.read(iprot);
struct.rows.add(_elem196);
}
iprot.readListEnd();
}
@ -702,9 +702,9 @@ public class CqlResult implements org.apache.thrift.TBase<CqlResult, CqlResult._
oprot.writeFieldBegin(ROWS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.rows.size()));
for (CqlRow _iter189 : struct.rows)
for (CqlRow _iter197 : struct.rows)
{
_iter189.write(oprot);
_iter197.write(oprot);
}
oprot.writeListEnd();
}
@ -755,9 +755,9 @@ public class CqlResult implements org.apache.thrift.TBase<CqlResult, CqlResult._
if (struct.isSetRows()) {
{
oprot.writeI32(struct.rows.size());
for (CqlRow _iter190 : struct.rows)
for (CqlRow _iter198 : struct.rows)
{
_iter190.write(oprot);
_iter198.write(oprot);
}
}
}
@ -777,14 +777,14 @@ public class CqlResult implements org.apache.thrift.TBase<CqlResult, CqlResult._
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list191 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.rows = new ArrayList<CqlRow>(_list191.size);
for (int _i192 = 0; _i192 < _list191.size; ++_i192)
org.apache.thrift.protocol.TList _list199 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.rows = new ArrayList<CqlRow>(_list199.size);
for (int _i200 = 0; _i200 < _list199.size; ++_i200)
{
CqlRow _elem193; // required
_elem193 = new CqlRow();
_elem193.read(iprot);
struct.rows.add(_elem193);
CqlRow _elem201; // required
_elem201 = new CqlRow();
_elem201.read(iprot);
struct.rows.add(_elem201);
}
}
struct.setRowsIsSet(true);

View File

@ -478,14 +478,14 @@ public class CqlRow implements org.apache.thrift.TBase<CqlRow, CqlRow._Fields>,
case 2: // COLUMNS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list158 = iprot.readListBegin();
struct.columns = new ArrayList<Column>(_list158.size);
for (int _i159 = 0; _i159 < _list158.size; ++_i159)
org.apache.thrift.protocol.TList _list166 = iprot.readListBegin();
struct.columns = new ArrayList<Column>(_list166.size);
for (int _i167 = 0; _i167 < _list166.size; ++_i167)
{
Column _elem160; // required
_elem160 = new Column();
_elem160.read(iprot);
struct.columns.add(_elem160);
Column _elem168; // required
_elem168 = new Column();
_elem168.read(iprot);
struct.columns.add(_elem168);
}
iprot.readListEnd();
}
@ -518,9 +518,9 @@ public class CqlRow implements org.apache.thrift.TBase<CqlRow, CqlRow._Fields>,
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
for (Column _iter161 : struct.columns)
for (Column _iter169 : struct.columns)
{
_iter161.write(oprot);
_iter169.write(oprot);
}
oprot.writeListEnd();
}
@ -546,9 +546,9 @@ public class CqlRow implements org.apache.thrift.TBase<CqlRow, CqlRow._Fields>,
oprot.writeBinary(struct.key);
{
oprot.writeI32(struct.columns.size());
for (Column _iter162 : struct.columns)
for (Column _iter170 : struct.columns)
{
_iter162.write(oprot);
_iter170.write(oprot);
}
}
}
@ -559,14 +559,14 @@ public class CqlRow implements org.apache.thrift.TBase<CqlRow, CqlRow._Fields>,
struct.key = iprot.readBinary();
struct.setKeyIsSet(true);
{
org.apache.thrift.protocol.TList _list163 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.columns = new ArrayList<Column>(_list163.size);
for (int _i164 = 0; _i164 < _list163.size; ++_i164)
org.apache.thrift.protocol.TList _list171 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.columns = new ArrayList<Column>(_list171.size);
for (int _i172 = 0; _i172 < _list171.size; ++_i172)
{
Column _elem165; // required
_elem165 = new Column();
_elem165.read(iprot);
struct.columns.add(_elem165);
Column _elem173; // required
_elem173 = new Column();
_elem173.read(iprot);
struct.columns.add(_elem173);
}
}
struct.setColumnsIsSet(true);

View File

@ -837,15 +837,15 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
case 3: // STRATEGY_OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map140 = iprot.readMapBegin();
struct.strategy_options = new HashMap<String,String>(2*_map140.size);
for (int _i141 = 0; _i141 < _map140.size; ++_i141)
org.apache.thrift.protocol.TMap _map148 = iprot.readMapBegin();
struct.strategy_options = new HashMap<String,String>(2*_map148.size);
for (int _i149 = 0; _i149 < _map148.size; ++_i149)
{
String _key142; // required
String _val143; // required
_key142 = iprot.readString();
_val143 = iprot.readString();
struct.strategy_options.put(_key142, _val143);
String _key150; // required
String _val151; // required
_key150 = iprot.readString();
_val151 = iprot.readString();
struct.strategy_options.put(_key150, _val151);
}
iprot.readMapEnd();
}
@ -865,14 +865,14 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
case 5: // CF_DEFS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list144 = iprot.readListBegin();
struct.cf_defs = new ArrayList<CfDef>(_list144.size);
for (int _i145 = 0; _i145 < _list144.size; ++_i145)
org.apache.thrift.protocol.TList _list152 = iprot.readListBegin();
struct.cf_defs = new ArrayList<CfDef>(_list152.size);
for (int _i153 = 0; _i153 < _list152.size; ++_i153)
{
CfDef _elem146; // required
_elem146 = new CfDef();
_elem146.read(iprot);
struct.cf_defs.add(_elem146);
CfDef _elem154; // required
_elem154 = new CfDef();
_elem154.read(iprot);
struct.cf_defs.add(_elem154);
}
iprot.readListEnd();
}
@ -919,10 +919,10 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
oprot.writeFieldBegin(STRATEGY_OPTIONS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.strategy_options.size()));
for (Map.Entry<String, String> _iter147 : struct.strategy_options.entrySet())
for (Map.Entry<String, String> _iter155 : struct.strategy_options.entrySet())
{
oprot.writeString(_iter147.getKey());
oprot.writeString(_iter147.getValue());
oprot.writeString(_iter155.getKey());
oprot.writeString(_iter155.getValue());
}
oprot.writeMapEnd();
}
@ -938,9 +938,9 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
oprot.writeFieldBegin(CF_DEFS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.cf_defs.size()));
for (CfDef _iter148 : struct.cf_defs)
for (CfDef _iter156 : struct.cf_defs)
{
_iter148.write(oprot);
_iter156.write(oprot);
}
oprot.writeListEnd();
}
@ -972,9 +972,9 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
oprot.writeString(struct.strategy_class);
{
oprot.writeI32(struct.cf_defs.size());
for (CfDef _iter149 : struct.cf_defs)
for (CfDef _iter157 : struct.cf_defs)
{
_iter149.write(oprot);
_iter157.write(oprot);
}
}
BitSet optionals = new BitSet();
@ -991,10 +991,10 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
if (struct.isSetStrategy_options()) {
{
oprot.writeI32(struct.strategy_options.size());
for (Map.Entry<String, String> _iter150 : struct.strategy_options.entrySet())
for (Map.Entry<String, String> _iter158 : struct.strategy_options.entrySet())
{
oprot.writeString(_iter150.getKey());
oprot.writeString(_iter150.getValue());
oprot.writeString(_iter158.getKey());
oprot.writeString(_iter158.getValue());
}
}
}
@ -1014,29 +1014,29 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
struct.strategy_class = iprot.readString();
struct.setStrategy_classIsSet(true);
{
org.apache.thrift.protocol.TList _list151 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.cf_defs = new ArrayList<CfDef>(_list151.size);
for (int _i152 = 0; _i152 < _list151.size; ++_i152)
org.apache.thrift.protocol.TList _list159 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.cf_defs = new ArrayList<CfDef>(_list159.size);
for (int _i160 = 0; _i160 < _list159.size; ++_i160)
{
CfDef _elem153; // required
_elem153 = new CfDef();
_elem153.read(iprot);
struct.cf_defs.add(_elem153);
CfDef _elem161; // required
_elem161 = new CfDef();
_elem161.read(iprot);
struct.cf_defs.add(_elem161);
}
}
struct.setCf_defsIsSet(true);
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map154 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.strategy_options = new HashMap<String,String>(2*_map154.size);
for (int _i155 = 0; _i155 < _map154.size; ++_i155)
org.apache.thrift.protocol.TMap _map162 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.strategy_options = new HashMap<String,String>(2*_map162.size);
for (int _i163 = 0; _i163 < _map162.size; ++_i163)
{
String _key156; // required
String _val157; // required
_key156 = iprot.readString();
_val157 = iprot.readString();
struct.strategy_options.put(_key156, _val157);
String _key164; // required
String _val165; // required
_key164 = iprot.readString();
_val165 = iprot.readString();
struct.strategy_options.put(_key164, _val165);
}
}
struct.setStrategy_optionsIsSet(true);

View File

@ -770,13 +770,13 @@ public class TokenRange implements org.apache.thrift.TBase<TokenRange, TokenRang
case 3: // ENDPOINTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
struct.endpoints = new ArrayList<String>(_list48.size);
for (int _i49 = 0; _i49 < _list48.size; ++_i49)
org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
struct.endpoints = new ArrayList<String>(_list56.size);
for (int _i57 = 0; _i57 < _list56.size; ++_i57)
{
String _elem50; // required
_elem50 = iprot.readString();
struct.endpoints.add(_elem50);
String _elem58; // required
_elem58 = iprot.readString();
struct.endpoints.add(_elem58);
}
iprot.readListEnd();
}
@ -788,13 +788,13 @@ public class TokenRange implements org.apache.thrift.TBase<TokenRange, TokenRang
case 4: // RPC_ENDPOINTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list51 = iprot.readListBegin();
struct.rpc_endpoints = new ArrayList<String>(_list51.size);
for (int _i52 = 0; _i52 < _list51.size; ++_i52)
org.apache.thrift.protocol.TList _list59 = iprot.readListBegin();
struct.rpc_endpoints = new ArrayList<String>(_list59.size);
for (int _i60 = 0; _i60 < _list59.size; ++_i60)
{
String _elem53; // required
_elem53 = iprot.readString();
struct.rpc_endpoints.add(_elem53);
String _elem61; // required
_elem61 = iprot.readString();
struct.rpc_endpoints.add(_elem61);
}
iprot.readListEnd();
}
@ -806,14 +806,14 @@ public class TokenRange implements org.apache.thrift.TBase<TokenRange, TokenRang
case 5: // ENDPOINT_DETAILS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list54 = iprot.readListBegin();
struct.endpoint_details = new ArrayList<EndpointDetails>(_list54.size);
for (int _i55 = 0; _i55 < _list54.size; ++_i55)
org.apache.thrift.protocol.TList _list62 = iprot.readListBegin();
struct.endpoint_details = new ArrayList<EndpointDetails>(_list62.size);
for (int _i63 = 0; _i63 < _list62.size; ++_i63)
{
EndpointDetails _elem56; // required
_elem56 = new EndpointDetails();
_elem56.read(iprot);
struct.endpoint_details.add(_elem56);
EndpointDetails _elem64; // required
_elem64 = new EndpointDetails();
_elem64.read(iprot);
struct.endpoint_details.add(_elem64);
}
iprot.readListEnd();
}
@ -851,9 +851,9 @@ public class TokenRange implements org.apache.thrift.TBase<TokenRange, TokenRang
oprot.writeFieldBegin(ENDPOINTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.endpoints.size()));
for (String _iter57 : struct.endpoints)
for (String _iter65 : struct.endpoints)
{
oprot.writeString(_iter57);
oprot.writeString(_iter65);
}
oprot.writeListEnd();
}
@ -864,9 +864,9 @@ public class TokenRange implements org.apache.thrift.TBase<TokenRange, TokenRang
oprot.writeFieldBegin(RPC_ENDPOINTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.rpc_endpoints.size()));
for (String _iter58 : struct.rpc_endpoints)
for (String _iter66 : struct.rpc_endpoints)
{
oprot.writeString(_iter58);
oprot.writeString(_iter66);
}
oprot.writeListEnd();
}
@ -878,9 +878,9 @@ public class TokenRange implements org.apache.thrift.TBase<TokenRange, TokenRang
oprot.writeFieldBegin(ENDPOINT_DETAILS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.endpoint_details.size()));
for (EndpointDetails _iter59 : struct.endpoint_details)
for (EndpointDetails _iter67 : struct.endpoint_details)
{
_iter59.write(oprot);
_iter67.write(oprot);
}
oprot.writeListEnd();
}
@ -908,9 +908,9 @@ public class TokenRange implements org.apache.thrift.TBase<TokenRange, TokenRang
oprot.writeString(struct.end_token);
{
oprot.writeI32(struct.endpoints.size());
for (String _iter60 : struct.endpoints)
for (String _iter68 : struct.endpoints)
{
oprot.writeString(_iter60);
oprot.writeString(_iter68);
}
}
BitSet optionals = new BitSet();
@ -924,18 +924,18 @@ public class TokenRange implements org.apache.thrift.TBase<TokenRange, TokenRang
if (struct.isSetRpc_endpoints()) {
{
oprot.writeI32(struct.rpc_endpoints.size());
for (String _iter61 : struct.rpc_endpoints)
for (String _iter69 : struct.rpc_endpoints)
{
oprot.writeString(_iter61);
oprot.writeString(_iter69);
}
}
}
if (struct.isSetEndpoint_details()) {
{
oprot.writeI32(struct.endpoint_details.size());
for (EndpointDetails _iter62 : struct.endpoint_details)
for (EndpointDetails _iter70 : struct.endpoint_details)
{
_iter62.write(oprot);
_iter70.write(oprot);
}
}
}
@ -949,40 +949,40 @@ public class TokenRange implements org.apache.thrift.TBase<TokenRange, TokenRang
struct.end_token = iprot.readString();
struct.setEnd_tokenIsSet(true);
{
org.apache.thrift.protocol.TList _list63 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.endpoints = new ArrayList<String>(_list63.size);
for (int _i64 = 0; _i64 < _list63.size; ++_i64)
org.apache.thrift.protocol.TList _list71 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.endpoints = new ArrayList<String>(_list71.size);
for (int _i72 = 0; _i72 < _list71.size; ++_i72)
{
String _elem65; // required
_elem65 = iprot.readString();
struct.endpoints.add(_elem65);
String _elem73; // required
_elem73 = iprot.readString();
struct.endpoints.add(_elem73);
}
}
struct.setEndpointsIsSet(true);
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list66 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.rpc_endpoints = new ArrayList<String>(_list66.size);
for (int _i67 = 0; _i67 < _list66.size; ++_i67)
org.apache.thrift.protocol.TList _list74 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.rpc_endpoints = new ArrayList<String>(_list74.size);
for (int _i75 = 0; _i75 < _list74.size; ++_i75)
{
String _elem68; // required
_elem68 = iprot.readString();
struct.rpc_endpoints.add(_elem68);
String _elem76; // required
_elem76 = iprot.readString();
struct.rpc_endpoints.add(_elem76);
}
}
struct.setRpc_endpointsIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.endpoint_details = new ArrayList<EndpointDetails>(_list69.size);
for (int _i70 = 0; _i70 < _list69.size; ++_i70)
org.apache.thrift.protocol.TList _list77 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.endpoint_details = new ArrayList<EndpointDetails>(_list77.size);
for (int _i78 = 0; _i78 < _list77.size; ++_i78)
{
EndpointDetails _elem71; // required
_elem71 = new EndpointDetails();
_elem71.read(iprot);
struct.endpoint_details.add(_elem71);
EndpointDetails _elem79; // required
_elem79 = new EndpointDetails();
_elem79.read(iprot);
struct.endpoint_details.add(_elem79);
}
}
struct.setEndpoint_detailsIsSet(true);

View File

@ -469,6 +469,8 @@ public abstract class ModificationStatement implements CQLStatement
ColumnFamily cf = TreeMapBackedSortedColumns.factory.create(cfm);
for (Operation condition : columnConditions)
condition.execute(key, cf, clusteringPrefix.copy(), params);
assert !cf.isEmpty();
return cf;
}

View File

@ -227,7 +227,7 @@ public class StorageProxy implements StorageProxyMBean
Tracing.trace("Reading existing values for CAS precondition");
long timestamp = System.currentTimeMillis();
ReadCommand readCommand;
if (expected == null)
if (expected == null || expected.isEmpty())
{
SliceQueryFilter filter = prefix == null
? new SliceQueryFilter(ByteBufferUtil.EMPTY_BYTE_BUFFER, ByteBufferUtil.EMPTY_BYTE_BUFFER, false, 1)
@ -236,6 +236,7 @@ public class StorageProxy implements StorageProxyMBean
}
else
{
assert !expected.isEmpty();
readCommand = new SliceByNamesReadCommand(keyspaceName, key, cfName, timestamp, new NamesQueryFilter(ImmutableSortedSet.copyOf(expected.getColumnNames())));
}
List<Row> rows = read(Arrays.asList(readCommand), ConsistencyLevel.QUORUM);
@ -243,7 +244,8 @@ public class StorageProxy implements StorageProxyMBean
if (!casApplies(expected, current))
{
Tracing.trace("CAS precondition {} does not match current values {}", expected, current);
return current;
// We should not return null as this means success
return current == null ? EmptyColumns.factory.create(metadata) : current;
}
// finish the paxos round w/ the desired updates

View File

@ -692,7 +692,7 @@ public class CassandraServer implements Cassandra.Iface
}
}
public List<Column> cas(ByteBuffer key, String column_family, List<Column> expected, List<Column> updates, ConsistencyLevel consistency_level)
public CASResult cas(ByteBuffer key, String column_family, List<Column> expected, List<Column> updates, ConsistencyLevel consistency_level)
throws InvalidRequestException, UnavailableException, TimedOutException
{
if (startSessionIfRequested())
@ -736,7 +736,7 @@ public class CassandraServer implements Cassandra.Iface
cfUpdates.addColumn(column.name, column.value, column.timestamp);
ColumnFamily cfExpected;
if (expected == null)
if (expected.isEmpty())
{
cfExpected = null;
}
@ -750,8 +750,8 @@ public class CassandraServer implements Cassandra.Iface
schedule(DatabaseDescriptor.getWriteRpcTimeout());
ColumnFamily result = StorageProxy.cas(cState.getKeyspace(), column_family, key, null, cfExpected, cfUpdates, ThriftConversion.fromThrift(consistency_level));
return result == null
? null
: thriftifyColumnsAsColumns(result.getSortedColumns(), System.currentTimeMillis());
? new CASResult(true)
: new CASResult(false).setCurrent_values(thriftifyColumnsAsColumns(result.getSortedColumns(), System.currentTimeMillis()));
}
catch (RequestTimeoutException e)
{

View File

@ -235,15 +235,19 @@ class TestMutations(ThriftTester):
def cas(expected, updates):
return client.cas('key1', 'Standard1', expected, updates, ConsistencyLevel.ONE)
assert not cas(_SIMPLE_COLUMNS, _SIMPLE_COLUMNS)
cas_result = cas(_SIMPLE_COLUMNS, _SIMPLE_COLUMNS)
assert not cas_result.success
assert len(cas_result.current_values) == 0, cas_result
assert cas(None, _SIMPLE_COLUMNS)
assert cas([], _SIMPLE_COLUMNS).success
result = [cosc.column for cosc in _big_slice('key1', ColumnParent('Standard1'))]
# CAS will use its own timestamp, so we can't just compare result == _SIMPLE_COLUMNS
assert dict((c.name, c.value) for c in result) == dict((c.name, c.value) for c in _SIMPLE_COLUMNS), result
assert not cas(None, _SIMPLE_COLUMNS)
cas_result = cas([], _SIMPLE_COLUMNS)
assert not cas_result.success
# When we CAS for non-existence, current_values is the first live column of the row
assert dict((c.name, c.value) for c in cas_result.current_values) == { _SIMPLE_COLUMNS[0].name : _SIMPLE_COLUMNS[0].value }, cas_result
# CL.SERIAL for reads
assert client.get('key1', ColumnPath('Standard1', column='c1'), ConsistencyLevel.SERIAL).column.value == 'value1'