http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java index b38d936..676275a 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java @@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory; * If you specify a time range and a timestamp the range is ignored. * Timestamps on TColumns are ignored. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.io.Serializable, Cloneable, Comparable<TGet> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGet"); @@ -65,6 +65,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i private static final org.apache.thrift.protocol.TField STORE_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("storeLimit", org.apache.thrift.protocol.TType.I32, (short)12); private static final org.apache.thrift.protocol.TField STORE_OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("storeOffset", org.apache.thrift.protocol.TType.I32, (short)13); private static final org.apache.thrift.protocol.TField EXISTENCE_ONLY_FIELD_DESC = new org.apache.thrift.protocol.TField("existence_only", org.apache.thrift.protocol.TType.BOOL, (short)14); + private static final org.apache.thrift.protocol.TField FILTER_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("filterBytes", org.apache.thrift.protocol.TType.STRING, (short)15); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -90,6 +91,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i public int storeLimit; // optional public int storeOffset; // optional public boolean existence_only; // optional + public ByteBuffer filterBytes; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -110,7 +112,8 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i CACHE_BLOCKS((short)11, "cacheBlocks"), STORE_LIMIT((short)12, "storeLimit"), STORE_OFFSET((short)13, "storeOffset"), - EXISTENCE_ONLY((short)14, "existence_only"); + EXISTENCE_ONLY((short)14, "existence_only"), + FILTER_BYTES((short)15, "filterBytes"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -153,6 +156,8 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i return STORE_OFFSET; case 14: // EXISTENCE_ONLY return EXISTENCE_ONLY; + case 15: // FILTER_BYTES + return FILTER_BYTES; default: return null; } @@ -201,7 +206,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i private static final int __STOREOFFSET_ISSET_ID = 5; private static final int __EXISTENCE_ONLY_ISSET_ID = 6; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.TIME_RANGE,_Fields.MAX_VERSIONS,_Fields.FILTER_STRING,_Fields.ATTRIBUTES,_Fields.AUTHORIZATIONS,_Fields.CONSISTENCY,_Fields.TARGET_REPLICA_ID,_Fields.CACHE_BLOCKS,_Fields.STORE_LIMIT,_Fields.STORE_OFFSET,_Fields.EXISTENCE_ONLY}; + private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.TIME_RANGE,_Fields.MAX_VERSIONS,_Fields.FILTER_STRING,_Fields.ATTRIBUTES,_Fields.AUTHORIZATIONS,_Fields.CONSISTENCY,_Fields.TARGET_REPLICA_ID,_Fields.CACHE_BLOCKS,_Fields.STORE_LIMIT,_Fields.STORE_OFFSET,_Fields.EXISTENCE_ONLY,_Fields.FILTER_BYTES}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -236,6 +241,8 @@ 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))); tmpMap.put(_Fields.EXISTENCE_ONLY, new org.apache.thrift.meta_data.FieldMetaData("existence_only", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.FILTER_BYTES, new org.apache.thrift.meta_data.FieldMetaData("filterBytes", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGet.class, metaDataMap); } @@ -288,6 +295,9 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i this.storeLimit = other.storeLimit; this.storeOffset = other.storeOffset; this.existence_only = other.existence_only; + if (other.isSetFilterBytes()) { + this.filterBytes = org.apache.thrift.TBaseHelper.copyBinary(other.filterBytes); + } } public TGet deepCopy() { @@ -317,6 +327,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i this.storeOffset = 0; setExistence_onlyIsSet(false); this.existence_only = false; + this.filterBytes = null; } public byte[] getRow() { @@ -702,6 +713,40 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXISTENCE_ONLY_ISSET_ID, value); } + public byte[] getFilterBytes() { + setFilterBytes(org.apache.thrift.TBaseHelper.rightSize(filterBytes)); + return filterBytes == null ? null : filterBytes.array(); + } + + public ByteBuffer bufferForFilterBytes() { + return org.apache.thrift.TBaseHelper.copyBinary(filterBytes); + } + + public TGet setFilterBytes(byte[] filterBytes) { + this.filterBytes = filterBytes == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(filterBytes, filterBytes.length)); + return this; + } + + public TGet setFilterBytes(ByteBuffer filterBytes) { + this.filterBytes = org.apache.thrift.TBaseHelper.copyBinary(filterBytes); + return this; + } + + public void unsetFilterBytes() { + this.filterBytes = null; + } + + /** Returns true if field filterBytes is set (has been assigned a value) and false otherwise */ + public boolean isSetFilterBytes() { + return this.filterBytes != null; + } + + public void setFilterBytesIsSet(boolean value) { + if (!value) { + this.filterBytes = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case ROW: @@ -816,6 +861,14 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i } break; + case FILTER_BYTES: + if (value == null) { + unsetFilterBytes(); + } else { + setFilterBytes((ByteBuffer)value); + } + break; + } } @@ -863,6 +916,9 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i case EXISTENCE_ONLY: return isExistence_only(); + case FILTER_BYTES: + return getFilterBytes(); + } throw new IllegalStateException(); } @@ -902,6 +958,8 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i return isSetStoreOffset(); case EXISTENCE_ONLY: return isSetExistence_only(); + case FILTER_BYTES: + return isSetFilterBytes(); } throw new IllegalStateException(); } @@ -1045,6 +1103,15 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i return false; } + boolean this_present_filterBytes = true && this.isSetFilterBytes(); + boolean that_present_filterBytes = true && that.isSetFilterBytes(); + if (this_present_filterBytes || that_present_filterBytes) { + if (!(this_present_filterBytes && that_present_filterBytes)) + return false; + if (!this.filterBytes.equals(that.filterBytes)) + return false; + } + return true; } @@ -1122,6 +1189,11 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i if (present_existence_only) list.add(existence_only); + boolean present_filterBytes = true && (isSetFilterBytes()); + list.add(present_filterBytes); + if (present_filterBytes) + list.add(filterBytes); + return list.hashCode(); } @@ -1273,6 +1345,16 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i return lastComparison; } } + lastComparison = Boolean.valueOf(isSetFilterBytes()).compareTo(other.isSetFilterBytes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilterBytes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterBytes, other.filterBytes); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1402,6 +1484,16 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i sb.append(this.existence_only); first = false; } + if (isSetFilterBytes()) { + if (!first) sb.append(", "); + sb.append("filterBytes:"); + if (this.filterBytes == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.filterBytes, sb); + } + first = false; + } sb.append(")"); return sb.toString(); } @@ -1593,6 +1685,14 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 15: // FILTER_BYTES + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.filterBytes = iprot.readBinary(); + struct.setFilterBytesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1705,6 +1805,13 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i oprot.writeBool(struct.existence_only); oprot.writeFieldEnd(); } + if (struct.filterBytes != null) { + if (struct.isSetFilterBytes()) { + oprot.writeFieldBegin(FILTER_BYTES_FIELD_DESC); + oprot.writeBinary(struct.filterBytes); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1763,7 +1870,10 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i if (struct.isSetExistence_only()) { optionals.set(12); } - oprot.writeBitSet(optionals, 13); + if (struct.isSetFilterBytes()) { + optionals.set(13); + } + oprot.writeBitSet(optionals, 14); if (struct.isSetColumns()) { { oprot.writeI32(struct.columns.size()); @@ -1816,6 +1926,9 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i if (struct.isSetExistence_only()) { oprot.writeBool(struct.existence_only); } + if (struct.isSetFilterBytes()) { + oprot.writeBinary(struct.filterBytes); + } } @Override @@ -1823,7 +1936,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i TTupleProtocol iprot = (TTupleProtocol) prot; struct.row = iprot.readBinary(); struct.setRowIsSet(true); - BitSet incoming = iprot.readBitSet(13); + BitSet incoming = iprot.readBitSet(14); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list27 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); @@ -1899,6 +2012,10 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i struct.existence_only = iprot.readBool(); struct.setExistence_onlyIsSet(true); } + if (incoming.get(13)) { + struct.filterBytes = iprot.readBinary(); + struct.setFilterBytesIsSet(true); + } } }
http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java index bb5db4d..880af45 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class THBaseService { public interface Iface { @@ -30957,7 +30957,7 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.REGEX, new org.apache.thrift.meta_data.FieldMetaData("regex", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.REGEX, new org.apache.thrift.meta_data.FieldMetaData("regex", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.INCLUDE_SYS_TABLES, new org.apache.thrift.meta_data.FieldMetaData("includeSysTables", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); @@ -31223,9 +31223,6 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (regex == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'regex' was not present! Struct: " + toString()); - } // alas, we cannot check 'includeSysTables' because it's a primitive and you chose the non-beans generator. // check for sub-struct validity } @@ -31325,17 +31322,27 @@ public class THBaseService { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getTableDescriptorsByPattern_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.regex); oprot.writeBool(struct.includeSysTables); + BitSet optionals = new BitSet(); + if (struct.isSetRegex()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRegex()) { + oprot.writeString(struct.regex); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getTableDescriptorsByPattern_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.regex = iprot.readString(); - struct.setRegexIsSet(true); struct.includeSysTables = iprot.readBool(); struct.setIncludeSysTablesIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.regex = iprot.readString(); + struct.setRegexIsSet(true); + } } } @@ -32845,7 +32852,7 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.REGEX, new org.apache.thrift.meta_data.FieldMetaData("regex", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.REGEX, new org.apache.thrift.meta_data.FieldMetaData("regex", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.INCLUDE_SYS_TABLES, new org.apache.thrift.meta_data.FieldMetaData("includeSysTables", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); @@ -33111,9 +33118,6 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (regex == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'regex' was not present! Struct: " + toString()); - } // alas, we cannot check 'includeSysTables' because it's a primitive and you chose the non-beans generator. // check for sub-struct validity } @@ -33213,17 +33217,27 @@ public class THBaseService { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getTableNamesByPattern_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.regex); oprot.writeBool(struct.includeSysTables); + BitSet optionals = new BitSet(); + if (struct.isSetRegex()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRegex()) { + oprot.writeString(struct.regex); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getTableNamesByPattern_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.regex = iprot.readString(); - struct.setRegexIsSet(true); struct.includeSysTables = iprot.readBool(); struct.setIncludeSysTablesIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.regex = iprot.readString(); + struct.setRegexIsSet(true); + } } } @@ -34733,7 +34747,7 @@ public class THBaseService { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DESC, new org.apache.thrift.meta_data.FieldMetaData("desc", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDescriptor.class))); - tmpMap.put(_Fields.SPLIT_KEYS, new org.apache.thrift.meta_data.FieldMetaData("splitKeys", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.SPLIT_KEYS, new org.apache.thrift.meta_data.FieldMetaData("splitKeys", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); metaDataMap = Collections.unmodifiableMap(tmpMap); @@ -35021,9 +35035,6 @@ public class THBaseService { if (desc == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'desc' was not present! Struct: " + toString()); } - if (splitKeys == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'splitKeys' was not present! Struct: " + toString()); - } // check for sub-struct validity if (desc != null) { desc.validate(); @@ -35141,11 +35152,18 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol prot, createTable_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; struct.desc.write(oprot); - { - oprot.writeI32(struct.splitKeys.size()); - for (ByteBuffer _iter322 : struct.splitKeys) + BitSet optionals = new BitSet(); + if (struct.isSetSplitKeys()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSplitKeys()) { { - oprot.writeBinary(_iter322); + oprot.writeI32(struct.splitKeys.size()); + for (ByteBuffer _iter322 : struct.splitKeys) + { + oprot.writeBinary(_iter322); + } } } } @@ -35156,17 +35174,20 @@ public class THBaseService { struct.desc = new TTableDescriptor(); struct.desc.read(iprot); struct.setDescIsSet(true); - { - org.apache.thrift.protocol.TList _list323 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.splitKeys = new ArrayList<ByteBuffer>(_list323.size); - ByteBuffer _elem324; - for (int _i325 = 0; _i325 < _list323.size; ++_i325) + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { { - _elem324 = iprot.readBinary(); - struct.splitKeys.add(_elem324); + org.apache.thrift.protocol.TList _list323 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.splitKeys = new ArrayList<ByteBuffer>(_list323.size); + ByteBuffer _elem324; + for (int _i325 = 0; _i325 < _list323.size; ++_i325) + { + _elem324 = iprot.readBinary(); + struct.splitKeys.add(_elem324); + } } + struct.setSplitKeysIsSet(true); } - struct.setSplitKeysIsSet(true); } } @@ -41194,7 +41215,7 @@ public class THBaseService { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); - tmpMap.put(_Fields.SPLIT_KEYS, new org.apache.thrift.meta_data.FieldMetaData("splitKeys", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.SPLIT_KEYS, new org.apache.thrift.meta_data.FieldMetaData("splitKeys", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); metaDataMap = Collections.unmodifiableMap(tmpMap); @@ -41482,9 +41503,6 @@ public class THBaseService { if (tableName == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString()); } - if (splitKeys == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'splitKeys' was not present! Struct: " + toString()); - } // check for sub-struct validity if (tableName != null) { tableName.validate(); @@ -41602,11 +41620,18 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol prot, isTableAvailableWithSplit_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; struct.tableName.write(oprot); - { - oprot.writeI32(struct.splitKeys.size()); - for (ByteBuffer _iter330 : struct.splitKeys) + BitSet optionals = new BitSet(); + if (struct.isSetSplitKeys()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSplitKeys()) { { - oprot.writeBinary(_iter330); + oprot.writeI32(struct.splitKeys.size()); + for (ByteBuffer _iter330 : struct.splitKeys) + { + oprot.writeBinary(_iter330); + } } } } @@ -41617,17 +41642,20 @@ public class THBaseService { struct.tableName = new TTableName(); struct.tableName.read(iprot); struct.setTableNameIsSet(true); - { - org.apache.thrift.protocol.TList _list331 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.splitKeys = new ArrayList<ByteBuffer>(_list331.size); - ByteBuffer _elem332; - for (int _i333 = 0; _i333 < _list331.size; ++_i333) + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { { - _elem332 = iprot.readBinary(); - struct.splitKeys.add(_elem332); + org.apache.thrift.protocol.TList _list331 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.splitKeys = new ArrayList<ByteBuffer>(_list331.size); + ByteBuffer _elem332; + for (int _i333 = 0; _i333 < _list331.size; ++_i333) + { + _elem332 = iprot.readBinary(); + struct.splitKeys.add(_elem332); + } } + struct.setSplitKeysIsSet(true); } - struct.setSplitKeysIsSet(true); } } http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java index b430d4d..f747648 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THRegionInfo._Fields>, java.io.Serializable, Cloneable, Comparable<THRegionInfo> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THRegionInfo"); http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java index f64951e..8263eb5 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocation, THRegionLocation._Fields>, java.io.Serializable, Cloneable, Comparable<THRegionLocation> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THRegionLocation"); http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java index ccb8514..86d2715 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java @@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory; * to the HBase master or a HBase region server. Also used to return * more general HBase error conditions. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class TIOError extends TException implements org.apache.thrift.TBase<TIOError, TIOError._Fields>, java.io.Serializable, Cloneable, Comparable<TIOError> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIOError"); http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java index 4436fc0..9a91392 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java @@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory; * A TIllegalArgument exception indicates an illegal or invalid * argument was passed into a procedure. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class TIllegalArgument extends TException implements org.apache.thrift.TBase<TIllegalArgument, TIllegalArgument._Fields>, java.io.Serializable, Cloneable, Comparable<TIllegalArgument> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIllegalArgument"); http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java index 70d8eab..6eaac68 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java @@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory; * by changing the durability. If you don't provide durability, it defaults to * column family's default setting for durability. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncrement._Fields>, java.io.Serializable, Cloneable, Comparable<TIncrement> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIncrement"); http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TNamespaceDescriptor.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TNamespaceDescriptor.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TNamespaceDescriptor.java index 1c0b41b..320e26d 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TNamespaceDescriptor.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TNamespaceDescriptor.java @@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory; * Thrift wrapper around * org.apache.hadoop.hbase.NamespaceDescriptor */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceDescriptor, TNamespaceDescriptor._Fields>, java.io.Serializable, Cloneable, Comparable<TNamespaceDescriptor> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TNamespaceDescriptor"); http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java index 5739d78..f277d1f 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java @@ -46,7 +46,7 @@ import org.slf4j.LoggerFactory; * by changing the durability. If you don't provide durability, it defaults to * column family's default setting for durability. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.io.Serializable, Cloneable, Comparable<TPut> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPut"); http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java index 3d40ea2..3e668f2 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java @@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory; /** * if no Result is found, row and columnValues will not be set. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields>, java.io.Serializable, Cloneable, Comparable<TResult> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TResult"); http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java index cc846f5..82c1ef7 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java @@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory; /** * A TRowMutations object is used to apply a number of Mutations to a single row. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRowMutations._Fields>, java.io.Serializable, Cloneable, Comparable<TRowMutations> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowMutations"); http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java index 99046cc..6284b4a 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java @@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory; * Any timestamps in the columns are ignored but the colFamTimeRangeMap included, use timeRange to select by timestamp. * Max versions defaults to 1. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, java.io.Serializable, Cloneable, Comparable<TScan> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TScan"); @@ -59,6 +59,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav private static final org.apache.thrift.protocol.TField LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("limit", org.apache.thrift.protocol.TType.I32, (short)15); private static final org.apache.thrift.protocol.TField CONSISTENCY_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency", org.apache.thrift.protocol.TType.I32, (short)16); private static final org.apache.thrift.protocol.TField TARGET_REPLICA_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("targetReplicaId", org.apache.thrift.protocol.TType.I32, (short)17); + private static final org.apache.thrift.protocol.TField FILTER_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("filterBytes", org.apache.thrift.protocol.TType.STRING, (short)18); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -91,6 +92,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav */ public TConsistency consistency; // optional public int targetReplicaId; // optional + public ByteBuffer filterBytes; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -118,7 +120,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav * @see TConsistency */ CONSISTENCY((short)16, "consistency"), - TARGET_REPLICA_ID((short)17, "targetReplicaId"); + TARGET_REPLICA_ID((short)17, "targetReplicaId"), + FILTER_BYTES((short)18, "filterBytes"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -167,6 +170,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav return CONSISTENCY; case 17: // TARGET_REPLICA_ID return TARGET_REPLICA_ID; + case 18: // FILTER_BYTES + return FILTER_BYTES; default: return null; } @@ -215,7 +220,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav private static final int __LIMIT_ISSET_ID = 5; private static final int __TARGETREPLICAID_ISSET_ID = 6; private byte __isset_bitfield = 0; - private static final _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,_Fields.AUTHORIZATIONS,_Fields.REVERSED,_Fields.CACHE_BLOCKS,_Fields.COL_FAM_TIME_RANGE_MAP,_Fields.READ_TYPE,_Fields.LIMIT,_Fields.CONSISTENCY,_Fields.TARGET_REPLICA_ID}; + private static final _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,_Fields.AUTHORIZATIONS,_Fields.REVERSED,_Fields.CACHE_BLOCKS,_Fields.COL_FAM_TIME_RANGE_MAP,_Fields.READ_TYPE,_Fields.LIMIT,_Fields.CONSISTENCY,_Fields.TARGET_REPLICA_ID,_Fields.FILTER_BYTES}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -258,6 +263,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TConsistency.class))); tmpMap.put(_Fields.TARGET_REPLICA_ID, new org.apache.thrift.meta_data.FieldMetaData("targetReplicaId", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.FILTER_BYTES, new org.apache.thrift.meta_data.FieldMetaData("filterBytes", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TScan.class, metaDataMap); } @@ -326,6 +333,9 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav this.consistency = other.consistency; } this.targetReplicaId = other.targetReplicaId; + if (other.isSetFilterBytes()) { + this.filterBytes = org.apache.thrift.TBaseHelper.copyBinary(other.filterBytes); + } } public TScan deepCopy() { @@ -358,6 +368,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav this.consistency = null; setTargetReplicaIdIsSet(false); this.targetReplicaId = 0; + this.filterBytes = null; } public byte[] getStartRow() { @@ -844,6 +855,40 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TARGETREPLICAID_ISSET_ID, value); } + public byte[] getFilterBytes() { + setFilterBytes(org.apache.thrift.TBaseHelper.rightSize(filterBytes)); + return filterBytes == null ? null : filterBytes.array(); + } + + public ByteBuffer bufferForFilterBytes() { + return org.apache.thrift.TBaseHelper.copyBinary(filterBytes); + } + + public TScan setFilterBytes(byte[] filterBytes) { + this.filterBytes = filterBytes == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(filterBytes, filterBytes.length)); + return this; + } + + public TScan setFilterBytes(ByteBuffer filterBytes) { + this.filterBytes = org.apache.thrift.TBaseHelper.copyBinary(filterBytes); + return this; + } + + public void unsetFilterBytes() { + this.filterBytes = null; + } + + /** Returns true if field filterBytes is set (has been assigned a value) and false otherwise */ + public boolean isSetFilterBytes() { + return this.filterBytes != null; + } + + public void setFilterBytesIsSet(boolean value) { + if (!value) { + this.filterBytes = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case START_ROW: @@ -982,6 +1027,14 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav } break; + case FILTER_BYTES: + if (value == null) { + unsetFilterBytes(); + } else { + setFilterBytes((ByteBuffer)value); + } + break; + } } @@ -1038,6 +1091,9 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav case TARGET_REPLICA_ID: return getTargetReplicaId(); + case FILTER_BYTES: + return getFilterBytes(); + } throw new IllegalStateException(); } @@ -1083,6 +1139,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav return isSetConsistency(); case TARGET_REPLICA_ID: return isSetTargetReplicaId(); + case FILTER_BYTES: + return isSetFilterBytes(); } throw new IllegalStateException(); } @@ -1253,6 +1311,15 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav return false; } + boolean this_present_filterBytes = true && this.isSetFilterBytes(); + boolean that_present_filterBytes = true && that.isSetFilterBytes(); + if (this_present_filterBytes || that_present_filterBytes) { + if (!(this_present_filterBytes && that_present_filterBytes)) + return false; + if (!this.filterBytes.equals(that.filterBytes)) + return false; + } + return true; } @@ -1345,6 +1412,11 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav if (present_targetReplicaId) list.add(targetReplicaId); + boolean present_filterBytes = true && (isSetFilterBytes()); + list.add(present_filterBytes); + if (present_filterBytes) + list.add(filterBytes); + return list.hashCode(); } @@ -1526,6 +1598,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav return lastComparison; } } + lastComparison = Boolean.valueOf(isSetFilterBytes()).compareTo(other.isSetFilterBytes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilterBytes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterBytes, other.filterBytes); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1687,6 +1769,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav sb.append(this.targetReplicaId); first = false; } + if (isSetFilterBytes()) { + if (!first) sb.append(", "); + sb.append("filterBytes:"); + if (this.filterBytes == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.filterBytes, sb); + } + first = false; + } sb.append(")"); return sb.toString(); } @@ -1912,6 +2004,14 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 18: // FILTER_BYTES + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.filterBytes = iprot.readBinary(); + struct.setFilterBytesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -2055,6 +2155,13 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav oprot.writeI32(struct.targetReplicaId); oprot.writeFieldEnd(); } + if (struct.filterBytes != null) { + if (struct.isSetFilterBytes()) { + oprot.writeFieldBegin(FILTER_BYTES_FIELD_DESC); + oprot.writeBinary(struct.filterBytes); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -2124,7 +2231,10 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav if (struct.isSetTargetReplicaId()) { optionals.set(16); } - oprot.writeBitSet(optionals, 17); + if (struct.isSetFilterBytes()) { + optionals.set(17); + } + oprot.writeBitSet(optionals, 18); if (struct.isSetStartRow()) { oprot.writeBinary(struct.startRow); } @@ -2196,12 +2306,15 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav if (struct.isSetTargetReplicaId()) { oprot.writeI32(struct.targetReplicaId); } + if (struct.isSetFilterBytes()) { + oprot.writeBinary(struct.filterBytes); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TScan struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(17); + BitSet incoming = iprot.readBitSet(18); if (incoming.get(0)) { struct.startRow = iprot.readBinary(); struct.setStartRowIsSet(true); @@ -2305,6 +2418,10 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav struct.targetReplicaId = iprot.readI32(); struct.setTargetReplicaIdIsSet(true); } + if (incoming.get(17)) { + struct.filterBytes = iprot.readBinary(); + struct.setFilterBytesIsSet(true); + } } } http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java index e7e0372..a19503b 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class TServerName implements org.apache.thrift.TBase<TServerName, TServerName._Fields>, java.io.Serializable, Cloneable, Comparable<TServerName> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TServerName"); http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java index 8e53bdf..288709e 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java @@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory; * Thrift wrapper around * org.apache.hadoop.hbase.client.TableDescriptor */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescriptor, TTableDescriptor._Fields>, java.io.Serializable, Cloneable, Comparable<TTableDescriptor> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTableDescriptor"); http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java index cec268a..21b0bff 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java @@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory; * Thrift wrapper around * org.apache.hadoop.hbase.TableName */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class TTableName implements org.apache.thrift.TBase<TTableName, TTableName._Fields>, java.io.Serializable, Cloneable, Comparable<TTableName> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTableName"); @@ -54,7 +54,7 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam /** * namespace name */ - public ByteBuffer ns; // required + public ByteBuffer ns; // optional /** * tablename */ @@ -128,10 +128,11 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam } // isset id assignments + private static final _Fields optionals[] = {_Fields.NS}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NS, new org.apache.thrift.meta_data.FieldMetaData("ns", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.NS, new org.apache.thrift.meta_data.FieldMetaData("ns", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); @@ -143,11 +144,9 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam } public TTableName( - ByteBuffer ns, ByteBuffer qualifier) { this(); - this.ns = org.apache.thrift.TBaseHelper.copyBinary(ns); this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); } @@ -400,13 +399,15 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam StringBuilder sb = new StringBuilder("TTableName("); boolean first = true; - sb.append("ns:"); - if (this.ns == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.ns, sb); + if (isSetNs()) { + sb.append("ns:"); + if (this.ns == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.ns, sb); + } + first = false; } - first = false; if (!first) sb.append(", "); sb.append("qualifier:"); if (this.qualifier == null) { @@ -421,9 +422,6 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam public void validate() throws org.apache.thrift.TException { // check for required fields - if (ns == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'ns' was not present! Struct: " + toString()); - } if (qualifier == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifier' was not present! Struct: " + toString()); } @@ -496,9 +494,11 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam oprot.writeStructBegin(STRUCT_DESC); if (struct.ns != null) { - oprot.writeFieldBegin(NS_FIELD_DESC); - oprot.writeBinary(struct.ns); - oprot.writeFieldEnd(); + if (struct.isSetNs()) { + oprot.writeFieldBegin(NS_FIELD_DESC); + oprot.writeBinary(struct.ns); + oprot.writeFieldEnd(); + } } if (struct.qualifier != null) { oprot.writeFieldBegin(QUALIFIER_FIELD_DESC); @@ -522,17 +522,27 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam @Override public void write(org.apache.thrift.protocol.TProtocol prot, TTableName struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.ns); oprot.writeBinary(struct.qualifier); + BitSet optionals = new BitSet(); + if (struct.isSetNs()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetNs()) { + oprot.writeBinary(struct.ns); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TTableName struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.ns = iprot.readBinary(); - struct.setNsIsSet(true); struct.qualifier = iprot.readBinary(); struct.setQualifierIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.ns = iprot.readBinary(); + struct.setNsIsSet(true); + } } } http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java index 8ab746c..fe2ef49 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03") public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRange._Fields>, java.io.Serializable, Cloneable, Comparable<TTimeRange> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTimeRange"); http://git-wip-us.apache.org/repos/asf/hbase/blob/f053003c/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift ---------------------------------------------------------------------- diff --git a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift index c1b94ef..ef2dae5 100644 --- a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift +++ b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift @@ -146,6 +146,7 @@ struct TGet { 12: optional i32 storeLimit 13: optional i32 storeOffset 14: optional bool existence_only + 15: optional binary filterBytes } @@ -262,6 +263,8 @@ struct TScan { 15: optional i32 limit 16: optional TConsistency consistency 17: optional i32 targetReplicaId + 18: optional binary filterBytes + } /** @@ -402,7 +405,7 @@ enum TKeepDeletedCells { */ struct TTableName { /** namespace name */ - 1: required binary ns + 1: optional binary ns /** tablename */ 2: required binary qualifier } @@ -828,7 +831,7 @@ service THBaseService { **/ list<TTableDescriptor> getTableDescriptorsByPattern( /** The regular expression to match against */ - 1: required string regex + 1: optional string regex /** set to false if match only against userspace tables */ 2: required bool includeSysTables ) throws (1: TIOError io) @@ -848,7 +851,7 @@ service THBaseService { **/ list<TTableName> getTableNamesByPattern( /** The regular expression to match against */ - 1: required string regex + 1: optional string regex /** set to false if match only against userspace tables */ 2: required bool includeSysTables ) throws (1: TIOError io) @@ -871,7 +874,7 @@ service THBaseService { /** table descriptor for table */ 1: required TTableDescriptor desc /** rray of split keys for the initial regions of the table */ - 2: required list<binary> splitKeys + 2: optional list<binary> splitKeys ) throws (1: TIOError io) /** @@ -946,7 +949,7 @@ service THBaseService { /** the tablename to check */ 1: required TTableName tableName /** keys to check if the table has been created with all split keys */ - 2: required list<binary> splitKeys + 2: optional list<binary> splitKeys ) throws (1: TIOError io) /**