diff --git hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java index 26a2c1b..2e4249d 100644 --- hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java +++ hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java @@ -23,6 +23,7 @@ import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.KeyValueUtil; import org.apache.hadoop.hbase.client.*; +import org.apache.hadoop.hbase.filter.ParseFilter; import org.apache.hadoop.hbase.thrift2.generated.*; import java.io.IOException; @@ -73,6 +74,12 @@ public class ThriftUtilities { } } + if (in.isSetFilterString()) { + ParseFilter parseFilter = new ParseFilter(); + out.setFilter( + parseFilter.parseFilterString(in.getFilterString())); + } + return out; } @@ -308,6 +315,16 @@ public class ThriftUtilities { } } + if (in.isSetBatchSize()) { + out.setBatch(in.getBatchSize()); + } + + if (in.isSetFilterString()) { + ParseFilter parseFilter = new ParseFilter(); + out.setFilter( + parseFilter.parseFilterString(in.getFilterString())); + } + TTimeRange timeRange = in.getTimeRange(); if (timeRange != null && timeRange.isSetMinStamp() && timeRange.isSetMaxStamp()) { diff --git hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java index c0bb53d..bf73563 100644 --- hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java +++ hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java @@ -53,6 +53,7 @@ public class TGet implements org.apache.thrift.TBase, java.i 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 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 FILTER_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("filterString", org.apache.thrift.protocol.TType.STRING, (short)6); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -65,6 +66,7 @@ public class TGet implements org.apache.thrift.TBase, java.i public long timestamp; // optional public TTimeRange timeRange; // optional public int maxVersions; // optional + public ByteBuffer filterString; // 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 { @@ -72,7 +74,8 @@ public class TGet implements org.apache.thrift.TBase, java.i COLUMNS((short)2, "columns"), TIMESTAMP((short)3, "timestamp"), TIME_RANGE((short)4, "timeRange"), - MAX_VERSIONS((short)5, "maxVersions"); + MAX_VERSIONS((short)5, "maxVersions"), + FILTER_STRING((short)6, "filterString"); private static final Map byName = new HashMap(); @@ -97,6 +100,8 @@ public class TGet implements org.apache.thrift.TBase, java.i return TIME_RANGE; case 5: // MAX_VERSIONS return MAX_VERSIONS; + case 7: // FILTER_STRING + return FILTER_STRING; default: return null; } @@ -155,6 +160,8 @@ public class TGet implements org.apache.thrift.TBase, java.i new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTimeRange.class))); tmpMap.put(_Fields.MAX_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("maxVersions", org.apache.thrift.TFieldRequirementType.OPTIONAL, 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGet.class, metaDataMap); } @@ -189,6 +196,9 @@ public class TGet implements org.apache.thrift.TBase, java.i if (other.isSetTimeRange()) { this.timeRange = new TTimeRange(other.timeRange); } + if (other.isSetFilterString()) { + this.filterString = other.filterString; + } this.maxVersions = other.maxVersions; } @@ -204,6 +214,7 @@ public class TGet implements org.apache.thrift.TBase, java.i this.timestamp = 0; this.timeRange = null; setMaxVersionsIsSet(false); + this.filterString = null; this.maxVersions = 0; } @@ -327,6 +338,40 @@ public class TGet implements org.apache.thrift.TBase, java.i } } + public byte[] getFilterString() { + setFilterString(org.apache.thrift.TBaseHelper.rightSize(filterString)); + return filterString == null ? null : filterString.array(); + } + + public ByteBuffer bufferForFilterString() { + return filterString; + } + + public TGet setFilterString(byte[] filterString) { + setFilterString(filterString == null ? (ByteBuffer)null : ByteBuffer.wrap(filterString)); + return this; + } + + public TGet setFilterString(ByteBuffer filterString) { + this.filterString = filterString; + return this; + } + + public void unsetFilterString() { + this.filterString = null; + } + + /** Returns true if field filterString is set (has been assigned a value) and false otherwise */ + public boolean isSetFilterString() { + return this.filterString != null; + } + + public void setFilterStringIsSet(boolean value) { + if (!value) { + this.filterString = null; + } + } + public int getMaxVersions() { return this.maxVersions; } @@ -392,6 +437,13 @@ public class TGet implements org.apache.thrift.TBase, java.i } break; + case FILTER_STRING: + if (value == null) { + unsetFilterString(); + } else { + setFilterString((ByteBuffer)value); + } + break; } } @@ -412,6 +464,9 @@ public class TGet implements org.apache.thrift.TBase, java.i case MAX_VERSIONS: return Integer.valueOf(getMaxVersions()); + case FILTER_STRING: + return getFilterString(); + } throw new IllegalStateException(); } @@ -433,6 +488,8 @@ public class TGet implements org.apache.thrift.TBase, java.i return isSetTimeRange(); case MAX_VERSIONS: return isSetMaxVersions(); + case FILTER_STRING: + return isSetFilterString(); } throw new IllegalStateException(); } @@ -494,6 +551,14 @@ public class TGet implements org.apache.thrift.TBase, java.i if (this.maxVersions != that.maxVersions) return false; } + boolean this_present_filterString = true && this.isSetFilterString(); + boolean that_present_filterString = true && that.isSetFilterString(); + if (this_present_filterString || that_present_filterString) { + if (!(this_present_filterString && that_present_filterString)) + return false; + if (!this.filterString.equals(that.filterString)) + return false; + } return true; } @@ -561,6 +626,16 @@ public class TGet implements org.apache.thrift.TBase, java.i return lastComparison; } } + lastComparison = Boolean.valueOf(isSetFilterString()).compareTo(typedOther.isSetFilterString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilterString()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, typedOther.filterString); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -620,6 +695,16 @@ public class TGet implements org.apache.thrift.TBase, java.i sb.append(this.maxVersions); first = false; } + if (isSetFilterString()) { + if (!first) sb.append(", "); + sb.append("filterString:"); + if (this.filterString == null) { + sb.append("null"); + } else { + sb.append(this.filterString); + } + first = false; + } sb.append(")"); return sb.toString(); } @@ -723,6 +808,14 @@ public class TGet implements org.apache.thrift.TBase, java.i org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 6: // FILTER_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.filterString = iprot.readBinary(); + struct.setFilterStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -774,6 +867,13 @@ public class TGet implements org.apache.thrift.TBase, java.i oprot.writeI32(struct.maxVersions); oprot.writeFieldEnd(); } + if (struct.filterString != null) { + if (struct.isSetFilterString()) { + oprot.writeFieldBegin(FILTER_STRING_FIELD_DESC); + oprot.writeBinary(struct.filterString); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -805,7 +905,10 @@ public class TGet implements org.apache.thrift.TBase, java.i if (struct.isSetMaxVersions()) { optionals.set(3); } - oprot.writeBitSet(optionals, 4); + if (struct.isSetFilterString()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); if (struct.isSetColumns()) { { oprot.writeI32(struct.columns.size()); @@ -831,7 +934,7 @@ public class TGet implements org.apache.thrift.TBase, java.i TTupleProtocol iprot = (TTupleProtocol) prot; struct.row = iprot.readBinary(); struct.setRowIsSet(true); - BitSet incoming = iprot.readBitSet(4); + BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); @@ -859,6 +962,10 @@ public class TGet implements org.apache.thrift.TBase, java.i struct.maxVersions = iprot.readI32(); struct.setMaxVersionsIsSet(true); } + if (incoming.get(4)) { + struct.filterString = iprot.readBinary(); + struct.setFilterStringIsSet(true); + } } } diff --git hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java index df9ab59..fc04177 100644 --- hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java +++ hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java @@ -43,6 +43,8 @@ public class TScan implements org.apache.thrift.TBase, jav private static final org.apache.thrift.protocol.TField CACHING_FIELD_DESC = new org.apache.thrift.protocol.TField("caching", org.apache.thrift.protocol.TType.I32, (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 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 BATCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("batchSize", org.apache.thrift.protocol.TType.I32, (short)8); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -55,7 +57,9 @@ public class TScan implements org.apache.thrift.TBase, jav public List columns; // optional public int caching; // optional public int maxVersions; // optional + public ByteBuffer filterString; // optional public TTimeRange timeRange; // optional + public int batchSize; // 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 { @@ -64,7 +68,9 @@ public class TScan implements org.apache.thrift.TBase, jav COLUMNS((short)3, "columns"), CACHING((short)4, "caching"), MAX_VERSIONS((short)5, "maxVersions"), - TIME_RANGE((short)6, "timeRange"); + TIME_RANGE((short)6, "timeRange"), + FILTER_STRING((short)7, "filterString"), + BATCH_SIZE((short)8, "batchSize"); private static final Map byName = new HashMap(); @@ -91,6 +97,10 @@ public class TScan implements org.apache.thrift.TBase, jav return MAX_VERSIONS; case 6: // TIME_RANGE return TIME_RANGE; + case 7: // FILTER_STRING + return FILTER_STRING; + case 8: // BATCH_SIZE + return BATCH_SIZE; default: return null; } @@ -133,6 +143,7 @@ public class TScan implements org.apache.thrift.TBase, jav // isset id assignments private static final int __CACHING_ISSET_ID = 0; private static final int __MAXVERSIONS_ISSET_ID = 1; + private static final int __BATCHSIZE_ISSET_ID = 2; private byte __isset_bitfield = 0; private _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.COLUMNS,_Fields.CACHING,_Fields.MAX_VERSIONS,_Fields.TIME_RANGE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; @@ -151,6 +162,11 @@ public class TScan implements org.apache.thrift.TBase, jav new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TIME_RANGE, new org.apache.thrift.meta_data.FieldMetaData("timeRange", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTimeRange.class))); + 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 , "Text"))); + 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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TScan.class, metaDataMap); } @@ -185,6 +201,10 @@ public class TScan implements org.apache.thrift.TBase, jav if (other.isSetTimeRange()) { this.timeRange = new TTimeRange(other.timeRange); } + if (other.isSetFilterString()) { + this.filterString = other.filterString; + } + this.batchSize = other.batchSize; } public TScan deepCopy() { @@ -199,7 +219,9 @@ public class TScan implements org.apache.thrift.TBase, jav setCachingIsSet(false); this.caching = 0; this.maxVersions = 1; - + this.filterString = null; + setBatchSizeIsSet(false); + this.batchSize = 0; this.timeRange = null; } @@ -333,6 +355,61 @@ public class TScan implements org.apache.thrift.TBase, jav __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHING_ISSET_ID, value); } + public byte[] getFilterString() { + setFilterString(org.apache.thrift.TBaseHelper.rightSize(filterString)); + return filterString == null ? null : filterString.array(); + } + + public ByteBuffer bufferForFilterString() { + return filterString; + } + + public TScan setFilterString(byte[] filterString) { + setFilterString(filterString == null ? (ByteBuffer)null : ByteBuffer.wrap(filterString)); + return this; + } + + public TScan setFilterString(ByteBuffer filterString) { + this.filterString = filterString; + return this; + } + + public void unsetFilterString() { + this.filterString = null; + } + + /** Returns true if field filterString is set (has been assigned a value) and false otherwise */ + public boolean isSetFilterString() { + return this.filterString != null; + } + + public void setFilterStringIsSet(boolean value) { + if (!value) { + this.filterString = null; + } + } + public int getBatchSize() { + return this.batchSize; + } + + public TScan setBatchSize(int batchSize) { + this.batchSize = batchSize; + setBatchSizeIsSet(true); + return this; + } + + public void unsetBatchSize() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BATCHSIZE_ISSET_ID); + } + + /** Returns true if field batchSize is set (has been assigned a value) and false otherwise */ + public boolean isSetBatchSize() { + return EncodingUtils.testBit(__isset_bitfield, __BATCHSIZE_ISSET_ID); + } + + public void setBatchSizeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BATCHSIZE_ISSET_ID, value); + } public int getMaxVersions() { return this.maxVersions; } @@ -422,6 +499,14 @@ public class TScan implements org.apache.thrift.TBase, jav } break; + case FILTER_STRING: + if (value == null) { + unsetFilterString(); + } else { + setFilterString((ByteBuffer)value); + } + break; + case TIME_RANGE: if (value == null) { unsetTimeRange(); @@ -430,6 +515,13 @@ public class TScan implements org.apache.thrift.TBase, jav } break; + case BATCH_SIZE: + if (value == null) { + unsetBatchSize(); + } else { + setBatchSize((Integer)value); + } + break; } } @@ -450,9 +542,15 @@ public class TScan implements org.apache.thrift.TBase, jav case MAX_VERSIONS: return Integer.valueOf(getMaxVersions()); + case FILTER_STRING: + return getFilterString(); + case TIME_RANGE: return getTimeRange(); + case BATCH_SIZE: + return Integer.valueOf(getBatchSize()); + } throw new IllegalStateException(); } @@ -474,8 +572,12 @@ public class TScan implements org.apache.thrift.TBase, jav return isSetCaching(); case MAX_VERSIONS: return isSetMaxVersions(); + case FILTER_STRING: + return isSetFilterString(); case TIME_RANGE: return isSetTimeRange(); + case BATCH_SIZE: + return isSetBatchSize(); } throw new IllegalStateException(); } @@ -538,6 +640,15 @@ public class TScan implements org.apache.thrift.TBase, jav return false; } + boolean this_present_filterString = true && this.isSetFilterString(); + boolean that_present_filterString = true && that.isSetFilterString(); + if (this_present_filterString || that_present_filterString) { + if (!(this_present_filterString && that_present_filterString)) + return false; + if (!this.filterString.equals(that.filterString)) + return false; + } + boolean this_present_timeRange = true && this.isSetTimeRange(); boolean that_present_timeRange = true && that.isSetTimeRange(); if (this_present_timeRange || that_present_timeRange) { @@ -547,6 +658,15 @@ public class TScan implements org.apache.thrift.TBase, jav return false; } + boolean this_present_batchSize = true && this.isSetBatchSize(); + boolean that_present_batchSize = true && that.isSetBatchSize(); + if (this_present_batchSize || that_present_batchSize) { + if (!(this_present_batchSize && that_present_batchSize)) + return false; + if (this.batchSize != that.batchSize) + return false; + } + return true; } @@ -613,6 +733,16 @@ public class TScan implements org.apache.thrift.TBase, jav return lastComparison; } } + lastComparison = Boolean.valueOf(isSetFilterString()).compareTo(typedOther.isSetFilterString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilterString()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, typedOther.filterString); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetTimeRange()).compareTo(typedOther.isSetTimeRange()); if (lastComparison != 0) { return lastComparison; @@ -623,6 +753,16 @@ public class TScan implements org.apache.thrift.TBase, jav return lastComparison; } } + lastComparison = Boolean.valueOf(isSetBatchSize()).compareTo(typedOther.isSetBatchSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBatchSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batchSize, typedOther.batchSize); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -684,6 +824,16 @@ public class TScan implements org.apache.thrift.TBase, jav sb.append(this.maxVersions); first = false; } + if (isSetFilterString()) { + if (!first) sb.append(", "); + sb.append("filterString:"); + if (this.filterString == null) { + sb.append("null"); + } else { + sb.append(this.filterString); + } + first = false; + } if (isSetTimeRange()) { if (!first) sb.append(", "); sb.append("timeRange:"); @@ -694,6 +844,12 @@ public class TScan implements org.apache.thrift.TBase, jav } first = false; } + if (isSetBatchSize()) { + if (!first) sb.append(", "); + sb.append("batchSize:"); + sb.append(this.batchSize); + first = false; + } sb.append(")"); return sb.toString(); } @@ -802,6 +958,22 @@ public class TScan implements org.apache.thrift.TBase, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 7: // FILTER_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.filterString = iprot.readBinary(); + struct.setFilterStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // BATCH_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.batchSize = iprot.readI32(); + struct.setBatchSizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -855,6 +1027,13 @@ public class TScan implements org.apache.thrift.TBase, jav oprot.writeI32(struct.maxVersions); oprot.writeFieldEnd(); } + if (struct.filterString != null) { + if (struct.isSetFilterString()) { + oprot.writeFieldBegin(FILTER_STRING_FIELD_DESC); + oprot.writeBinary(struct.filterString); + oprot.writeFieldEnd(); + } + } if (struct.timeRange != null) { if (struct.isSetTimeRange()) { oprot.writeFieldBegin(TIME_RANGE_FIELD_DESC); @@ -862,6 +1041,11 @@ public class TScan implements org.apache.thrift.TBase, jav oprot.writeFieldEnd(); } } + if (struct.isSetBatchSize()) { + oprot.writeFieldBegin(BATCH_SIZE_FIELD_DESC); + oprot.writeI32(struct.batchSize); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -898,7 +1082,13 @@ public class TScan implements org.apache.thrift.TBase, jav if (struct.isSetTimeRange()) { optionals.set(5); } - oprot.writeBitSet(optionals, 6); + if (struct.isSetFilterString()) { + optionals.set(6); + } + if (struct.isSetBatchSize()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); if (struct.isSetStartRow()) { oprot.writeBinary(struct.startRow); } @@ -923,12 +1113,15 @@ public class TScan implements org.apache.thrift.TBase, jav if (struct.isSetTimeRange()) { struct.timeRange.write(oprot); } + if (struct.isSetBatchSize()) { + oprot.writeI32(struct.batchSize); + } } @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(6); + BitSet incoming = iprot.readBitSet(8); if (incoming.get(0)) { struct.startRow = iprot.readBinary(); struct.setStartRowIsSet(true); @@ -964,6 +1157,14 @@ public class TScan implements org.apache.thrift.TBase, jav struct.timeRange.read(iprot); struct.setTimeRangeIsSet(true); } + if (incoming.get(6)) { + struct.filterString = iprot.readBinary(); + struct.setFilterStringIsSet(true); + } + if (incoming.get(7)) { + struct.batchSize = iprot.readI32(); + struct.setBatchSizeIsSet(true); + } } } diff --git hbase-server/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift hbase-server/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift index 8357e67..d1e2654 100644 --- hbase-server/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift +++ hbase-server/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift @@ -24,6 +24,8 @@ namespace rb Apache.Hadoop.Hbase.Thrift2 namespace py hbase namespace perl Hbase +typedef binary Text + struct TTimeRange { 1: required i64 minStamp, 2: required i64 maxStamp @@ -100,6 +102,7 @@ struct TGet { 4: optional TTimeRange timeRange, 5: optional i32 maxVersions, + 6: optional Text filterString } /** @@ -174,6 +177,8 @@ struct TScan { 4: optional i32 caching, 5: optional i32 maxVersions=1, 6: optional TTimeRange timeRange, + 7: optional Text filterString, + 8: optional i32 batchSize } //