HBASE-8832 Ensure HBASE-4658 is supported by Thrift 2 (Hamed Madani)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1502431 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b5459be95d
commit
4d895726d9
|
@ -25,11 +25,14 @@ import org.apache.hadoop.hbase.KeyValueUtil;
|
||||||
import org.apache.hadoop.hbase.client.*;
|
import org.apache.hadoop.hbase.client.*;
|
||||||
import org.apache.hadoop.hbase.filter.ParseFilter;
|
import org.apache.hadoop.hbase.filter.ParseFilter;
|
||||||
import org.apache.hadoop.hbase.thrift2.generated.*;
|
import org.apache.hadoop.hbase.thrift2.generated.*;
|
||||||
|
import org.apache.hadoop.hbase.util.Bytes;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import static org.apache.hadoop.hbase.util.Bytes.getBytes;
|
||||||
|
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
public class ThriftUtilities {
|
public class ThriftUtilities {
|
||||||
|
|
||||||
|
@ -62,6 +65,15 @@ public class ThriftUtilities {
|
||||||
out.setMaxVersions(in.getMaxVersions());
|
out.setMaxVersions(in.getMaxVersions());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in.isSetFilterString()) {
|
||||||
|
ParseFilter parseFilter = new ParseFilter();
|
||||||
|
out.setFilter(parseFilter.parseFilterString(in.getFilterString()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in.isSetAttributes()) {
|
||||||
|
addAttributes(out,in.getAttributes());
|
||||||
|
}
|
||||||
|
|
||||||
if (!in.isSetColumns()) {
|
if (!in.isSetColumns()) {
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
@ -74,11 +86,6 @@ public class ThriftUtilities {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in.isSetFilterString()) {
|
|
||||||
ParseFilter parseFilter = new ParseFilter();
|
|
||||||
out.setFilter(parseFilter.parseFilterString(in.getFilterString()));
|
|
||||||
}
|
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,6 +178,10 @@ public class ThriftUtilities {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in.isSetAttributes()) {
|
||||||
|
addAttributes(out,in.getAttributes());
|
||||||
|
}
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,6 +245,11 @@ public class ThriftUtilities {
|
||||||
out = new Delete(in.getRow());
|
out = new Delete(in.getRow());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in.isSetAttributes()) {
|
||||||
|
addAttributes(out,in.getAttributes());
|
||||||
|
}
|
||||||
|
|
||||||
out.setDurability(in.isWriteToWal() ? Durability.SYNC_WAL : Durability.SKIP_WAL);
|
out.setDurability(in.isWriteToWal() ? Durability.SYNC_WAL : Durability.SKIP_WAL);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
@ -329,6 +345,10 @@ public class ThriftUtilities {
|
||||||
out.setFilter(parseFilter.parseFilterString(in.getFilterString()));
|
out.setFilter(parseFilter.parseFilterString(in.getFilterString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in.isSetAttributes()) {
|
||||||
|
addAttributes(out,in.getAttributes());
|
||||||
|
}
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,7 +357,27 @@ public class ThriftUtilities {
|
||||||
for (TColumnIncrement column : in.getColumns()) {
|
for (TColumnIncrement column : in.getColumns()) {
|
||||||
out.addColumn(column.getFamily(), column.getQualifier(), column.getAmount());
|
out.addColumn(column.getFamily(), column.getQualifier(), column.getAmount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in.isSetAttributes()) {
|
||||||
|
addAttributes(out,in.getAttributes());
|
||||||
|
}
|
||||||
|
|
||||||
out.setDurability(in.isWriteToWal() ? Durability.SYNC_WAL : Durability.SKIP_WAL);
|
out.setDurability(in.isWriteToWal() ? Durability.SYNC_WAL : Durability.SKIP_WAL);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds all the attributes into the Operation object
|
||||||
|
*/
|
||||||
|
private static void addAttributes(OperationWithAttributes op,
|
||||||
|
Map<ByteBuffer, ByteBuffer> attributes) {
|
||||||
|
if (attributes == null || attributes.size() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> entry : attributes.entrySet()) {
|
||||||
|
String name = Bytes.toStringBinary(getBytes(entry.getKey()));
|
||||||
|
byte[] value = getBytes(entry.getValue());
|
||||||
|
op.setAttribute(name, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3);
|
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3);
|
||||||
private static final org.apache.thrift.protocol.TField DELETE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteType", org.apache.thrift.protocol.TType.I32, (short)4);
|
private static final org.apache.thrift.protocol.TField DELETE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteType", org.apache.thrift.protocol.TType.I32, (short)4);
|
||||||
private static final org.apache.thrift.protocol.TField WRITE_TO_WAL_FIELD_DESC = new org.apache.thrift.protocol.TField("writeToWal", org.apache.thrift.protocol.TType.BOOL, (short)5);
|
private static final org.apache.thrift.protocol.TField WRITE_TO_WAL_FIELD_DESC = new org.apache.thrift.protocol.TField("writeToWal", org.apache.thrift.protocol.TType.BOOL, (short)5);
|
||||||
|
private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)6);
|
||||||
|
|
||||||
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
||||||
static {
|
static {
|
||||||
|
@ -77,6 +78,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
*/
|
*/
|
||||||
public TDeleteType deleteType; // optional
|
public TDeleteType deleteType; // optional
|
||||||
public boolean writeToWal; // optional
|
public boolean writeToWal; // optional
|
||||||
|
public Map<ByteBuffer,ByteBuffer> attributes; // optional
|
||||||
|
|
||||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||||
|
@ -88,7 +90,8 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
* @see TDeleteType
|
* @see TDeleteType
|
||||||
*/
|
*/
|
||||||
DELETE_TYPE((short)4, "deleteType"),
|
DELETE_TYPE((short)4, "deleteType"),
|
||||||
WRITE_TO_WAL((short)5, "writeToWal");
|
WRITE_TO_WAL((short)5, "writeToWal"),
|
||||||
|
ATTRIBUTES((short)6, "attributes");
|
||||||
|
|
||||||
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
||||||
|
|
||||||
|
@ -113,6 +116,8 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
return DELETE_TYPE;
|
return DELETE_TYPE;
|
||||||
case 5: // WRITE_TO_WAL
|
case 5: // WRITE_TO_WAL
|
||||||
return WRITE_TO_WAL;
|
return WRITE_TO_WAL;
|
||||||
|
case 6: // ATTRIBUTES
|
||||||
|
return ATTRIBUTES;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +161,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
private static final int __TIMESTAMP_ISSET_ID = 0;
|
private static final int __TIMESTAMP_ISSET_ID = 0;
|
||||||
private static final int __WRITETOWAL_ISSET_ID = 1;
|
private static final int __WRITETOWAL_ISSET_ID = 1;
|
||||||
private byte __isset_bitfield = 0;
|
private byte __isset_bitfield = 0;
|
||||||
private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.DELETE_TYPE,_Fields.WRITE_TO_WAL};
|
private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.DELETE_TYPE,_Fields.WRITE_TO_WAL,_Fields.ATTRIBUTES};
|
||||||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||||
static {
|
static {
|
||||||
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||||
|
@ -171,6 +176,10 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDeleteType.class)));
|
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDeleteType.class)));
|
||||||
tmpMap.put(_Fields.WRITE_TO_WAL, new org.apache.thrift.meta_data.FieldMetaData("writeToWal", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
tmpMap.put(_Fields.WRITE_TO_WAL, new org.apache.thrift.meta_data.FieldMetaData("writeToWal", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
||||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
||||||
|
tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
||||||
|
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
||||||
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true),
|
||||||
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
|
||||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDelete.class, metaDataMap);
|
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDelete.class, metaDataMap);
|
||||||
}
|
}
|
||||||
|
@ -210,6 +219,23 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
this.deleteType = other.deleteType;
|
this.deleteType = other.deleteType;
|
||||||
}
|
}
|
||||||
this.writeToWal = other.writeToWal;
|
this.writeToWal = other.writeToWal;
|
||||||
|
if (other.isSetAttributes()) {
|
||||||
|
Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
|
||||||
|
|
||||||
|
ByteBuffer other_element_key = other_element.getKey();
|
||||||
|
ByteBuffer other_element_value = other_element.getValue();
|
||||||
|
|
||||||
|
ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
|
||||||
|
;
|
||||||
|
|
||||||
|
ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
|
||||||
|
;
|
||||||
|
|
||||||
|
__this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
|
||||||
|
}
|
||||||
|
this.attributes = __this__attributes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public TDelete deepCopy() {
|
public TDelete deepCopy() {
|
||||||
|
@ -226,6 +252,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
|
|
||||||
this.writeToWal = true;
|
this.writeToWal = true;
|
||||||
|
|
||||||
|
this.attributes = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getRow() {
|
public byte[] getRow() {
|
||||||
|
@ -379,6 +406,41 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITETOWAL_ISSET_ID, value);
|
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITETOWAL_ISSET_ID, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getAttributesSize() {
|
||||||
|
return (this.attributes == null) ? 0 : this.attributes.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void putToAttributes(ByteBuffer key, ByteBuffer val) {
|
||||||
|
if (this.attributes == null) {
|
||||||
|
this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
|
||||||
|
}
|
||||||
|
this.attributes.put(key, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<ByteBuffer,ByteBuffer> getAttributes() {
|
||||||
|
return this.attributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TDelete setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
|
||||||
|
this.attributes = attributes;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unsetAttributes() {
|
||||||
|
this.attributes = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Returns true if field attributes is set (has been assigned a value) and false otherwise */
|
||||||
|
public boolean isSetAttributes() {
|
||||||
|
return this.attributes != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttributesIsSet(boolean value) {
|
||||||
|
if (!value) {
|
||||||
|
this.attributes = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setFieldValue(_Fields field, Object value) {
|
public void setFieldValue(_Fields field, Object value) {
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case ROW:
|
case ROW:
|
||||||
|
@ -421,6 +483,14 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ATTRIBUTES:
|
||||||
|
if (value == null) {
|
||||||
|
unsetAttributes();
|
||||||
|
} else {
|
||||||
|
setAttributes((Map<ByteBuffer,ByteBuffer>)value);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,6 +511,9 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
case WRITE_TO_WAL:
|
case WRITE_TO_WAL:
|
||||||
return Boolean.valueOf(isWriteToWal());
|
return Boolean.valueOf(isWriteToWal());
|
||||||
|
|
||||||
|
case ATTRIBUTES:
|
||||||
|
return getAttributes();
|
||||||
|
|
||||||
}
|
}
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
@ -462,6 +535,8 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
return isSetDeleteType();
|
return isSetDeleteType();
|
||||||
case WRITE_TO_WAL:
|
case WRITE_TO_WAL:
|
||||||
return isSetWriteToWal();
|
return isSetWriteToWal();
|
||||||
|
case ATTRIBUTES:
|
||||||
|
return isSetAttributes();
|
||||||
}
|
}
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
@ -524,6 +599,15 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean this_present_attributes = true && this.isSetAttributes();
|
||||||
|
boolean that_present_attributes = true && that.isSetAttributes();
|
||||||
|
if (this_present_attributes || that_present_attributes) {
|
||||||
|
if (!(this_present_attributes && that_present_attributes))
|
||||||
|
return false;
|
||||||
|
if (!this.attributes.equals(that.attributes))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -590,6 +674,16 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
return lastComparison;
|
return lastComparison;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
|
||||||
|
if (lastComparison != 0) {
|
||||||
|
return lastComparison;
|
||||||
|
}
|
||||||
|
if (isSetAttributes()) {
|
||||||
|
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
|
||||||
|
if (lastComparison != 0) {
|
||||||
|
return lastComparison;
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -649,6 +743,16 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
sb.append(this.writeToWal);
|
sb.append(this.writeToWal);
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
if (isSetAttributes()) {
|
||||||
|
if (!first) sb.append(", ");
|
||||||
|
sb.append("attributes:");
|
||||||
|
if (this.attributes == null) {
|
||||||
|
sb.append("null");
|
||||||
|
} else {
|
||||||
|
sb.append(this.attributes);
|
||||||
|
}
|
||||||
|
first = false;
|
||||||
|
}
|
||||||
sb.append(")");
|
sb.append(")");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -708,14 +812,14 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
case 2: // COLUMNS
|
case 2: // COLUMNS
|
||||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
|
org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
|
||||||
struct.columns = new ArrayList<TColumn>(_list24.size);
|
struct.columns = new ArrayList<TColumn>(_list44.size);
|
||||||
for (int _i25 = 0; _i25 < _list24.size; ++_i25)
|
for (int _i45 = 0; _i45 < _list44.size; ++_i45)
|
||||||
{
|
{
|
||||||
TColumn _elem26; // required
|
TColumn _elem46; // required
|
||||||
_elem26 = new TColumn();
|
_elem46 = new TColumn();
|
||||||
_elem26.read(iprot);
|
_elem46.read(iprot);
|
||||||
struct.columns.add(_elem26);
|
struct.columns.add(_elem46);
|
||||||
}
|
}
|
||||||
iprot.readListEnd();
|
iprot.readListEnd();
|
||||||
}
|
}
|
||||||
|
@ -748,6 +852,26 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 6: // ATTRIBUTES
|
||||||
|
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
|
||||||
|
{
|
||||||
|
org.apache.thrift.protocol.TMap _map47 = iprot.readMapBegin();
|
||||||
|
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map47.size);
|
||||||
|
for (int _i48 = 0; _i48 < _map47.size; ++_i48)
|
||||||
|
{
|
||||||
|
ByteBuffer _key49; // required
|
||||||
|
ByteBuffer _val50; // required
|
||||||
|
_key49 = iprot.readBinary();
|
||||||
|
_val50 = iprot.readBinary();
|
||||||
|
struct.attributes.put(_key49, _val50);
|
||||||
|
}
|
||||||
|
iprot.readMapEnd();
|
||||||
|
}
|
||||||
|
struct.setAttributesIsSet(true);
|
||||||
|
} else {
|
||||||
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
}
|
}
|
||||||
|
@ -773,9 +897,9 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||||
{
|
{
|
||||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
|
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
|
||||||
for (TColumn _iter27 : struct.columns)
|
for (TColumn _iter51 : struct.columns)
|
||||||
{
|
{
|
||||||
_iter27.write(oprot);
|
_iter51.write(oprot);
|
||||||
}
|
}
|
||||||
oprot.writeListEnd();
|
oprot.writeListEnd();
|
||||||
}
|
}
|
||||||
|
@ -799,6 +923,21 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
oprot.writeBool(struct.writeToWal);
|
oprot.writeBool(struct.writeToWal);
|
||||||
oprot.writeFieldEnd();
|
oprot.writeFieldEnd();
|
||||||
}
|
}
|
||||||
|
if (struct.attributes != null) {
|
||||||
|
if (struct.isSetAttributes()) {
|
||||||
|
oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
|
||||||
|
{
|
||||||
|
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> _iter52 : struct.attributes.entrySet())
|
||||||
|
{
|
||||||
|
oprot.writeBinary(_iter52.getKey());
|
||||||
|
oprot.writeBinary(_iter52.getValue());
|
||||||
|
}
|
||||||
|
oprot.writeMapEnd();
|
||||||
|
}
|
||||||
|
oprot.writeFieldEnd();
|
||||||
|
}
|
||||||
|
}
|
||||||
oprot.writeFieldStop();
|
oprot.writeFieldStop();
|
||||||
oprot.writeStructEnd();
|
oprot.writeStructEnd();
|
||||||
}
|
}
|
||||||
|
@ -830,13 +969,16 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
if (struct.isSetWriteToWal()) {
|
if (struct.isSetWriteToWal()) {
|
||||||
optionals.set(3);
|
optionals.set(3);
|
||||||
}
|
}
|
||||||
oprot.writeBitSet(optionals, 4);
|
if (struct.isSetAttributes()) {
|
||||||
|
optionals.set(4);
|
||||||
|
}
|
||||||
|
oprot.writeBitSet(optionals, 5);
|
||||||
if (struct.isSetColumns()) {
|
if (struct.isSetColumns()) {
|
||||||
{
|
{
|
||||||
oprot.writeI32(struct.columns.size());
|
oprot.writeI32(struct.columns.size());
|
||||||
for (TColumn _iter28 : struct.columns)
|
for (TColumn _iter53 : struct.columns)
|
||||||
{
|
{
|
||||||
_iter28.write(oprot);
|
_iter53.write(oprot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -849,6 +991,16 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
if (struct.isSetWriteToWal()) {
|
if (struct.isSetWriteToWal()) {
|
||||||
oprot.writeBool(struct.writeToWal);
|
oprot.writeBool(struct.writeToWal);
|
||||||
}
|
}
|
||||||
|
if (struct.isSetAttributes()) {
|
||||||
|
{
|
||||||
|
oprot.writeI32(struct.attributes.size());
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> _iter54 : struct.attributes.entrySet())
|
||||||
|
{
|
||||||
|
oprot.writeBinary(_iter54.getKey());
|
||||||
|
oprot.writeBinary(_iter54.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -856,17 +1008,17 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||||
struct.row = iprot.readBinary();
|
struct.row = iprot.readBinary();
|
||||||
struct.setRowIsSet(true);
|
struct.setRowIsSet(true);
|
||||||
BitSet incoming = iprot.readBitSet(4);
|
BitSet incoming = iprot.readBitSet(5);
|
||||||
if (incoming.get(0)) {
|
if (incoming.get(0)) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||||
struct.columns = new ArrayList<TColumn>(_list29.size);
|
struct.columns = new ArrayList<TColumn>(_list55.size);
|
||||||
for (int _i30 = 0; _i30 < _list29.size; ++_i30)
|
for (int _i56 = 0; _i56 < _list55.size; ++_i56)
|
||||||
{
|
{
|
||||||
TColumn _elem31; // required
|
TColumn _elem57; // required
|
||||||
_elem31 = new TColumn();
|
_elem57 = new TColumn();
|
||||||
_elem31.read(iprot);
|
_elem57.read(iprot);
|
||||||
struct.columns.add(_elem31);
|
struct.columns.add(_elem57);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct.setColumnsIsSet(true);
|
struct.setColumnsIsSet(true);
|
||||||
|
@ -883,6 +1035,21 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
||||||
struct.writeToWal = iprot.readBool();
|
struct.writeToWal = iprot.readBool();
|
||||||
struct.setWriteToWalIsSet(true);
|
struct.setWriteToWalIsSet(true);
|
||||||
}
|
}
|
||||||
|
if (incoming.get(4)) {
|
||||||
|
{
|
||||||
|
org.apache.thrift.protocol.TMap _map58 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
|
||||||
|
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map58.size);
|
||||||
|
for (int _i59 = 0; _i59 < _map58.size; ++_i59)
|
||||||
|
{
|
||||||
|
ByteBuffer _key60; // required
|
||||||
|
ByteBuffer _val61; // required
|
||||||
|
_key60 = iprot.readBinary();
|
||||||
|
_val61 = iprot.readBinary();
|
||||||
|
struct.attributes.put(_key60, _val61);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct.setAttributesIsSet(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
private static final org.apache.thrift.protocol.TField TIME_RANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeRange", org.apache.thrift.protocol.TType.STRUCT, (short)4);
|
private static final org.apache.thrift.protocol.TField TIME_RANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeRange", org.apache.thrift.protocol.TType.STRUCT, (short)4);
|
||||||
private static final org.apache.thrift.protocol.TField MAX_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxVersions", org.apache.thrift.protocol.TType.I32, (short)5);
|
private static final org.apache.thrift.protocol.TField MAX_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxVersions", org.apache.thrift.protocol.TType.I32, (short)5);
|
||||||
private static final org.apache.thrift.protocol.TField FILTER_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("filterString", org.apache.thrift.protocol.TType.STRING, (short)6);
|
private static final org.apache.thrift.protocol.TField FILTER_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("filterString", org.apache.thrift.protocol.TType.STRING, (short)6);
|
||||||
|
private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)7);
|
||||||
|
|
||||||
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
||||||
static {
|
static {
|
||||||
|
@ -65,6 +66,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
public TTimeRange timeRange; // optional
|
public TTimeRange timeRange; // optional
|
||||||
public int maxVersions; // optional
|
public int maxVersions; // optional
|
||||||
public ByteBuffer filterString; // optional
|
public ByteBuffer filterString; // optional
|
||||||
|
public Map<ByteBuffer,ByteBuffer> attributes; // optional
|
||||||
|
|
||||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||||
|
@ -73,7 +75,8 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
TIMESTAMP((short)3, "timestamp"),
|
TIMESTAMP((short)3, "timestamp"),
|
||||||
TIME_RANGE((short)4, "timeRange"),
|
TIME_RANGE((short)4, "timeRange"),
|
||||||
MAX_VERSIONS((short)5, "maxVersions"),
|
MAX_VERSIONS((short)5, "maxVersions"),
|
||||||
FILTER_STRING((short)6, "filterString");
|
FILTER_STRING((short)6, "filterString"),
|
||||||
|
ATTRIBUTES((short)7, "attributes");
|
||||||
|
|
||||||
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
||||||
|
|
||||||
|
@ -100,6 +103,8 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
return MAX_VERSIONS;
|
return MAX_VERSIONS;
|
||||||
case 6: // FILTER_STRING
|
case 6: // FILTER_STRING
|
||||||
return FILTER_STRING;
|
return FILTER_STRING;
|
||||||
|
case 7: // ATTRIBUTES
|
||||||
|
return ATTRIBUTES;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -143,7 +148,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
private static final int __TIMESTAMP_ISSET_ID = 0;
|
private static final int __TIMESTAMP_ISSET_ID = 0;
|
||||||
private static final int __MAXVERSIONS_ISSET_ID = 1;
|
private static final int __MAXVERSIONS_ISSET_ID = 1;
|
||||||
private byte __isset_bitfield = 0;
|
private byte __isset_bitfield = 0;
|
||||||
private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.TIME_RANGE,_Fields.MAX_VERSIONS,_Fields.FILTER_STRING};
|
private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.TIME_RANGE,_Fields.MAX_VERSIONS,_Fields.FILTER_STRING,_Fields.ATTRIBUTES};
|
||||||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||||
static {
|
static {
|
||||||
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||||
|
@ -160,6 +165,10 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||||
tmpMap.put(_Fields.FILTER_STRING, new org.apache.thrift.meta_data.FieldMetaData("filterString", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
tmpMap.put(_Fields.FILTER_STRING, new org.apache.thrift.meta_data.FieldMetaData("filterString", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
||||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
|
||||||
|
tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
||||||
|
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
||||||
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true),
|
||||||
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
|
||||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGet.class, metaDataMap);
|
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGet.class, metaDataMap);
|
||||||
}
|
}
|
||||||
|
@ -199,6 +208,23 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
this.filterString = org.apache.thrift.TBaseHelper.copyBinary(other.filterString);
|
this.filterString = org.apache.thrift.TBaseHelper.copyBinary(other.filterString);
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
if (other.isSetAttributes()) {
|
||||||
|
Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
|
||||||
|
|
||||||
|
ByteBuffer other_element_key = other_element.getKey();
|
||||||
|
ByteBuffer other_element_value = other_element.getValue();
|
||||||
|
|
||||||
|
ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
|
||||||
|
;
|
||||||
|
|
||||||
|
ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
|
||||||
|
;
|
||||||
|
|
||||||
|
__this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
|
||||||
|
}
|
||||||
|
this.attributes = __this__attributes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public TGet deepCopy() {
|
public TGet deepCopy() {
|
||||||
|
@ -215,6 +241,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
setMaxVersionsIsSet(false);
|
setMaxVersionsIsSet(false);
|
||||||
this.maxVersions = 0;
|
this.maxVersions = 0;
|
||||||
this.filterString = null;
|
this.filterString = null;
|
||||||
|
this.attributes = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getRow() {
|
public byte[] getRow() {
|
||||||
|
@ -394,6 +421,41 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getAttributesSize() {
|
||||||
|
return (this.attributes == null) ? 0 : this.attributes.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void putToAttributes(ByteBuffer key, ByteBuffer val) {
|
||||||
|
if (this.attributes == null) {
|
||||||
|
this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
|
||||||
|
}
|
||||||
|
this.attributes.put(key, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<ByteBuffer,ByteBuffer> getAttributes() {
|
||||||
|
return this.attributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TGet setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
|
||||||
|
this.attributes = attributes;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unsetAttributes() {
|
||||||
|
this.attributes = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Returns true if field attributes is set (has been assigned a value) and false otherwise */
|
||||||
|
public boolean isSetAttributes() {
|
||||||
|
return this.attributes != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttributesIsSet(boolean value) {
|
||||||
|
if (!value) {
|
||||||
|
this.attributes = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setFieldValue(_Fields field, Object value) {
|
public void setFieldValue(_Fields field, Object value) {
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case ROW:
|
case ROW:
|
||||||
|
@ -444,6 +506,14 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ATTRIBUTES:
|
||||||
|
if (value == null) {
|
||||||
|
unsetAttributes();
|
||||||
|
} else {
|
||||||
|
setAttributes((Map<ByteBuffer,ByteBuffer>)value);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -467,6 +537,9 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
case FILTER_STRING:
|
case FILTER_STRING:
|
||||||
return getFilterString();
|
return getFilterString();
|
||||||
|
|
||||||
|
case ATTRIBUTES:
|
||||||
|
return getAttributes();
|
||||||
|
|
||||||
}
|
}
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
@ -490,6 +563,8 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
return isSetMaxVersions();
|
return isSetMaxVersions();
|
||||||
case FILTER_STRING:
|
case FILTER_STRING:
|
||||||
return isSetFilterString();
|
return isSetFilterString();
|
||||||
|
case ATTRIBUTES:
|
||||||
|
return isSetAttributes();
|
||||||
}
|
}
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
@ -561,6 +636,15 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean this_present_attributes = true && this.isSetAttributes();
|
||||||
|
boolean that_present_attributes = true && that.isSetAttributes();
|
||||||
|
if (this_present_attributes || that_present_attributes) {
|
||||||
|
if (!(this_present_attributes && that_present_attributes))
|
||||||
|
return false;
|
||||||
|
if (!this.attributes.equals(that.attributes))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -637,6 +721,16 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
return lastComparison;
|
return lastComparison;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
|
||||||
|
if (lastComparison != 0) {
|
||||||
|
return lastComparison;
|
||||||
|
}
|
||||||
|
if (isSetAttributes()) {
|
||||||
|
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
|
||||||
|
if (lastComparison != 0) {
|
||||||
|
return lastComparison;
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -706,6 +800,16 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
}
|
}
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
if (isSetAttributes()) {
|
||||||
|
if (!first) sb.append(", ");
|
||||||
|
sb.append("attributes:");
|
||||||
|
if (this.attributes == null) {
|
||||||
|
sb.append("null");
|
||||||
|
} else {
|
||||||
|
sb.append(this.attributes);
|
||||||
|
}
|
||||||
|
first = false;
|
||||||
|
}
|
||||||
sb.append(")");
|
sb.append(")");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -772,7 +876,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
struct.columns = new ArrayList<TColumn>(_list8.size);
|
struct.columns = new ArrayList<TColumn>(_list8.size);
|
||||||
for (int _i9 = 0; _i9 < _list8.size; ++_i9)
|
for (int _i9 = 0; _i9 < _list8.size; ++_i9)
|
||||||
{
|
{
|
||||||
TColumn _elem10; // optional
|
TColumn _elem10; // required
|
||||||
_elem10 = new TColumn();
|
_elem10 = new TColumn();
|
||||||
_elem10.read(iprot);
|
_elem10.read(iprot);
|
||||||
struct.columns.add(_elem10);
|
struct.columns.add(_elem10);
|
||||||
|
@ -817,6 +921,26 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 7: // ATTRIBUTES
|
||||||
|
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
|
||||||
|
{
|
||||||
|
org.apache.thrift.protocol.TMap _map11 = iprot.readMapBegin();
|
||||||
|
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map11.size);
|
||||||
|
for (int _i12 = 0; _i12 < _map11.size; ++_i12)
|
||||||
|
{
|
||||||
|
ByteBuffer _key13; // required
|
||||||
|
ByteBuffer _val14; // required
|
||||||
|
_key13 = iprot.readBinary();
|
||||||
|
_val14 = iprot.readBinary();
|
||||||
|
struct.attributes.put(_key13, _val14);
|
||||||
|
}
|
||||||
|
iprot.readMapEnd();
|
||||||
|
}
|
||||||
|
struct.setAttributesIsSet(true);
|
||||||
|
} else {
|
||||||
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
}
|
}
|
||||||
|
@ -842,9 +966,9 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||||
{
|
{
|
||||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
|
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
|
||||||
for (TColumn _iter11 : struct.columns)
|
for (TColumn _iter15 : struct.columns)
|
||||||
{
|
{
|
||||||
_iter11.write(oprot);
|
_iter15.write(oprot);
|
||||||
}
|
}
|
||||||
oprot.writeListEnd();
|
oprot.writeListEnd();
|
||||||
}
|
}
|
||||||
|
@ -875,6 +999,21 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
oprot.writeFieldEnd();
|
oprot.writeFieldEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (struct.attributes != null) {
|
||||||
|
if (struct.isSetAttributes()) {
|
||||||
|
oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
|
||||||
|
{
|
||||||
|
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> _iter16 : struct.attributes.entrySet())
|
||||||
|
{
|
||||||
|
oprot.writeBinary(_iter16.getKey());
|
||||||
|
oprot.writeBinary(_iter16.getValue());
|
||||||
|
}
|
||||||
|
oprot.writeMapEnd();
|
||||||
|
}
|
||||||
|
oprot.writeFieldEnd();
|
||||||
|
}
|
||||||
|
}
|
||||||
oprot.writeFieldStop();
|
oprot.writeFieldStop();
|
||||||
oprot.writeStructEnd();
|
oprot.writeStructEnd();
|
||||||
}
|
}
|
||||||
|
@ -909,13 +1048,16 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
if (struct.isSetFilterString()) {
|
if (struct.isSetFilterString()) {
|
||||||
optionals.set(4);
|
optionals.set(4);
|
||||||
}
|
}
|
||||||
oprot.writeBitSet(optionals, 5);
|
if (struct.isSetAttributes()) {
|
||||||
|
optionals.set(5);
|
||||||
|
}
|
||||||
|
oprot.writeBitSet(optionals, 6);
|
||||||
if (struct.isSetColumns()) {
|
if (struct.isSetColumns()) {
|
||||||
{
|
{
|
||||||
oprot.writeI32(struct.columns.size());
|
oprot.writeI32(struct.columns.size());
|
||||||
for (TColumn _iter12 : struct.columns)
|
for (TColumn _iter17 : struct.columns)
|
||||||
{
|
{
|
||||||
_iter12.write(oprot);
|
_iter17.write(oprot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -931,6 +1073,16 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
if (struct.isSetFilterString()) {
|
if (struct.isSetFilterString()) {
|
||||||
oprot.writeBinary(struct.filterString);
|
oprot.writeBinary(struct.filterString);
|
||||||
}
|
}
|
||||||
|
if (struct.isSetAttributes()) {
|
||||||
|
{
|
||||||
|
oprot.writeI32(struct.attributes.size());
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> _iter18 : struct.attributes.entrySet())
|
||||||
|
{
|
||||||
|
oprot.writeBinary(_iter18.getKey());
|
||||||
|
oprot.writeBinary(_iter18.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -938,17 +1090,17 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||||
struct.row = iprot.readBinary();
|
struct.row = iprot.readBinary();
|
||||||
struct.setRowIsSet(true);
|
struct.setRowIsSet(true);
|
||||||
BitSet incoming = iprot.readBitSet(5);
|
BitSet incoming = iprot.readBitSet(6);
|
||||||
if (incoming.get(0)) {
|
if (incoming.get(0)) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
org.apache.thrift.protocol.TList _list19 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||||
struct.columns = new ArrayList<TColumn>(_list13.size);
|
struct.columns = new ArrayList<TColumn>(_list19.size);
|
||||||
for (int _i14 = 0; _i14 < _list13.size; ++_i14)
|
for (int _i20 = 0; _i20 < _list19.size; ++_i20)
|
||||||
{
|
{
|
||||||
TColumn _elem15; // optional
|
TColumn _elem21; // required
|
||||||
_elem15 = new TColumn();
|
_elem21 = new TColumn();
|
||||||
_elem15.read(iprot);
|
_elem21.read(iprot);
|
||||||
struct.columns.add(_elem15);
|
struct.columns.add(_elem21);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct.setColumnsIsSet(true);
|
struct.setColumnsIsSet(true);
|
||||||
|
@ -970,6 +1122,21 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
||||||
struct.filterString = iprot.readBinary();
|
struct.filterString = iprot.readBinary();
|
||||||
struct.setFilterStringIsSet(true);
|
struct.setFilterStringIsSet(true);
|
||||||
}
|
}
|
||||||
|
if (incoming.get(5)) {
|
||||||
|
{
|
||||||
|
org.apache.thrift.protocol.TMap _map22 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
|
||||||
|
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map22.size);
|
||||||
|
for (int _i23 = 0; _i23 < _map22.size; ++_i23)
|
||||||
|
{
|
||||||
|
ByteBuffer _key24; // required
|
||||||
|
ByteBuffer _val25; // required
|
||||||
|
_key24 = iprot.readBinary();
|
||||||
|
_val25 = iprot.readBinary();
|
||||||
|
struct.attributes.put(_key24, _val25);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct.setAttributesIsSet(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,9 +131,9 @@ public class THBaseService {
|
||||||
/**
|
/**
|
||||||
* Bulk commit a List of TDeletes to the table.
|
* Bulk commit a List of TDeletes to the table.
|
||||||
*
|
*
|
||||||
* This returns a list of TDeletes that were not
|
* Throws a TIOError if any of the deletes fail.
|
||||||
* executed. So if everything succeeds you'll
|
*
|
||||||
* receive an empty list.
|
* Always returns an empty list for backwards compatibility.
|
||||||
*
|
*
|
||||||
* @param table the table to delete from
|
* @param table the table to delete from
|
||||||
*
|
*
|
||||||
|
@ -3772,14 +3772,14 @@ public class THBaseService {
|
||||||
case 2: // GETS
|
case 2: // GETS
|
||||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
|
org.apache.thrift.protocol.TList _list98 = iprot.readListBegin();
|
||||||
struct.gets = new ArrayList<TGet>(_list48.size);
|
struct.gets = new ArrayList<TGet>(_list98.size);
|
||||||
for (int _i49 = 0; _i49 < _list48.size; ++_i49)
|
for (int _i99 = 0; _i99 < _list98.size; ++_i99)
|
||||||
{
|
{
|
||||||
TGet _elem50; // required
|
TGet _elem100; // required
|
||||||
_elem50 = new TGet();
|
_elem100 = new TGet();
|
||||||
_elem50.read(iprot);
|
_elem100.read(iprot);
|
||||||
struct.gets.add(_elem50);
|
struct.gets.add(_elem100);
|
||||||
}
|
}
|
||||||
iprot.readListEnd();
|
iprot.readListEnd();
|
||||||
}
|
}
|
||||||
|
@ -3812,9 +3812,9 @@ public class THBaseService {
|
||||||
oprot.writeFieldBegin(GETS_FIELD_DESC);
|
oprot.writeFieldBegin(GETS_FIELD_DESC);
|
||||||
{
|
{
|
||||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.gets.size()));
|
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.gets.size()));
|
||||||
for (TGet _iter51 : struct.gets)
|
for (TGet _iter101 : struct.gets)
|
||||||
{
|
{
|
||||||
_iter51.write(oprot);
|
_iter101.write(oprot);
|
||||||
}
|
}
|
||||||
oprot.writeListEnd();
|
oprot.writeListEnd();
|
||||||
}
|
}
|
||||||
|
@ -3840,9 +3840,9 @@ public class THBaseService {
|
||||||
oprot.writeBinary(struct.table);
|
oprot.writeBinary(struct.table);
|
||||||
{
|
{
|
||||||
oprot.writeI32(struct.gets.size());
|
oprot.writeI32(struct.gets.size());
|
||||||
for (TGet _iter52 : struct.gets)
|
for (TGet _iter102 : struct.gets)
|
||||||
{
|
{
|
||||||
_iter52.write(oprot);
|
_iter102.write(oprot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3853,14 +3853,14 @@ public class THBaseService {
|
||||||
struct.table = iprot.readBinary();
|
struct.table = iprot.readBinary();
|
||||||
struct.setTableIsSet(true);
|
struct.setTableIsSet(true);
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list53 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||||
struct.gets = new ArrayList<TGet>(_list53.size);
|
struct.gets = new ArrayList<TGet>(_list103.size);
|
||||||
for (int _i54 = 0; _i54 < _list53.size; ++_i54)
|
for (int _i104 = 0; _i104 < _list103.size; ++_i104)
|
||||||
{
|
{
|
||||||
TGet _elem55; // required
|
TGet _elem105; // required
|
||||||
_elem55 = new TGet();
|
_elem105 = new TGet();
|
||||||
_elem55.read(iprot);
|
_elem105.read(iprot);
|
||||||
struct.gets.add(_elem55);
|
struct.gets.add(_elem105);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct.setGetsIsSet(true);
|
struct.setGetsIsSet(true);
|
||||||
|
@ -4255,14 +4255,14 @@ public class THBaseService {
|
||||||
case 0: // SUCCESS
|
case 0: // SUCCESS
|
||||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
|
org.apache.thrift.protocol.TList _list106 = iprot.readListBegin();
|
||||||
struct.success = new ArrayList<TResult>(_list56.size);
|
struct.success = new ArrayList<TResult>(_list106.size);
|
||||||
for (int _i57 = 0; _i57 < _list56.size; ++_i57)
|
for (int _i107 = 0; _i107 < _list106.size; ++_i107)
|
||||||
{
|
{
|
||||||
TResult _elem58; // required
|
TResult _elem108; // required
|
||||||
_elem58 = new TResult();
|
_elem108 = new TResult();
|
||||||
_elem58.read(iprot);
|
_elem108.read(iprot);
|
||||||
struct.success.add(_elem58);
|
struct.success.add(_elem108);
|
||||||
}
|
}
|
||||||
iprot.readListEnd();
|
iprot.readListEnd();
|
||||||
}
|
}
|
||||||
|
@ -4299,9 +4299,9 @@ public class THBaseService {
|
||||||
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
||||||
{
|
{
|
||||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
|
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
|
||||||
for (TResult _iter59 : struct.success)
|
for (TResult _iter109 : struct.success)
|
||||||
{
|
{
|
||||||
_iter59.write(oprot);
|
_iter109.write(oprot);
|
||||||
}
|
}
|
||||||
oprot.writeListEnd();
|
oprot.writeListEnd();
|
||||||
}
|
}
|
||||||
|
@ -4340,9 +4340,9 @@ public class THBaseService {
|
||||||
if (struct.isSetSuccess()) {
|
if (struct.isSetSuccess()) {
|
||||||
{
|
{
|
||||||
oprot.writeI32(struct.success.size());
|
oprot.writeI32(struct.success.size());
|
||||||
for (TResult _iter60 : struct.success)
|
for (TResult _iter110 : struct.success)
|
||||||
{
|
{
|
||||||
_iter60.write(oprot);
|
_iter110.write(oprot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4357,14 +4357,14 @@ public class THBaseService {
|
||||||
BitSet incoming = iprot.readBitSet(2);
|
BitSet incoming = iprot.readBitSet(2);
|
||||||
if (incoming.get(0)) {
|
if (incoming.get(0)) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list61 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
org.apache.thrift.protocol.TList _list111 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||||
struct.success = new ArrayList<TResult>(_list61.size);
|
struct.success = new ArrayList<TResult>(_list111.size);
|
||||||
for (int _i62 = 0; _i62 < _list61.size; ++_i62)
|
for (int _i112 = 0; _i112 < _list111.size; ++_i112)
|
||||||
{
|
{
|
||||||
TResult _elem63; // required
|
TResult _elem113; // required
|
||||||
_elem63 = new TResult();
|
_elem113 = new TResult();
|
||||||
_elem63.read(iprot);
|
_elem113.read(iprot);
|
||||||
struct.success.add(_elem63);
|
struct.success.add(_elem113);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct.setSuccessIsSet(true);
|
struct.setSuccessIsSet(true);
|
||||||
|
@ -7083,14 +7083,14 @@ public class THBaseService {
|
||||||
case 2: // PUTS
|
case 2: // PUTS
|
||||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list64 = iprot.readListBegin();
|
org.apache.thrift.protocol.TList _list114 = iprot.readListBegin();
|
||||||
struct.puts = new ArrayList<TPut>(_list64.size);
|
struct.puts = new ArrayList<TPut>(_list114.size);
|
||||||
for (int _i65 = 0; _i65 < _list64.size; ++_i65)
|
for (int _i115 = 0; _i115 < _list114.size; ++_i115)
|
||||||
{
|
{
|
||||||
TPut _elem66; // required
|
TPut _elem116; // required
|
||||||
_elem66 = new TPut();
|
_elem116 = new TPut();
|
||||||
_elem66.read(iprot);
|
_elem116.read(iprot);
|
||||||
struct.puts.add(_elem66);
|
struct.puts.add(_elem116);
|
||||||
}
|
}
|
||||||
iprot.readListEnd();
|
iprot.readListEnd();
|
||||||
}
|
}
|
||||||
|
@ -7123,9 +7123,9 @@ public class THBaseService {
|
||||||
oprot.writeFieldBegin(PUTS_FIELD_DESC);
|
oprot.writeFieldBegin(PUTS_FIELD_DESC);
|
||||||
{
|
{
|
||||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.puts.size()));
|
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.puts.size()));
|
||||||
for (TPut _iter67 : struct.puts)
|
for (TPut _iter117 : struct.puts)
|
||||||
{
|
{
|
||||||
_iter67.write(oprot);
|
_iter117.write(oprot);
|
||||||
}
|
}
|
||||||
oprot.writeListEnd();
|
oprot.writeListEnd();
|
||||||
}
|
}
|
||||||
|
@ -7151,9 +7151,9 @@ public class THBaseService {
|
||||||
oprot.writeBinary(struct.table);
|
oprot.writeBinary(struct.table);
|
||||||
{
|
{
|
||||||
oprot.writeI32(struct.puts.size());
|
oprot.writeI32(struct.puts.size());
|
||||||
for (TPut _iter68 : struct.puts)
|
for (TPut _iter118 : struct.puts)
|
||||||
{
|
{
|
||||||
_iter68.write(oprot);
|
_iter118.write(oprot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7164,14 +7164,14 @@ public class THBaseService {
|
||||||
struct.table = iprot.readBinary();
|
struct.table = iprot.readBinary();
|
||||||
struct.setTableIsSet(true);
|
struct.setTableIsSet(true);
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
org.apache.thrift.protocol.TList _list119 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||||
struct.puts = new ArrayList<TPut>(_list69.size);
|
struct.puts = new ArrayList<TPut>(_list119.size);
|
||||||
for (int _i70 = 0; _i70 < _list69.size; ++_i70)
|
for (int _i120 = 0; _i120 < _list119.size; ++_i120)
|
||||||
{
|
{
|
||||||
TPut _elem71; // required
|
TPut _elem121; // required
|
||||||
_elem71 = new TPut();
|
_elem121 = new TPut();
|
||||||
_elem71.read(iprot);
|
_elem121.read(iprot);
|
||||||
struct.puts.add(_elem71);
|
struct.puts.add(_elem121);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct.setPutsIsSet(true);
|
struct.setPutsIsSet(true);
|
||||||
|
@ -8810,14 +8810,14 @@ public class THBaseService {
|
||||||
case 2: // DELETES
|
case 2: // DELETES
|
||||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list72 = iprot.readListBegin();
|
org.apache.thrift.protocol.TList _list122 = iprot.readListBegin();
|
||||||
struct.deletes = new ArrayList<TDelete>(_list72.size);
|
struct.deletes = new ArrayList<TDelete>(_list122.size);
|
||||||
for (int _i73 = 0; _i73 < _list72.size; ++_i73)
|
for (int _i123 = 0; _i123 < _list122.size; ++_i123)
|
||||||
{
|
{
|
||||||
TDelete _elem74; // required
|
TDelete _elem124; // required
|
||||||
_elem74 = new TDelete();
|
_elem124 = new TDelete();
|
||||||
_elem74.read(iprot);
|
_elem124.read(iprot);
|
||||||
struct.deletes.add(_elem74);
|
struct.deletes.add(_elem124);
|
||||||
}
|
}
|
||||||
iprot.readListEnd();
|
iprot.readListEnd();
|
||||||
}
|
}
|
||||||
|
@ -8850,9 +8850,9 @@ public class THBaseService {
|
||||||
oprot.writeFieldBegin(DELETES_FIELD_DESC);
|
oprot.writeFieldBegin(DELETES_FIELD_DESC);
|
||||||
{
|
{
|
||||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.deletes.size()));
|
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.deletes.size()));
|
||||||
for (TDelete _iter75 : struct.deletes)
|
for (TDelete _iter125 : struct.deletes)
|
||||||
{
|
{
|
||||||
_iter75.write(oprot);
|
_iter125.write(oprot);
|
||||||
}
|
}
|
||||||
oprot.writeListEnd();
|
oprot.writeListEnd();
|
||||||
}
|
}
|
||||||
|
@ -8878,9 +8878,9 @@ public class THBaseService {
|
||||||
oprot.writeBinary(struct.table);
|
oprot.writeBinary(struct.table);
|
||||||
{
|
{
|
||||||
oprot.writeI32(struct.deletes.size());
|
oprot.writeI32(struct.deletes.size());
|
||||||
for (TDelete _iter76 : struct.deletes)
|
for (TDelete _iter126 : struct.deletes)
|
||||||
{
|
{
|
||||||
_iter76.write(oprot);
|
_iter126.write(oprot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8891,14 +8891,14 @@ public class THBaseService {
|
||||||
struct.table = iprot.readBinary();
|
struct.table = iprot.readBinary();
|
||||||
struct.setTableIsSet(true);
|
struct.setTableIsSet(true);
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list77 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
org.apache.thrift.protocol.TList _list127 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||||
struct.deletes = new ArrayList<TDelete>(_list77.size);
|
struct.deletes = new ArrayList<TDelete>(_list127.size);
|
||||||
for (int _i78 = 0; _i78 < _list77.size; ++_i78)
|
for (int _i128 = 0; _i128 < _list127.size; ++_i128)
|
||||||
{
|
{
|
||||||
TDelete _elem79; // required
|
TDelete _elem129; // required
|
||||||
_elem79 = new TDelete();
|
_elem129 = new TDelete();
|
||||||
_elem79.read(iprot);
|
_elem129.read(iprot);
|
||||||
struct.deletes.add(_elem79);
|
struct.deletes.add(_elem129);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct.setDeletesIsSet(true);
|
struct.setDeletesIsSet(true);
|
||||||
|
@ -9293,14 +9293,14 @@ public class THBaseService {
|
||||||
case 0: // SUCCESS
|
case 0: // SUCCESS
|
||||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list80 = iprot.readListBegin();
|
org.apache.thrift.protocol.TList _list130 = iprot.readListBegin();
|
||||||
struct.success = new ArrayList<TDelete>(_list80.size);
|
struct.success = new ArrayList<TDelete>(_list130.size);
|
||||||
for (int _i81 = 0; _i81 < _list80.size; ++_i81)
|
for (int _i131 = 0; _i131 < _list130.size; ++_i131)
|
||||||
{
|
{
|
||||||
TDelete _elem82; // required
|
TDelete _elem132; // required
|
||||||
_elem82 = new TDelete();
|
_elem132 = new TDelete();
|
||||||
_elem82.read(iprot);
|
_elem132.read(iprot);
|
||||||
struct.success.add(_elem82);
|
struct.success.add(_elem132);
|
||||||
}
|
}
|
||||||
iprot.readListEnd();
|
iprot.readListEnd();
|
||||||
}
|
}
|
||||||
|
@ -9337,9 +9337,9 @@ public class THBaseService {
|
||||||
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
||||||
{
|
{
|
||||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
|
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
|
||||||
for (TDelete _iter83 : struct.success)
|
for (TDelete _iter133 : struct.success)
|
||||||
{
|
{
|
||||||
_iter83.write(oprot);
|
_iter133.write(oprot);
|
||||||
}
|
}
|
||||||
oprot.writeListEnd();
|
oprot.writeListEnd();
|
||||||
}
|
}
|
||||||
|
@ -9378,9 +9378,9 @@ public class THBaseService {
|
||||||
if (struct.isSetSuccess()) {
|
if (struct.isSetSuccess()) {
|
||||||
{
|
{
|
||||||
oprot.writeI32(struct.success.size());
|
oprot.writeI32(struct.success.size());
|
||||||
for (TDelete _iter84 : struct.success)
|
for (TDelete _iter134 : struct.success)
|
||||||
{
|
{
|
||||||
_iter84.write(oprot);
|
_iter134.write(oprot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9395,14 +9395,14 @@ public class THBaseService {
|
||||||
BitSet incoming = iprot.readBitSet(2);
|
BitSet incoming = iprot.readBitSet(2);
|
||||||
if (incoming.get(0)) {
|
if (incoming.get(0)) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list85 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
org.apache.thrift.protocol.TList _list135 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||||
struct.success = new ArrayList<TDelete>(_list85.size);
|
struct.success = new ArrayList<TDelete>(_list135.size);
|
||||||
for (int _i86 = 0; _i86 < _list85.size; ++_i86)
|
for (int _i136 = 0; _i136 < _list135.size; ++_i136)
|
||||||
{
|
{
|
||||||
TDelete _elem87; // required
|
TDelete _elem137; // required
|
||||||
_elem87 = new TDelete();
|
_elem137 = new TDelete();
|
||||||
_elem87.read(iprot);
|
_elem137.read(iprot);
|
||||||
struct.success.add(_elem87);
|
struct.success.add(_elem137);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct.setSuccessIsSet(true);
|
struct.setSuccessIsSet(true);
|
||||||
|
@ -13674,14 +13674,14 @@ public class THBaseService {
|
||||||
case 0: // SUCCESS
|
case 0: // SUCCESS
|
||||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
|
org.apache.thrift.protocol.TList _list138 = iprot.readListBegin();
|
||||||
struct.success = new ArrayList<TResult>(_list88.size);
|
struct.success = new ArrayList<TResult>(_list138.size);
|
||||||
for (int _i89 = 0; _i89 < _list88.size; ++_i89)
|
for (int _i139 = 0; _i139 < _list138.size; ++_i139)
|
||||||
{
|
{
|
||||||
TResult _elem90; // required
|
TResult _elem140; // required
|
||||||
_elem90 = new TResult();
|
_elem140 = new TResult();
|
||||||
_elem90.read(iprot);
|
_elem140.read(iprot);
|
||||||
struct.success.add(_elem90);
|
struct.success.add(_elem140);
|
||||||
}
|
}
|
||||||
iprot.readListEnd();
|
iprot.readListEnd();
|
||||||
}
|
}
|
||||||
|
@ -13727,9 +13727,9 @@ public class THBaseService {
|
||||||
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
||||||
{
|
{
|
||||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
|
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
|
||||||
for (TResult _iter91 : struct.success)
|
for (TResult _iter141 : struct.success)
|
||||||
{
|
{
|
||||||
_iter91.write(oprot);
|
_iter141.write(oprot);
|
||||||
}
|
}
|
||||||
oprot.writeListEnd();
|
oprot.writeListEnd();
|
||||||
}
|
}
|
||||||
|
@ -13776,9 +13776,9 @@ public class THBaseService {
|
||||||
if (struct.isSetSuccess()) {
|
if (struct.isSetSuccess()) {
|
||||||
{
|
{
|
||||||
oprot.writeI32(struct.success.size());
|
oprot.writeI32(struct.success.size());
|
||||||
for (TResult _iter92 : struct.success)
|
for (TResult _iter142 : struct.success)
|
||||||
{
|
{
|
||||||
_iter92.write(oprot);
|
_iter142.write(oprot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13796,14 +13796,14 @@ public class THBaseService {
|
||||||
BitSet incoming = iprot.readBitSet(3);
|
BitSet incoming = iprot.readBitSet(3);
|
||||||
if (incoming.get(0)) {
|
if (incoming.get(0)) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list93 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
org.apache.thrift.protocol.TList _list143 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||||
struct.success = new ArrayList<TResult>(_list93.size);
|
struct.success = new ArrayList<TResult>(_list143.size);
|
||||||
for (int _i94 = 0; _i94 < _list93.size; ++_i94)
|
for (int _i144 = 0; _i144 < _list143.size; ++_i144)
|
||||||
{
|
{
|
||||||
TResult _elem95; // required
|
TResult _elem145; // required
|
||||||
_elem95 = new TResult();
|
_elem145 = new TResult();
|
||||||
_elem95.read(iprot);
|
_elem145.read(iprot);
|
||||||
struct.success.add(_elem95);
|
struct.success.add(_elem145);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct.setSuccessIsSet(true);
|
struct.setSuccessIsSet(true);
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1);
|
private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1);
|
||||||
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)2);
|
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)2);
|
||||||
private static final org.apache.thrift.protocol.TField WRITE_TO_WAL_FIELD_DESC = new org.apache.thrift.protocol.TField("writeToWal", org.apache.thrift.protocol.TType.BOOL, (short)3);
|
private static final org.apache.thrift.protocol.TField WRITE_TO_WAL_FIELD_DESC = new org.apache.thrift.protocol.TField("writeToWal", org.apache.thrift.protocol.TType.BOOL, (short)3);
|
||||||
|
private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)4);
|
||||||
|
|
||||||
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
||||||
static {
|
static {
|
||||||
|
@ -52,12 +53,14 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
public ByteBuffer row; // required
|
public ByteBuffer row; // required
|
||||||
public List<TColumnIncrement> columns; // required
|
public List<TColumnIncrement> columns; // required
|
||||||
public boolean writeToWal; // optional
|
public boolean writeToWal; // optional
|
||||||
|
public Map<ByteBuffer,ByteBuffer> attributes; // optional
|
||||||
|
|
||||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||||
ROW((short)1, "row"),
|
ROW((short)1, "row"),
|
||||||
COLUMNS((short)2, "columns"),
|
COLUMNS((short)2, "columns"),
|
||||||
WRITE_TO_WAL((short)3, "writeToWal");
|
WRITE_TO_WAL((short)3, "writeToWal"),
|
||||||
|
ATTRIBUTES((short)4, "attributes");
|
||||||
|
|
||||||
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
||||||
|
|
||||||
|
@ -78,6 +81,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
return COLUMNS;
|
return COLUMNS;
|
||||||
case 3: // WRITE_TO_WAL
|
case 3: // WRITE_TO_WAL
|
||||||
return WRITE_TO_WAL;
|
return WRITE_TO_WAL;
|
||||||
|
case 4: // ATTRIBUTES
|
||||||
|
return ATTRIBUTES;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -120,7 +125,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
// isset id assignments
|
// isset id assignments
|
||||||
private static final int __WRITETOWAL_ISSET_ID = 0;
|
private static final int __WRITETOWAL_ISSET_ID = 0;
|
||||||
private byte __isset_bitfield = 0;
|
private byte __isset_bitfield = 0;
|
||||||
private _Fields optionals[] = {_Fields.WRITE_TO_WAL};
|
private _Fields optionals[] = {_Fields.WRITE_TO_WAL,_Fields.ATTRIBUTES};
|
||||||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||||
static {
|
static {
|
||||||
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||||
|
@ -131,6 +136,10 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumnIncrement.class))));
|
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumnIncrement.class))));
|
||||||
tmpMap.put(_Fields.WRITE_TO_WAL, new org.apache.thrift.meta_data.FieldMetaData("writeToWal", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
tmpMap.put(_Fields.WRITE_TO_WAL, new org.apache.thrift.meta_data.FieldMetaData("writeToWal", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
||||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
||||||
|
tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
||||||
|
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
||||||
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true),
|
||||||
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
|
||||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TIncrement.class, metaDataMap);
|
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TIncrement.class, metaDataMap);
|
||||||
}
|
}
|
||||||
|
@ -166,6 +175,23 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
this.columns = __this__columns;
|
this.columns = __this__columns;
|
||||||
}
|
}
|
||||||
this.writeToWal = other.writeToWal;
|
this.writeToWal = other.writeToWal;
|
||||||
|
if (other.isSetAttributes()) {
|
||||||
|
Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
|
||||||
|
|
||||||
|
ByteBuffer other_element_key = other_element.getKey();
|
||||||
|
ByteBuffer other_element_value = other_element.getValue();
|
||||||
|
|
||||||
|
ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
|
||||||
|
;
|
||||||
|
|
||||||
|
ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
|
||||||
|
;
|
||||||
|
|
||||||
|
__this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
|
||||||
|
}
|
||||||
|
this.attributes = __this__attributes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public TIncrement deepCopy() {
|
public TIncrement deepCopy() {
|
||||||
|
@ -178,6 +204,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
this.columns = null;
|
this.columns = null;
|
||||||
this.writeToWal = true;
|
this.writeToWal = true;
|
||||||
|
|
||||||
|
this.attributes = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getRow() {
|
public byte[] getRow() {
|
||||||
|
@ -276,6 +303,41 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITETOWAL_ISSET_ID, value);
|
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITETOWAL_ISSET_ID, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getAttributesSize() {
|
||||||
|
return (this.attributes == null) ? 0 : this.attributes.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void putToAttributes(ByteBuffer key, ByteBuffer val) {
|
||||||
|
if (this.attributes == null) {
|
||||||
|
this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
|
||||||
|
}
|
||||||
|
this.attributes.put(key, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<ByteBuffer,ByteBuffer> getAttributes() {
|
||||||
|
return this.attributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TIncrement setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
|
||||||
|
this.attributes = attributes;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unsetAttributes() {
|
||||||
|
this.attributes = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Returns true if field attributes is set (has been assigned a value) and false otherwise */
|
||||||
|
public boolean isSetAttributes() {
|
||||||
|
return this.attributes != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttributesIsSet(boolean value) {
|
||||||
|
if (!value) {
|
||||||
|
this.attributes = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setFieldValue(_Fields field, Object value) {
|
public void setFieldValue(_Fields field, Object value) {
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case ROW:
|
case ROW:
|
||||||
|
@ -302,6 +364,14 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ATTRIBUTES:
|
||||||
|
if (value == null) {
|
||||||
|
unsetAttributes();
|
||||||
|
} else {
|
||||||
|
setAttributes((Map<ByteBuffer,ByteBuffer>)value);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,6 +386,9 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
case WRITE_TO_WAL:
|
case WRITE_TO_WAL:
|
||||||
return Boolean.valueOf(isWriteToWal());
|
return Boolean.valueOf(isWriteToWal());
|
||||||
|
|
||||||
|
case ATTRIBUTES:
|
||||||
|
return getAttributes();
|
||||||
|
|
||||||
}
|
}
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
@ -333,6 +406,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
return isSetColumns();
|
return isSetColumns();
|
||||||
case WRITE_TO_WAL:
|
case WRITE_TO_WAL:
|
||||||
return isSetWriteToWal();
|
return isSetWriteToWal();
|
||||||
|
case ATTRIBUTES:
|
||||||
|
return isSetAttributes();
|
||||||
}
|
}
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
@ -377,6 +452,15 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean this_present_attributes = true && this.isSetAttributes();
|
||||||
|
boolean that_present_attributes = true && that.isSetAttributes();
|
||||||
|
if (this_present_attributes || that_present_attributes) {
|
||||||
|
if (!(this_present_attributes && that_present_attributes))
|
||||||
|
return false;
|
||||||
|
if (!this.attributes.equals(that.attributes))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,6 +507,16 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
return lastComparison;
|
return lastComparison;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
|
||||||
|
if (lastComparison != 0) {
|
||||||
|
return lastComparison;
|
||||||
|
}
|
||||||
|
if (isSetAttributes()) {
|
||||||
|
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
|
||||||
|
if (lastComparison != 0) {
|
||||||
|
return lastComparison;
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -464,6 +558,16 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
sb.append(this.writeToWal);
|
sb.append(this.writeToWal);
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
if (isSetAttributes()) {
|
||||||
|
if (!first) sb.append(", ");
|
||||||
|
sb.append("attributes:");
|
||||||
|
if (this.attributes == null) {
|
||||||
|
sb.append("null");
|
||||||
|
} else {
|
||||||
|
sb.append(this.attributes);
|
||||||
|
}
|
||||||
|
first = false;
|
||||||
|
}
|
||||||
sb.append(")");
|
sb.append(")");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -526,14 +630,14 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
case 2: // COLUMNS
|
case 2: // COLUMNS
|
||||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
|
org.apache.thrift.protocol.TList _list62 = iprot.readListBegin();
|
||||||
struct.columns = new ArrayList<TColumnIncrement>(_list32.size);
|
struct.columns = new ArrayList<TColumnIncrement>(_list62.size);
|
||||||
for (int _i33 = 0; _i33 < _list32.size; ++_i33)
|
for (int _i63 = 0; _i63 < _list62.size; ++_i63)
|
||||||
{
|
{
|
||||||
TColumnIncrement _elem34; // required
|
TColumnIncrement _elem64; // required
|
||||||
_elem34 = new TColumnIncrement();
|
_elem64 = new TColumnIncrement();
|
||||||
_elem34.read(iprot);
|
_elem64.read(iprot);
|
||||||
struct.columns.add(_elem34);
|
struct.columns.add(_elem64);
|
||||||
}
|
}
|
||||||
iprot.readListEnd();
|
iprot.readListEnd();
|
||||||
}
|
}
|
||||||
|
@ -550,6 +654,26 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 4: // ATTRIBUTES
|
||||||
|
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
|
||||||
|
{
|
||||||
|
org.apache.thrift.protocol.TMap _map65 = iprot.readMapBegin();
|
||||||
|
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map65.size);
|
||||||
|
for (int _i66 = 0; _i66 < _map65.size; ++_i66)
|
||||||
|
{
|
||||||
|
ByteBuffer _key67; // required
|
||||||
|
ByteBuffer _val68; // required
|
||||||
|
_key67 = iprot.readBinary();
|
||||||
|
_val68 = iprot.readBinary();
|
||||||
|
struct.attributes.put(_key67, _val68);
|
||||||
|
}
|
||||||
|
iprot.readMapEnd();
|
||||||
|
}
|
||||||
|
struct.setAttributesIsSet(true);
|
||||||
|
} else {
|
||||||
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
}
|
}
|
||||||
|
@ -574,9 +698,9 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||||
{
|
{
|
||||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
|
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
|
||||||
for (TColumnIncrement _iter35 : struct.columns)
|
for (TColumnIncrement _iter69 : struct.columns)
|
||||||
{
|
{
|
||||||
_iter35.write(oprot);
|
_iter69.write(oprot);
|
||||||
}
|
}
|
||||||
oprot.writeListEnd();
|
oprot.writeListEnd();
|
||||||
}
|
}
|
||||||
|
@ -587,6 +711,21 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
oprot.writeBool(struct.writeToWal);
|
oprot.writeBool(struct.writeToWal);
|
||||||
oprot.writeFieldEnd();
|
oprot.writeFieldEnd();
|
||||||
}
|
}
|
||||||
|
if (struct.attributes != null) {
|
||||||
|
if (struct.isSetAttributes()) {
|
||||||
|
oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
|
||||||
|
{
|
||||||
|
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> _iter70 : struct.attributes.entrySet())
|
||||||
|
{
|
||||||
|
oprot.writeBinary(_iter70.getKey());
|
||||||
|
oprot.writeBinary(_iter70.getValue());
|
||||||
|
}
|
||||||
|
oprot.writeMapEnd();
|
||||||
|
}
|
||||||
|
oprot.writeFieldEnd();
|
||||||
|
}
|
||||||
|
}
|
||||||
oprot.writeFieldStop();
|
oprot.writeFieldStop();
|
||||||
oprot.writeStructEnd();
|
oprot.writeStructEnd();
|
||||||
}
|
}
|
||||||
|
@ -607,19 +746,32 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
oprot.writeBinary(struct.row);
|
oprot.writeBinary(struct.row);
|
||||||
{
|
{
|
||||||
oprot.writeI32(struct.columns.size());
|
oprot.writeI32(struct.columns.size());
|
||||||
for (TColumnIncrement _iter36 : struct.columns)
|
for (TColumnIncrement _iter71 : struct.columns)
|
||||||
{
|
{
|
||||||
_iter36.write(oprot);
|
_iter71.write(oprot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BitSet optionals = new BitSet();
|
BitSet optionals = new BitSet();
|
||||||
if (struct.isSetWriteToWal()) {
|
if (struct.isSetWriteToWal()) {
|
||||||
optionals.set(0);
|
optionals.set(0);
|
||||||
}
|
}
|
||||||
oprot.writeBitSet(optionals, 1);
|
if (struct.isSetAttributes()) {
|
||||||
|
optionals.set(1);
|
||||||
|
}
|
||||||
|
oprot.writeBitSet(optionals, 2);
|
||||||
if (struct.isSetWriteToWal()) {
|
if (struct.isSetWriteToWal()) {
|
||||||
oprot.writeBool(struct.writeToWal);
|
oprot.writeBool(struct.writeToWal);
|
||||||
}
|
}
|
||||||
|
if (struct.isSetAttributes()) {
|
||||||
|
{
|
||||||
|
oprot.writeI32(struct.attributes.size());
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> _iter72 : struct.attributes.entrySet())
|
||||||
|
{
|
||||||
|
oprot.writeBinary(_iter72.getKey());
|
||||||
|
oprot.writeBinary(_iter72.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -628,22 +780,37 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
||||||
struct.row = iprot.readBinary();
|
struct.row = iprot.readBinary();
|
||||||
struct.setRowIsSet(true);
|
struct.setRowIsSet(true);
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
org.apache.thrift.protocol.TList _list73 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||||
struct.columns = new ArrayList<TColumnIncrement>(_list37.size);
|
struct.columns = new ArrayList<TColumnIncrement>(_list73.size);
|
||||||
for (int _i38 = 0; _i38 < _list37.size; ++_i38)
|
for (int _i74 = 0; _i74 < _list73.size; ++_i74)
|
||||||
{
|
{
|
||||||
TColumnIncrement _elem39; // required
|
TColumnIncrement _elem75; // required
|
||||||
_elem39 = new TColumnIncrement();
|
_elem75 = new TColumnIncrement();
|
||||||
_elem39.read(iprot);
|
_elem75.read(iprot);
|
||||||
struct.columns.add(_elem39);
|
struct.columns.add(_elem75);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct.setColumnsIsSet(true);
|
struct.setColumnsIsSet(true);
|
||||||
BitSet incoming = iprot.readBitSet(1);
|
BitSet incoming = iprot.readBitSet(2);
|
||||||
if (incoming.get(0)) {
|
if (incoming.get(0)) {
|
||||||
struct.writeToWal = iprot.readBool();
|
struct.writeToWal = iprot.readBool();
|
||||||
struct.setWriteToWalIsSet(true);
|
struct.setWriteToWalIsSet(true);
|
||||||
}
|
}
|
||||||
|
if (incoming.get(1)) {
|
||||||
|
{
|
||||||
|
org.apache.thrift.protocol.TMap _map76 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
|
||||||
|
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map76.size);
|
||||||
|
for (int _i77 = 0; _i77 < _map76.size; ++_i77)
|
||||||
|
{
|
||||||
|
ByteBuffer _key78; // required
|
||||||
|
ByteBuffer _val79; // required
|
||||||
|
_key78 = iprot.readBinary();
|
||||||
|
_val79 = iprot.readBinary();
|
||||||
|
struct.attributes.put(_key78, _val79);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct.setAttributesIsSet(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
private static final org.apache.thrift.protocol.TField COLUMN_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("columnValues", org.apache.thrift.protocol.TType.LIST, (short)2);
|
private static final org.apache.thrift.protocol.TField COLUMN_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("columnValues", org.apache.thrift.protocol.TType.LIST, (short)2);
|
||||||
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3);
|
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3);
|
||||||
private static final org.apache.thrift.protocol.TField WRITE_TO_WAL_FIELD_DESC = new org.apache.thrift.protocol.TField("writeToWal", org.apache.thrift.protocol.TType.BOOL, (short)4);
|
private static final org.apache.thrift.protocol.TField WRITE_TO_WAL_FIELD_DESC = new org.apache.thrift.protocol.TField("writeToWal", org.apache.thrift.protocol.TType.BOOL, (short)4);
|
||||||
|
private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)5);
|
||||||
|
|
||||||
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
||||||
static {
|
static {
|
||||||
|
@ -59,13 +60,15 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
public List<TColumnValue> columnValues; // required
|
public List<TColumnValue> columnValues; // required
|
||||||
public long timestamp; // optional
|
public long timestamp; // optional
|
||||||
public boolean writeToWal; // optional
|
public boolean writeToWal; // optional
|
||||||
|
public Map<ByteBuffer,ByteBuffer> attributes; // optional
|
||||||
|
|
||||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||||
ROW((short)1, "row"),
|
ROW((short)1, "row"),
|
||||||
COLUMN_VALUES((short)2, "columnValues"),
|
COLUMN_VALUES((short)2, "columnValues"),
|
||||||
TIMESTAMP((short)3, "timestamp"),
|
TIMESTAMP((short)3, "timestamp"),
|
||||||
WRITE_TO_WAL((short)4, "writeToWal");
|
WRITE_TO_WAL((short)4, "writeToWal"),
|
||||||
|
ATTRIBUTES((short)5, "attributes");
|
||||||
|
|
||||||
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
||||||
|
|
||||||
|
@ -88,6 +91,8 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
return TIMESTAMP;
|
return TIMESTAMP;
|
||||||
case 4: // WRITE_TO_WAL
|
case 4: // WRITE_TO_WAL
|
||||||
return WRITE_TO_WAL;
|
return WRITE_TO_WAL;
|
||||||
|
case 5: // ATTRIBUTES
|
||||||
|
return ATTRIBUTES;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -131,7 +136,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
private static final int __TIMESTAMP_ISSET_ID = 0;
|
private static final int __TIMESTAMP_ISSET_ID = 0;
|
||||||
private static final int __WRITETOWAL_ISSET_ID = 1;
|
private static final int __WRITETOWAL_ISSET_ID = 1;
|
||||||
private byte __isset_bitfield = 0;
|
private byte __isset_bitfield = 0;
|
||||||
private _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.WRITE_TO_WAL};
|
private _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.WRITE_TO_WAL,_Fields.ATTRIBUTES};
|
||||||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||||
static {
|
static {
|
||||||
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||||
|
@ -144,6 +149,10 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
||||||
tmpMap.put(_Fields.WRITE_TO_WAL, new org.apache.thrift.meta_data.FieldMetaData("writeToWal", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
tmpMap.put(_Fields.WRITE_TO_WAL, new org.apache.thrift.meta_data.FieldMetaData("writeToWal", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
||||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
||||||
|
tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
||||||
|
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
||||||
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true),
|
||||||
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
|
||||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPut.class, metaDataMap);
|
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPut.class, metaDataMap);
|
||||||
}
|
}
|
||||||
|
@ -180,6 +189,23 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
}
|
}
|
||||||
this.timestamp = other.timestamp;
|
this.timestamp = other.timestamp;
|
||||||
this.writeToWal = other.writeToWal;
|
this.writeToWal = other.writeToWal;
|
||||||
|
if (other.isSetAttributes()) {
|
||||||
|
Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
|
||||||
|
|
||||||
|
ByteBuffer other_element_key = other_element.getKey();
|
||||||
|
ByteBuffer other_element_value = other_element.getValue();
|
||||||
|
|
||||||
|
ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
|
||||||
|
;
|
||||||
|
|
||||||
|
ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
|
||||||
|
;
|
||||||
|
|
||||||
|
__this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
|
||||||
|
}
|
||||||
|
this.attributes = __this__attributes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public TPut deepCopy() {
|
public TPut deepCopy() {
|
||||||
|
@ -194,6 +220,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
this.timestamp = 0;
|
this.timestamp = 0;
|
||||||
this.writeToWal = true;
|
this.writeToWal = true;
|
||||||
|
|
||||||
|
this.attributes = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getRow() {
|
public byte[] getRow() {
|
||||||
|
@ -315,6 +342,41 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITETOWAL_ISSET_ID, value);
|
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITETOWAL_ISSET_ID, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getAttributesSize() {
|
||||||
|
return (this.attributes == null) ? 0 : this.attributes.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void putToAttributes(ByteBuffer key, ByteBuffer val) {
|
||||||
|
if (this.attributes == null) {
|
||||||
|
this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
|
||||||
|
}
|
||||||
|
this.attributes.put(key, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<ByteBuffer,ByteBuffer> getAttributes() {
|
||||||
|
return this.attributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TPut setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
|
||||||
|
this.attributes = attributes;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unsetAttributes() {
|
||||||
|
this.attributes = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Returns true if field attributes is set (has been assigned a value) and false otherwise */
|
||||||
|
public boolean isSetAttributes() {
|
||||||
|
return this.attributes != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttributesIsSet(boolean value) {
|
||||||
|
if (!value) {
|
||||||
|
this.attributes = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setFieldValue(_Fields field, Object value) {
|
public void setFieldValue(_Fields field, Object value) {
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case ROW:
|
case ROW:
|
||||||
|
@ -349,6 +411,14 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ATTRIBUTES:
|
||||||
|
if (value == null) {
|
||||||
|
unsetAttributes();
|
||||||
|
} else {
|
||||||
|
setAttributes((Map<ByteBuffer,ByteBuffer>)value);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,6 +436,9 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
case WRITE_TO_WAL:
|
case WRITE_TO_WAL:
|
||||||
return Boolean.valueOf(isWriteToWal());
|
return Boolean.valueOf(isWriteToWal());
|
||||||
|
|
||||||
|
case ATTRIBUTES:
|
||||||
|
return getAttributes();
|
||||||
|
|
||||||
}
|
}
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
@ -385,6 +458,8 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
return isSetTimestamp();
|
return isSetTimestamp();
|
||||||
case WRITE_TO_WAL:
|
case WRITE_TO_WAL:
|
||||||
return isSetWriteToWal();
|
return isSetWriteToWal();
|
||||||
|
case ATTRIBUTES:
|
||||||
|
return isSetAttributes();
|
||||||
}
|
}
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
@ -438,6 +513,15 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean this_present_attributes = true && this.isSetAttributes();
|
||||||
|
boolean that_present_attributes = true && that.isSetAttributes();
|
||||||
|
if (this_present_attributes || that_present_attributes) {
|
||||||
|
if (!(this_present_attributes && that_present_attributes))
|
||||||
|
return false;
|
||||||
|
if (!this.attributes.equals(that.attributes))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -494,6 +578,16 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
return lastComparison;
|
return lastComparison;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
|
||||||
|
if (lastComparison != 0) {
|
||||||
|
return lastComparison;
|
||||||
|
}
|
||||||
|
if (isSetAttributes()) {
|
||||||
|
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
|
||||||
|
if (lastComparison != 0) {
|
||||||
|
return lastComparison;
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -541,6 +635,16 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
sb.append(this.writeToWal);
|
sb.append(this.writeToWal);
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
if (isSetAttributes()) {
|
||||||
|
if (!first) sb.append(", ");
|
||||||
|
sb.append("attributes:");
|
||||||
|
if (this.attributes == null) {
|
||||||
|
sb.append("null");
|
||||||
|
} else {
|
||||||
|
sb.append(this.attributes);
|
||||||
|
}
|
||||||
|
first = false;
|
||||||
|
}
|
||||||
sb.append(")");
|
sb.append(")");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -603,14 +707,14 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
case 2: // COLUMN_VALUES
|
case 2: // COLUMN_VALUES
|
||||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
|
org.apache.thrift.protocol.TList _list26 = iprot.readListBegin();
|
||||||
struct.columnValues = new ArrayList<TColumnValue>(_list16.size);
|
struct.columnValues = new ArrayList<TColumnValue>(_list26.size);
|
||||||
for (int _i17 = 0; _i17 < _list16.size; ++_i17)
|
for (int _i27 = 0; _i27 < _list26.size; ++_i27)
|
||||||
{
|
{
|
||||||
TColumnValue _elem18; // required
|
TColumnValue _elem28; // required
|
||||||
_elem18 = new TColumnValue();
|
_elem28 = new TColumnValue();
|
||||||
_elem18.read(iprot);
|
_elem28.read(iprot);
|
||||||
struct.columnValues.add(_elem18);
|
struct.columnValues.add(_elem28);
|
||||||
}
|
}
|
||||||
iprot.readListEnd();
|
iprot.readListEnd();
|
||||||
}
|
}
|
||||||
|
@ -635,6 +739,26 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 5: // ATTRIBUTES
|
||||||
|
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
|
||||||
|
{
|
||||||
|
org.apache.thrift.protocol.TMap _map29 = iprot.readMapBegin();
|
||||||
|
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map29.size);
|
||||||
|
for (int _i30 = 0; _i30 < _map29.size; ++_i30)
|
||||||
|
{
|
||||||
|
ByteBuffer _key31; // required
|
||||||
|
ByteBuffer _val32; // required
|
||||||
|
_key31 = iprot.readBinary();
|
||||||
|
_val32 = iprot.readBinary();
|
||||||
|
struct.attributes.put(_key31, _val32);
|
||||||
|
}
|
||||||
|
iprot.readMapEnd();
|
||||||
|
}
|
||||||
|
struct.setAttributesIsSet(true);
|
||||||
|
} else {
|
||||||
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
}
|
}
|
||||||
|
@ -659,9 +783,9 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
oprot.writeFieldBegin(COLUMN_VALUES_FIELD_DESC);
|
oprot.writeFieldBegin(COLUMN_VALUES_FIELD_DESC);
|
||||||
{
|
{
|
||||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columnValues.size()));
|
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columnValues.size()));
|
||||||
for (TColumnValue _iter19 : struct.columnValues)
|
for (TColumnValue _iter33 : struct.columnValues)
|
||||||
{
|
{
|
||||||
_iter19.write(oprot);
|
_iter33.write(oprot);
|
||||||
}
|
}
|
||||||
oprot.writeListEnd();
|
oprot.writeListEnd();
|
||||||
}
|
}
|
||||||
|
@ -677,6 +801,21 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
oprot.writeBool(struct.writeToWal);
|
oprot.writeBool(struct.writeToWal);
|
||||||
oprot.writeFieldEnd();
|
oprot.writeFieldEnd();
|
||||||
}
|
}
|
||||||
|
if (struct.attributes != null) {
|
||||||
|
if (struct.isSetAttributes()) {
|
||||||
|
oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
|
||||||
|
{
|
||||||
|
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> _iter34 : struct.attributes.entrySet())
|
||||||
|
{
|
||||||
|
oprot.writeBinary(_iter34.getKey());
|
||||||
|
oprot.writeBinary(_iter34.getValue());
|
||||||
|
}
|
||||||
|
oprot.writeMapEnd();
|
||||||
|
}
|
||||||
|
oprot.writeFieldEnd();
|
||||||
|
}
|
||||||
|
}
|
||||||
oprot.writeFieldStop();
|
oprot.writeFieldStop();
|
||||||
oprot.writeStructEnd();
|
oprot.writeStructEnd();
|
||||||
}
|
}
|
||||||
|
@ -697,9 +836,9 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
oprot.writeBinary(struct.row);
|
oprot.writeBinary(struct.row);
|
||||||
{
|
{
|
||||||
oprot.writeI32(struct.columnValues.size());
|
oprot.writeI32(struct.columnValues.size());
|
||||||
for (TColumnValue _iter20 : struct.columnValues)
|
for (TColumnValue _iter35 : struct.columnValues)
|
||||||
{
|
{
|
||||||
_iter20.write(oprot);
|
_iter35.write(oprot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BitSet optionals = new BitSet();
|
BitSet optionals = new BitSet();
|
||||||
|
@ -709,13 +848,26 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
if (struct.isSetWriteToWal()) {
|
if (struct.isSetWriteToWal()) {
|
||||||
optionals.set(1);
|
optionals.set(1);
|
||||||
}
|
}
|
||||||
oprot.writeBitSet(optionals, 2);
|
if (struct.isSetAttributes()) {
|
||||||
|
optionals.set(2);
|
||||||
|
}
|
||||||
|
oprot.writeBitSet(optionals, 3);
|
||||||
if (struct.isSetTimestamp()) {
|
if (struct.isSetTimestamp()) {
|
||||||
oprot.writeI64(struct.timestamp);
|
oprot.writeI64(struct.timestamp);
|
||||||
}
|
}
|
||||||
if (struct.isSetWriteToWal()) {
|
if (struct.isSetWriteToWal()) {
|
||||||
oprot.writeBool(struct.writeToWal);
|
oprot.writeBool(struct.writeToWal);
|
||||||
}
|
}
|
||||||
|
if (struct.isSetAttributes()) {
|
||||||
|
{
|
||||||
|
oprot.writeI32(struct.attributes.size());
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> _iter36 : struct.attributes.entrySet())
|
||||||
|
{
|
||||||
|
oprot.writeBinary(_iter36.getKey());
|
||||||
|
oprot.writeBinary(_iter36.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -724,18 +876,18 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
struct.row = iprot.readBinary();
|
struct.row = iprot.readBinary();
|
||||||
struct.setRowIsSet(true);
|
struct.setRowIsSet(true);
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||||
struct.columnValues = new ArrayList<TColumnValue>(_list21.size);
|
struct.columnValues = new ArrayList<TColumnValue>(_list37.size);
|
||||||
for (int _i22 = 0; _i22 < _list21.size; ++_i22)
|
for (int _i38 = 0; _i38 < _list37.size; ++_i38)
|
||||||
{
|
{
|
||||||
TColumnValue _elem23; // required
|
TColumnValue _elem39; // required
|
||||||
_elem23 = new TColumnValue();
|
_elem39 = new TColumnValue();
|
||||||
_elem23.read(iprot);
|
_elem39.read(iprot);
|
||||||
struct.columnValues.add(_elem23);
|
struct.columnValues.add(_elem39);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct.setColumnValuesIsSet(true);
|
struct.setColumnValuesIsSet(true);
|
||||||
BitSet incoming = iprot.readBitSet(2);
|
BitSet incoming = iprot.readBitSet(3);
|
||||||
if (incoming.get(0)) {
|
if (incoming.get(0)) {
|
||||||
struct.timestamp = iprot.readI64();
|
struct.timestamp = iprot.readI64();
|
||||||
struct.setTimestampIsSet(true);
|
struct.setTimestampIsSet(true);
|
||||||
|
@ -744,6 +896,21 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
||||||
struct.writeToWal = iprot.readBool();
|
struct.writeToWal = iprot.readBool();
|
||||||
struct.setWriteToWalIsSet(true);
|
struct.setWriteToWalIsSet(true);
|
||||||
}
|
}
|
||||||
|
if (incoming.get(2)) {
|
||||||
|
{
|
||||||
|
org.apache.thrift.protocol.TMap _map40 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
|
||||||
|
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map40.size);
|
||||||
|
for (int _i41 = 0; _i41 < _map40.size; ++_i41)
|
||||||
|
{
|
||||||
|
ByteBuffer _key42; // required
|
||||||
|
ByteBuffer _val43; // required
|
||||||
|
_key42 = iprot.readBinary();
|
||||||
|
_val43 = iprot.readBinary();
|
||||||
|
struct.attributes.put(_key42, _val43);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct.setAttributesIsSet(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
private static final org.apache.thrift.protocol.TField TIME_RANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeRange", org.apache.thrift.protocol.TType.STRUCT, (short)6);
|
private static final org.apache.thrift.protocol.TField TIME_RANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeRange", org.apache.thrift.protocol.TType.STRUCT, (short)6);
|
||||||
private static final org.apache.thrift.protocol.TField FILTER_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("filterString", org.apache.thrift.protocol.TType.STRING, (short)7);
|
private static final org.apache.thrift.protocol.TField FILTER_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("filterString", org.apache.thrift.protocol.TType.STRING, (short)7);
|
||||||
private static final org.apache.thrift.protocol.TField BATCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("batchSize", org.apache.thrift.protocol.TType.I32, (short)8);
|
private static final org.apache.thrift.protocol.TField BATCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("batchSize", org.apache.thrift.protocol.TType.I32, (short)8);
|
||||||
|
private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)9);
|
||||||
|
|
||||||
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
||||||
static {
|
static {
|
||||||
|
@ -60,6 +61,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
public TTimeRange timeRange; // optional
|
public TTimeRange timeRange; // optional
|
||||||
public ByteBuffer filterString; // optional
|
public ByteBuffer filterString; // optional
|
||||||
public int batchSize; // optional
|
public int batchSize; // optional
|
||||||
|
public Map<ByteBuffer,ByteBuffer> attributes; // optional
|
||||||
|
|
||||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||||
|
@ -70,7 +72,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
MAX_VERSIONS((short)5, "maxVersions"),
|
MAX_VERSIONS((short)5, "maxVersions"),
|
||||||
TIME_RANGE((short)6, "timeRange"),
|
TIME_RANGE((short)6, "timeRange"),
|
||||||
FILTER_STRING((short)7, "filterString"),
|
FILTER_STRING((short)7, "filterString"),
|
||||||
BATCH_SIZE((short)8, "batchSize");
|
BATCH_SIZE((short)8, "batchSize"),
|
||||||
|
ATTRIBUTES((short)9, "attributes");
|
||||||
|
|
||||||
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
||||||
|
|
||||||
|
@ -101,6 +104,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
return FILTER_STRING;
|
return FILTER_STRING;
|
||||||
case 8: // BATCH_SIZE
|
case 8: // BATCH_SIZE
|
||||||
return BATCH_SIZE;
|
return BATCH_SIZE;
|
||||||
|
case 9: // ATTRIBUTES
|
||||||
|
return ATTRIBUTES;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -145,7 +150,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
private static final int __MAXVERSIONS_ISSET_ID = 1;
|
private static final int __MAXVERSIONS_ISSET_ID = 1;
|
||||||
private static final int __BATCHSIZE_ISSET_ID = 2;
|
private static final int __BATCHSIZE_ISSET_ID = 2;
|
||||||
private byte __isset_bitfield = 0;
|
private byte __isset_bitfield = 0;
|
||||||
private _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.COLUMNS,_Fields.CACHING,_Fields.MAX_VERSIONS,_Fields.TIME_RANGE,_Fields.FILTER_STRING,_Fields.BATCH_SIZE};
|
private _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.COLUMNS,_Fields.CACHING,_Fields.MAX_VERSIONS,_Fields.TIME_RANGE,_Fields.FILTER_STRING,_Fields.BATCH_SIZE,_Fields.ATTRIBUTES};
|
||||||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||||
static {
|
static {
|
||||||
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||||
|
@ -166,6 +171,10 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
|
||||||
tmpMap.put(_Fields.BATCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("batchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
tmpMap.put(_Fields.BATCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("batchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
||||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||||
|
tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
|
||||||
|
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
|
||||||
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true),
|
||||||
|
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
|
||||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TScan.class, metaDataMap);
|
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TScan.class, metaDataMap);
|
||||||
}
|
}
|
||||||
|
@ -205,6 +214,23 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
this.batchSize = other.batchSize;
|
this.batchSize = other.batchSize;
|
||||||
|
if (other.isSetAttributes()) {
|
||||||
|
Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
|
||||||
|
|
||||||
|
ByteBuffer other_element_key = other_element.getKey();
|
||||||
|
ByteBuffer other_element_value = other_element.getValue();
|
||||||
|
|
||||||
|
ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
|
||||||
|
;
|
||||||
|
|
||||||
|
ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
|
||||||
|
;
|
||||||
|
|
||||||
|
__this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
|
||||||
|
}
|
||||||
|
this.attributes = __this__attributes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public TScan deepCopy() {
|
public TScan deepCopy() {
|
||||||
|
@ -224,6 +250,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
this.filterString = null;
|
this.filterString = null;
|
||||||
setBatchSizeIsSet(false);
|
setBatchSizeIsSet(false);
|
||||||
this.batchSize = 0;
|
this.batchSize = 0;
|
||||||
|
this.attributes = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getStartRow() {
|
public byte[] getStartRow() {
|
||||||
|
@ -460,6 +487,41 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BATCHSIZE_ISSET_ID, value);
|
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BATCHSIZE_ISSET_ID, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getAttributesSize() {
|
||||||
|
return (this.attributes == null) ? 0 : this.attributes.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void putToAttributes(ByteBuffer key, ByteBuffer val) {
|
||||||
|
if (this.attributes == null) {
|
||||||
|
this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
|
||||||
|
}
|
||||||
|
this.attributes.put(key, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<ByteBuffer,ByteBuffer> getAttributes() {
|
||||||
|
return this.attributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TScan setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
|
||||||
|
this.attributes = attributes;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unsetAttributes() {
|
||||||
|
this.attributes = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Returns true if field attributes is set (has been assigned a value) and false otherwise */
|
||||||
|
public boolean isSetAttributes() {
|
||||||
|
return this.attributes != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttributesIsSet(boolean value) {
|
||||||
|
if (!value) {
|
||||||
|
this.attributes = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setFieldValue(_Fields field, Object value) {
|
public void setFieldValue(_Fields field, Object value) {
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case START_ROW:
|
case START_ROW:
|
||||||
|
@ -526,6 +588,14 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ATTRIBUTES:
|
||||||
|
if (value == null) {
|
||||||
|
unsetAttributes();
|
||||||
|
} else {
|
||||||
|
setAttributes((Map<ByteBuffer,ByteBuffer>)value);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -555,6 +625,9 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
case BATCH_SIZE:
|
case BATCH_SIZE:
|
||||||
return Integer.valueOf(getBatchSize());
|
return Integer.valueOf(getBatchSize());
|
||||||
|
|
||||||
|
case ATTRIBUTES:
|
||||||
|
return getAttributes();
|
||||||
|
|
||||||
}
|
}
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
@ -582,6 +655,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
return isSetFilterString();
|
return isSetFilterString();
|
||||||
case BATCH_SIZE:
|
case BATCH_SIZE:
|
||||||
return isSetBatchSize();
|
return isSetBatchSize();
|
||||||
|
case ATTRIBUTES:
|
||||||
|
return isSetAttributes();
|
||||||
}
|
}
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
@ -671,6 +746,15 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean this_present_attributes = true && this.isSetAttributes();
|
||||||
|
boolean that_present_attributes = true && that.isSetAttributes();
|
||||||
|
if (this_present_attributes || that_present_attributes) {
|
||||||
|
if (!(this_present_attributes && that_present_attributes))
|
||||||
|
return false;
|
||||||
|
if (!this.attributes.equals(that.attributes))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -767,6 +851,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
return lastComparison;
|
return lastComparison;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
|
||||||
|
if (lastComparison != 0) {
|
||||||
|
return lastComparison;
|
||||||
|
}
|
||||||
|
if (isSetAttributes()) {
|
||||||
|
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
|
||||||
|
if (lastComparison != 0) {
|
||||||
|
return lastComparison;
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -854,6 +948,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
sb.append(this.batchSize);
|
sb.append(this.batchSize);
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
if (isSetAttributes()) {
|
||||||
|
if (!first) sb.append(", ");
|
||||||
|
sb.append("attributes:");
|
||||||
|
if (this.attributes == null) {
|
||||||
|
sb.append("null");
|
||||||
|
} else {
|
||||||
|
sb.append(this.attributes);
|
||||||
|
}
|
||||||
|
first = false;
|
||||||
|
}
|
||||||
sb.append(")");
|
sb.append(")");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -921,14 +1025,14 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
case 3: // COLUMNS
|
case 3: // COLUMNS
|
||||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
|
org.apache.thrift.protocol.TList _list80 = iprot.readListBegin();
|
||||||
struct.columns = new ArrayList<TColumn>(_list40.size);
|
struct.columns = new ArrayList<TColumn>(_list80.size);
|
||||||
for (int _i41 = 0; _i41 < _list40.size; ++_i41)
|
for (int _i81 = 0; _i81 < _list80.size; ++_i81)
|
||||||
{
|
{
|
||||||
TColumn _elem42; // optional
|
TColumn _elem82; // required
|
||||||
_elem42 = new TColumn();
|
_elem82 = new TColumn();
|
||||||
_elem42.read(iprot);
|
_elem82.read(iprot);
|
||||||
struct.columns.add(_elem42);
|
struct.columns.add(_elem82);
|
||||||
}
|
}
|
||||||
iprot.readListEnd();
|
iprot.readListEnd();
|
||||||
}
|
}
|
||||||
|
@ -978,6 +1082,26 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 9: // ATTRIBUTES
|
||||||
|
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
|
||||||
|
{
|
||||||
|
org.apache.thrift.protocol.TMap _map83 = iprot.readMapBegin();
|
||||||
|
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map83.size);
|
||||||
|
for (int _i84 = 0; _i84 < _map83.size; ++_i84)
|
||||||
|
{
|
||||||
|
ByteBuffer _key85; // required
|
||||||
|
ByteBuffer _val86; // required
|
||||||
|
_key85 = iprot.readBinary();
|
||||||
|
_val86 = iprot.readBinary();
|
||||||
|
struct.attributes.put(_key85, _val86);
|
||||||
|
}
|
||||||
|
iprot.readMapEnd();
|
||||||
|
}
|
||||||
|
struct.setAttributesIsSet(true);
|
||||||
|
} else {
|
||||||
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||||
}
|
}
|
||||||
|
@ -1012,9 +1136,9 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||||
{
|
{
|
||||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
|
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
|
||||||
for (TColumn _iter43 : struct.columns)
|
for (TColumn _iter87 : struct.columns)
|
||||||
{
|
{
|
||||||
_iter43.write(oprot);
|
_iter87.write(oprot);
|
||||||
}
|
}
|
||||||
oprot.writeListEnd();
|
oprot.writeListEnd();
|
||||||
}
|
}
|
||||||
|
@ -1050,6 +1174,21 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
oprot.writeI32(struct.batchSize);
|
oprot.writeI32(struct.batchSize);
|
||||||
oprot.writeFieldEnd();
|
oprot.writeFieldEnd();
|
||||||
}
|
}
|
||||||
|
if (struct.attributes != null) {
|
||||||
|
if (struct.isSetAttributes()) {
|
||||||
|
oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
|
||||||
|
{
|
||||||
|
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> _iter88 : struct.attributes.entrySet())
|
||||||
|
{
|
||||||
|
oprot.writeBinary(_iter88.getKey());
|
||||||
|
oprot.writeBinary(_iter88.getValue());
|
||||||
|
}
|
||||||
|
oprot.writeMapEnd();
|
||||||
|
}
|
||||||
|
oprot.writeFieldEnd();
|
||||||
|
}
|
||||||
|
}
|
||||||
oprot.writeFieldStop();
|
oprot.writeFieldStop();
|
||||||
oprot.writeStructEnd();
|
oprot.writeStructEnd();
|
||||||
}
|
}
|
||||||
|
@ -1092,7 +1231,10 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
if (struct.isSetBatchSize()) {
|
if (struct.isSetBatchSize()) {
|
||||||
optionals.set(7);
|
optionals.set(7);
|
||||||
}
|
}
|
||||||
oprot.writeBitSet(optionals, 8);
|
if (struct.isSetAttributes()) {
|
||||||
|
optionals.set(8);
|
||||||
|
}
|
||||||
|
oprot.writeBitSet(optionals, 9);
|
||||||
if (struct.isSetStartRow()) {
|
if (struct.isSetStartRow()) {
|
||||||
oprot.writeBinary(struct.startRow);
|
oprot.writeBinary(struct.startRow);
|
||||||
}
|
}
|
||||||
|
@ -1102,9 +1244,9 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
if (struct.isSetColumns()) {
|
if (struct.isSetColumns()) {
|
||||||
{
|
{
|
||||||
oprot.writeI32(struct.columns.size());
|
oprot.writeI32(struct.columns.size());
|
||||||
for (TColumn _iter44 : struct.columns)
|
for (TColumn _iter89 : struct.columns)
|
||||||
{
|
{
|
||||||
_iter44.write(oprot);
|
_iter89.write(oprot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1123,12 +1265,22 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
if (struct.isSetBatchSize()) {
|
if (struct.isSetBatchSize()) {
|
||||||
oprot.writeI32(struct.batchSize);
|
oprot.writeI32(struct.batchSize);
|
||||||
}
|
}
|
||||||
|
if (struct.isSetAttributes()) {
|
||||||
|
{
|
||||||
|
oprot.writeI32(struct.attributes.size());
|
||||||
|
for (Map.Entry<ByteBuffer, ByteBuffer> _iter90 : struct.attributes.entrySet())
|
||||||
|
{
|
||||||
|
oprot.writeBinary(_iter90.getKey());
|
||||||
|
oprot.writeBinary(_iter90.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void read(org.apache.thrift.protocol.TProtocol prot, TScan struct) throws org.apache.thrift.TException {
|
public void read(org.apache.thrift.protocol.TProtocol prot, TScan struct) throws org.apache.thrift.TException {
|
||||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||||
BitSet incoming = iprot.readBitSet(8);
|
BitSet incoming = iprot.readBitSet(9);
|
||||||
if (incoming.get(0)) {
|
if (incoming.get(0)) {
|
||||||
struct.startRow = iprot.readBinary();
|
struct.startRow = iprot.readBinary();
|
||||||
struct.setStartRowIsSet(true);
|
struct.setStartRowIsSet(true);
|
||||||
|
@ -1139,14 +1291,14 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
}
|
}
|
||||||
if (incoming.get(2)) {
|
if (incoming.get(2)) {
|
||||||
{
|
{
|
||||||
org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
org.apache.thrift.protocol.TList _list91 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||||
struct.columns = new ArrayList<TColumn>(_list45.size);
|
struct.columns = new ArrayList<TColumn>(_list91.size);
|
||||||
for (int _i46 = 0; _i46 < _list45.size; ++_i46)
|
for (int _i92 = 0; _i92 < _list91.size; ++_i92)
|
||||||
{
|
{
|
||||||
TColumn _elem47; // optional
|
TColumn _elem93; // required
|
||||||
_elem47 = new TColumn();
|
_elem93 = new TColumn();
|
||||||
_elem47.read(iprot);
|
_elem93.read(iprot);
|
||||||
struct.columns.add(_elem47);
|
struct.columns.add(_elem93);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct.setColumnsIsSet(true);
|
struct.setColumnsIsSet(true);
|
||||||
|
@ -1172,6 +1324,21 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
||||||
struct.batchSize = iprot.readI32();
|
struct.batchSize = iprot.readI32();
|
||||||
struct.setBatchSizeIsSet(true);
|
struct.setBatchSizeIsSet(true);
|
||||||
}
|
}
|
||||||
|
if (incoming.get(8)) {
|
||||||
|
{
|
||||||
|
org.apache.thrift.protocol.TMap _map94 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
|
||||||
|
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map94.size);
|
||||||
|
for (int _i95 = 0; _i95 < _map94.size; ++_i95)
|
||||||
|
{
|
||||||
|
ByteBuffer _key96; // required
|
||||||
|
ByteBuffer _val97; // required
|
||||||
|
_key96 = iprot.readBinary();
|
||||||
|
_val97 = iprot.readBinary();
|
||||||
|
struct.attributes.put(_key96, _val97);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct.setAttributesIsSet(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,8 @@ struct TGet {
|
||||||
4: optional TTimeRange timeRange,
|
4: optional TTimeRange timeRange,
|
||||||
|
|
||||||
5: optional i32 maxVersions,
|
5: optional i32 maxVersions,
|
||||||
6: optional binary filterString
|
6: optional binary filterString,
|
||||||
|
7: optional map<binary, binary> attributes
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -116,7 +117,8 @@ struct TPut {
|
||||||
1: required binary row,
|
1: required binary row,
|
||||||
2: required list<TColumnValue> columnValues
|
2: required list<TColumnValue> columnValues
|
||||||
3: optional i64 timestamp,
|
3: optional i64 timestamp,
|
||||||
4: optional bool writeToWal = 1
|
4: optional bool writeToWal = 1,
|
||||||
|
5: optional map<binary, binary> attributes
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -147,7 +149,8 @@ struct TDelete {
|
||||||
2: optional list<TColumn> columns,
|
2: optional list<TColumn> columns,
|
||||||
3: optional i64 timestamp,
|
3: optional i64 timestamp,
|
||||||
4: optional TDeleteType deleteType = 1,
|
4: optional TDeleteType deleteType = 1,
|
||||||
5: optional bool writeToWal = 1
|
5: optional bool writeToWal = 1,
|
||||||
|
6: optional map<binary, binary> attributes
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -159,7 +162,8 @@ struct TDelete {
|
||||||
struct TIncrement {
|
struct TIncrement {
|
||||||
1: required binary row,
|
1: required binary row,
|
||||||
2: required list<TColumnIncrement> columns,
|
2: required list<TColumnIncrement> columns,
|
||||||
3: optional bool writeToWal = 1
|
3: optional bool writeToWal = 1,
|
||||||
|
4: optional map<binary, binary> attributes
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -174,7 +178,8 @@ struct TScan {
|
||||||
5: optional i32 maxVersions=1,
|
5: optional i32 maxVersions=1,
|
||||||
6: optional TTimeRange timeRange,
|
6: optional TTimeRange timeRange,
|
||||||
7: optional binary filterString,
|
7: optional binary filterString,
|
||||||
8: optional i32 batchSize
|
8: optional i32 batchSize,
|
||||||
|
9: optional map<binary, binary> attributes
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -26,7 +26,12 @@ import org.apache.hadoop.hbase.HBaseTestingUtility;
|
||||||
import org.apache.hadoop.hbase.HColumnDescriptor;
|
import org.apache.hadoop.hbase.HColumnDescriptor;
|
||||||
import org.apache.hadoop.hbase.HTableDescriptor;
|
import org.apache.hadoop.hbase.HTableDescriptor;
|
||||||
import org.apache.hadoop.hbase.MediumTests;
|
import org.apache.hadoop.hbase.MediumTests;
|
||||||
|
import org.apache.hadoop.hbase.client.Get;
|
||||||
import org.apache.hadoop.hbase.client.HBaseAdmin;
|
import org.apache.hadoop.hbase.client.HBaseAdmin;
|
||||||
|
import org.apache.hadoop.hbase.client.Put;
|
||||||
|
import org.apache.hadoop.hbase.client.Scan;
|
||||||
|
import org.apache.hadoop.hbase.client.Increment;
|
||||||
|
import org.apache.hadoop.hbase.client.Delete;
|
||||||
import org.apache.hadoop.hbase.filter.ParseFilter;
|
import org.apache.hadoop.hbase.filter.ParseFilter;
|
||||||
import org.apache.hadoop.hbase.test.MetricsAssertHelper;
|
import org.apache.hadoop.hbase.test.MetricsAssertHelper;
|
||||||
import org.apache.hadoop.hbase.thrift.ThriftMetrics;
|
import org.apache.hadoop.hbase.thrift.ThriftMetrics;
|
||||||
|
@ -57,7 +62,13 @@ import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.getFromThrift;
|
||||||
|
import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.putFromThrift;
|
||||||
|
import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.scanFromThrift;
|
||||||
|
import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.incrementFromThrift;
|
||||||
|
import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.deleteFromThrift;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
import static java.nio.ByteBuffer.wrap;
|
import static java.nio.ByteBuffer.wrap;
|
||||||
|
|
||||||
|
@ -694,5 +705,43 @@ public class TestThriftHBaseServiceHandler {
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testAttribute() throws Exception {
|
||||||
|
byte[] rowName = "testAttribute".getBytes();
|
||||||
|
byte[] attributeKey = "attribute1".getBytes();
|
||||||
|
byte[] attributeValue = "value1".getBytes();
|
||||||
|
Map<ByteBuffer, ByteBuffer> attributes = new HashMap<ByteBuffer, ByteBuffer>();
|
||||||
|
attributes.put(wrap(attributeKey), wrap(attributeValue));
|
||||||
|
|
||||||
|
TGet tGet = new TGet(wrap(rowName));
|
||||||
|
tGet.setAttributes(attributes);
|
||||||
|
Get get = getFromThrift(tGet);
|
||||||
|
assertArrayEquals(get.getAttribute("attribute1"), attributeValue);
|
||||||
|
|
||||||
|
List<TColumnValue> columnValues = new ArrayList<TColumnValue>();
|
||||||
|
columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname)));
|
||||||
|
TPut tPut = new TPut(wrap(rowName) , columnValues);
|
||||||
|
tPut.setAttributes(attributes);
|
||||||
|
Put put = putFromThrift(tPut);
|
||||||
|
assertArrayEquals(put.getAttribute("attribute1"), attributeValue);
|
||||||
|
|
||||||
|
TScan tScan = new TScan();
|
||||||
|
tScan.setAttributes(attributes);
|
||||||
|
Scan scan = scanFromThrift(tScan);
|
||||||
|
assertArrayEquals(scan.getAttribute("attribute1"), attributeValue);
|
||||||
|
|
||||||
|
List<TColumnIncrement> incrementColumns = new ArrayList<TColumnIncrement>();
|
||||||
|
incrementColumns.add(new TColumnIncrement(wrap(familyAname), wrap(qualifierAname)));
|
||||||
|
TIncrement tIncrement = new TIncrement(wrap(rowName), incrementColumns);
|
||||||
|
tIncrement.setAttributes(attributes);
|
||||||
|
Increment increment = incrementFromThrift(tIncrement);
|
||||||
|
assertArrayEquals(increment.getAttribute("attribute1"), attributeValue);
|
||||||
|
|
||||||
|
TDelete tDelete = new TDelete(wrap(rowName));
|
||||||
|
tDelete.setAttributes(attributes);
|
||||||
|
Delete delete = deleteFromThrift(tDelete);
|
||||||
|
assertArrayEquals(delete.getAttribute("attribute1"), attributeValue);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue