You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by mb...@apache.org on 2012/09/19 03:52:58 UTC
svn commit: r1387433 [2/3] - in /hbase/branches/0.89-fb/src/main:
java/org/apache/hadoop/hbase/ipc/ java/org/apache/hadoop/hbase/regionserver/
java/org/apache/hadoop/hbase/thrift/
java/org/apache/hadoop/hbase/thrift/generated/ resources/org/apache/hado...
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java?rev=1387433&r1=1387432&r2=1387433&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java Wed Sep 19 01:52:58 2012
@@ -186,6 +186,15 @@ public class Hbase {
public void enableTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException;
/**
+ * Flush the given region if lastFlushTime < ifOlderThanTS. Only supported
+ * in the Thrift server embedded in the regionserver.
+ *
+ * @param regionName
+ * @param ifOlderThanTS
+ */
+ public void flushRegion(ByteBuffer regionName, long ifOlderThanTS) throws IOError, org.apache.thrift.TException;
+
+ /**
* Get a single TCell for the specified table, row, and column at the
* latest timestamp. Returns an empty list if no such value exists.
*
@@ -211,6 +220,22 @@ public class Hbase {
public Map<ByteBuffer,ColumnDescriptor> getColumnDescriptors(ByteBuffer tableName) throws IOError, org.apache.thrift.TException;
/**
+ * Gets last flush time (in milliseconds) for all regions on the server.
+ * Only supported in the Thrift server embedded in the regionserver.
+ *
+ * @return a map of regionName to the last flush time for the region
+ */
+ public Map<ByteBuffer,Long> getLastFlushTimes() throws org.apache.thrift.TException;
+
+ /**
+ * Gets the current time (in milliseconds) at the region server. Only
+ * supported in the Thrift server embedded in the regionserver.
+ *
+ * @return time in milliseconds at the regionserver.
+ */
+ public long getCurrentTimeMillis() throws org.apache.thrift.TException;
+
+ /**
* Get the regininfo for the specified row. It scans
* the metatable to find region's start and end keys.
*
@@ -816,10 +841,16 @@ public class Hbase {
public void enableTable(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.enableTable_call> resultHandler) throws org.apache.thrift.TException;
+ public void flushRegion(ByteBuffer regionName, long ifOlderThanTS, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.flushRegion_call> resultHandler) throws org.apache.thrift.TException;
+
public void get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, ByteBuffer regionName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.get_call> resultHandler) throws org.apache.thrift.TException;
public void getColumnDescriptors(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getColumnDescriptors_call> resultHandler) throws org.apache.thrift.TException;
+ public void getLastFlushTimes(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getLastFlushTimes_call> resultHandler) throws org.apache.thrift.TException;
+
+ public void getCurrentTimeMillis(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCurrentTimeMillis_call> resultHandler) throws org.apache.thrift.TException;
+
public void getRegionInfo(ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRegionInfo_call> resultHandler) throws org.apache.thrift.TException;
public void getRow(ByteBuffer tableName, ByteBuffer row, ByteBuffer regionName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRow_call> resultHandler) throws org.apache.thrift.TException;
@@ -1244,6 +1275,30 @@ public class Hbase {
return;
}
+ public void flushRegion(ByteBuffer regionName, long ifOlderThanTS) throws IOError, org.apache.thrift.TException
+ {
+ send_flushRegion(regionName, ifOlderThanTS);
+ recv_flushRegion();
+ }
+
+ public void send_flushRegion(ByteBuffer regionName, long ifOlderThanTS) throws org.apache.thrift.TException
+ {
+ flushRegion_args args = new flushRegion_args();
+ args.setRegionName(regionName);
+ args.setIfOlderThanTS(ifOlderThanTS);
+ sendBase("flushRegion", args);
+ }
+
+ public void recv_flushRegion() throws IOError, org.apache.thrift.TException
+ {
+ flushRegion_result result = new flushRegion_result();
+ receiveBase(result, "flushRegion");
+ if (result.io != null) {
+ throw result.io;
+ }
+ return;
+ }
+
public List<TCell> get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, ByteBuffer regionName) throws IOError, org.apache.thrift.TException
{
send_get(tableName, row, column, regionName);
@@ -1299,6 +1354,50 @@ public class Hbase {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getColumnDescriptors failed: unknown result");
}
+ public Map<ByteBuffer,Long> getLastFlushTimes() throws org.apache.thrift.TException
+ {
+ send_getLastFlushTimes();
+ return recv_getLastFlushTimes();
+ }
+
+ public void send_getLastFlushTimes() throws org.apache.thrift.TException
+ {
+ getLastFlushTimes_args args = new getLastFlushTimes_args();
+ sendBase("getLastFlushTimes", args);
+ }
+
+ public Map<ByteBuffer,Long> recv_getLastFlushTimes() throws org.apache.thrift.TException
+ {
+ getLastFlushTimes_result result = new getLastFlushTimes_result();
+ receiveBase(result, "getLastFlushTimes");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLastFlushTimes failed: unknown result");
+ }
+
+ public long getCurrentTimeMillis() throws org.apache.thrift.TException
+ {
+ send_getCurrentTimeMillis();
+ return recv_getCurrentTimeMillis();
+ }
+
+ public void send_getCurrentTimeMillis() throws org.apache.thrift.TException
+ {
+ getCurrentTimeMillis_args args = new getCurrentTimeMillis_args();
+ sendBase("getCurrentTimeMillis", args);
+ }
+
+ public long recv_getCurrentTimeMillis() throws org.apache.thrift.TException
+ {
+ getCurrentTimeMillis_result result = new getCurrentTimeMillis_result();
+ receiveBase(result, "getCurrentTimeMillis");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCurrentTimeMillis failed: unknown result");
+ }
+
public TRegionInfo getRegionInfo(ByteBuffer row) throws IOError, org.apache.thrift.TException
{
send_getRegionInfo(row);
@@ -2808,6 +2907,41 @@ public class Hbase {
}
}
+ public void flushRegion(ByteBuffer regionName, long ifOlderThanTS, org.apache.thrift.async.AsyncMethodCallback<flushRegion_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ flushRegion_call method_call = new flushRegion_call(regionName, ifOlderThanTS, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class flushRegion_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private ByteBuffer regionName;
+ private long ifOlderThanTS;
+ public flushRegion_call(ByteBuffer regionName, long ifOlderThanTS, org.apache.thrift.async.AsyncMethodCallback<flushRegion_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.regionName = regionName;
+ this.ifOlderThanTS = ifOlderThanTS;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("flushRegion", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ flushRegion_args args = new flushRegion_args();
+ args.setRegionName(regionName);
+ args.setIfOlderThanTS(ifOlderThanTS);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws IOError, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_flushRegion();
+ }
+ }
+
public void get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, ByteBuffer regionName, org.apache.thrift.async.AsyncMethodCallback<get_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
get_call method_call = new get_call(tableName, row, column, regionName, resultHandler, this, ___protocolFactory, ___transport);
@@ -2881,6 +3015,64 @@ public class Hbase {
}
}
+ public void getLastFlushTimes(org.apache.thrift.async.AsyncMethodCallback<getLastFlushTimes_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getLastFlushTimes_call method_call = new getLastFlushTimes_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getLastFlushTimes_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getLastFlushTimes_call(org.apache.thrift.async.AsyncMethodCallback<getLastFlushTimes_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLastFlushTimes", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getLastFlushTimes_args args = new getLastFlushTimes_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Map<ByteBuffer,Long> getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getLastFlushTimes();
+ }
+ }
+
+ public void getCurrentTimeMillis(org.apache.thrift.async.AsyncMethodCallback<getCurrentTimeMillis_call> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getCurrentTimeMillis_call method_call = new getCurrentTimeMillis_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getCurrentTimeMillis_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getCurrentTimeMillis_call(org.apache.thrift.async.AsyncMethodCallback<getCurrentTimeMillis_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCurrentTimeMillis", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getCurrentTimeMillis_args args = new getCurrentTimeMillis_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public long getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getCurrentTimeMillis();
+ }
+ }
+
public void getRegionInfo(ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback<getRegionInfo_call> resultHandler) throws org.apache.thrift.TException {
checkReady();
getRegionInfo_call method_call = new getRegionInfo_call(row, resultHandler, this, ___protocolFactory, ___transport);
@@ -4346,8 +4538,11 @@ public class Hbase {
processMap.put("deleteTable", new deleteTable());
processMap.put("disableTable", new disableTable());
processMap.put("enableTable", new enableTable());
+ processMap.put("flushRegion", new flushRegion());
processMap.put("get", new get());
processMap.put("getColumnDescriptors", new getColumnDescriptors());
+ processMap.put("getLastFlushTimes", new getLastFlushTimes());
+ processMap.put("getCurrentTimeMillis", new getCurrentTimeMillis());
processMap.put("getRegionInfo", new getRegionInfo());
processMap.put("getRow", new getRow());
processMap.put("getRowTs", new getRowTs());
@@ -4641,6 +4836,26 @@ public class Hbase {
}
}
+ private static class flushRegion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, flushRegion_args> {
+ public flushRegion() {
+ super("flushRegion");
+ }
+
+ protected flushRegion_args getEmptyArgsInstance() {
+ return new flushRegion_args();
+ }
+
+ protected flushRegion_result getResult(I iface, flushRegion_args args) throws org.apache.thrift.TException {
+ flushRegion_result result = new flushRegion_result();
+ try {
+ iface.flushRegion(args.regionName, args.ifOlderThanTS);
+ } catch (IOError io) {
+ result.io = io;
+ }
+ return result;
+ }
+ }
+
private static class get<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_args> {
public get() {
super("get");
@@ -4681,6 +4896,39 @@ public class Hbase {
}
}
+ private static class getLastFlushTimes<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLastFlushTimes_args> {
+ public getLastFlushTimes() {
+ super("getLastFlushTimes");
+ }
+
+ protected getLastFlushTimes_args getEmptyArgsInstance() {
+ return new getLastFlushTimes_args();
+ }
+
+ protected getLastFlushTimes_result getResult(I iface, getLastFlushTimes_args args) throws org.apache.thrift.TException {
+ getLastFlushTimes_result result = new getLastFlushTimes_result();
+ result.success = iface.getLastFlushTimes();
+ return result;
+ }
+ }
+
+ private static class getCurrentTimeMillis<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCurrentTimeMillis_args> {
+ public getCurrentTimeMillis() {
+ super("getCurrentTimeMillis");
+ }
+
+ protected getCurrentTimeMillis_args getEmptyArgsInstance() {
+ return new getCurrentTimeMillis_args();
+ }
+
+ protected getCurrentTimeMillis_result getResult(I iface, getCurrentTimeMillis_args args) throws org.apache.thrift.TException {
+ getCurrentTimeMillis_result result = new getCurrentTimeMillis_result();
+ result.success = iface.getCurrentTimeMillis();
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
private static class getRegionInfo<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRegionInfo_args> {
public getRegionInfo() {
super("getRegionInfo");
@@ -18560,49 +18808,25 @@ public class Hbase {
}
- public static class get_args implements org.apache.thrift.TBase<get_args, get_args._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_args");
+ public static class flushRegion_args implements org.apache.thrift.TBase<flushRegion_args, flushRegion_args._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("flushRegion_args");
- private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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)2);
- private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField REGION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("regionName", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField REGION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("regionName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField IF_OLDER_THAN_TS_FIELD_DESC = new org.apache.thrift.protocol.TField("ifOlderThanTS", org.apache.thrift.protocol.TType.I64, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
- schemes.put(StandardScheme.class, new get_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new get_argsTupleSchemeFactory());
+ schemes.put(StandardScheme.class, new flushRegion_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new flushRegion_argsTupleSchemeFactory());
}
- /**
- * name of table
- */
- public ByteBuffer tableName; // required
- /**
- * row key
- */
- public ByteBuffer row; // required
- /**
- * column name
- */
- public ByteBuffer column; // required
public ByteBuffer regionName; // required
+ public long ifOlderThanTS; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- /**
- * name of table
- */
- TABLE_NAME((short)1, "tableName"),
- /**
- * row key
- */
- ROW((short)2, "row"),
- /**
- * column name
- */
- COLUMN((short)3, "column"),
- REGION_NAME((short)4, "regionName");
+ REGION_NAME((short)1, "regionName"),
+ IF_OLDER_THAN_TS((short)2, "ifOlderThanTS");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -18617,14 +18841,10 @@ public class Hbase {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // TABLE_NAME
- return TABLE_NAME;
- case 2: // ROW
- return ROW;
- case 3: // COLUMN
- return COLUMN;
- case 4: // REGION_NAME
+ case 1: // REGION_NAME
return REGION_NAME;
+ case 2: // IF_OLDER_THAN_TS
+ return IF_OLDER_THAN_TS;
default:
return null;
}
@@ -18665,185 +18885,53 @@ public class Hbase {
}
// isset id assignments
+ private static final int __IFOLDERTHANTS_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
- tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
- tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.REGION_NAME, new org.apache.thrift.meta_data.FieldMetaData("regionName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
+ tmpMap.put(_Fields.IF_OLDER_THAN_TS, new org.apache.thrift.meta_data.FieldMetaData("ifOlderThanTS", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(flushRegion_args.class, metaDataMap);
}
- public get_args() {
+ public flushRegion_args() {
}
- public get_args(
- ByteBuffer tableName,
- ByteBuffer row,
- ByteBuffer column,
- ByteBuffer regionName)
+ public flushRegion_args(
+ ByteBuffer regionName,
+ long ifOlderThanTS)
{
this();
- this.tableName = tableName;
- this.row = row;
- this.column = column;
this.regionName = regionName;
+ this.ifOlderThanTS = ifOlderThanTS;
+ setIfOlderThanTSIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
- public get_args(get_args other) {
- if (other.isSetTableName()) {
- this.tableName = other.tableName;
- }
- if (other.isSetRow()) {
- this.row = other.row;
- }
- if (other.isSetColumn()) {
- this.column = other.column;
- }
+ public flushRegion_args(flushRegion_args other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetRegionName()) {
this.regionName = other.regionName;
}
+ this.ifOlderThanTS = other.ifOlderThanTS;
}
- public get_args deepCopy() {
- return new get_args(this);
+ public flushRegion_args deepCopy() {
+ return new flushRegion_args(this);
}
@Override
public void clear() {
- this.tableName = null;
- this.row = null;
- this.column = null;
this.regionName = null;
- }
-
- /**
- * name of table
- */
- public byte[] getTableName() {
- setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
- return tableName == null ? null : tableName.array();
- }
-
- public ByteBuffer bufferForTableName() {
- return tableName;
- }
-
- /**
- * name of table
- */
- public get_args setTableName(byte[] tableName) {
- setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
- return this;
- }
-
- public get_args setTableName(ByteBuffer tableName) {
- this.tableName = tableName;
- return this;
- }
-
- public void unsetTableName() {
- this.tableName = null;
- }
-
- /** Returns true if field tableName is set (has been assigned a value) and false otherwise */
- public boolean isSetTableName() {
- return this.tableName != null;
- }
-
- public void setTableNameIsSet(boolean value) {
- if (!value) {
- this.tableName = null;
- }
- }
-
- /**
- * row key
- */
- public byte[] getRow() {
- setRow(org.apache.thrift.TBaseHelper.rightSize(row));
- return row == null ? null : row.array();
- }
-
- public ByteBuffer bufferForRow() {
- return row;
- }
-
- /**
- * row key
- */
- public get_args setRow(byte[] row) {
- setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
- return this;
- }
-
- public get_args setRow(ByteBuffer row) {
- this.row = row;
- return this;
- }
-
- public void unsetRow() {
- this.row = null;
- }
-
- /** Returns true if field row is set (has been assigned a value) and false otherwise */
- public boolean isSetRow() {
- return this.row != null;
- }
-
- public void setRowIsSet(boolean value) {
- if (!value) {
- this.row = null;
- }
- }
-
- /**
- * column name
- */
- public byte[] getColumn() {
- setColumn(org.apache.thrift.TBaseHelper.rightSize(column));
- return column == null ? null : column.array();
- }
-
- public ByteBuffer bufferForColumn() {
- return column;
- }
-
- /**
- * column name
- */
- public get_args setColumn(byte[] column) {
- setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column));
- return this;
- }
-
- public get_args setColumn(ByteBuffer column) {
- this.column = column;
- return this;
- }
-
- public void unsetColumn() {
- this.column = null;
- }
-
- /** Returns true if field column is set (has been assigned a value) and false otherwise */
- public boolean isSetColumn() {
- return this.column != null;
- }
-
- public void setColumnIsSet(boolean value) {
- if (!value) {
- this.column = null;
- }
+ setIfOlderThanTSIsSet(false);
+ this.ifOlderThanTS = 0;
}
public byte[] getRegionName() {
@@ -18855,12 +18943,12 @@ public class Hbase {
return regionName;
}
- public get_args setRegionName(byte[] regionName) {
+ public flushRegion_args setRegionName(byte[] regionName) {
setRegionName(regionName == null ? (ByteBuffer)null : ByteBuffer.wrap(regionName));
return this;
}
- public get_args setRegionName(ByteBuffer regionName) {
+ public flushRegion_args setRegionName(ByteBuffer regionName) {
this.regionName = regionName;
return this;
}
@@ -18880,37 +18968,44 @@ public class Hbase {
}
}
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TABLE_NAME:
- if (value == null) {
- unsetTableName();
- } else {
- setTableName((ByteBuffer)value);
- }
- break;
+ public long getIfOlderThanTS() {
+ return this.ifOlderThanTS;
+ }
- case ROW:
- if (value == null) {
- unsetRow();
- } else {
- setRow((ByteBuffer)value);
- }
- break;
+ public flushRegion_args setIfOlderThanTS(long ifOlderThanTS) {
+ this.ifOlderThanTS = ifOlderThanTS;
+ setIfOlderThanTSIsSet(true);
+ return this;
+ }
- case COLUMN:
+ public void unsetIfOlderThanTS() {
+ __isset_bit_vector.clear(__IFOLDERTHANTS_ISSET_ID);
+ }
+
+ /** Returns true if field ifOlderThanTS is set (has been assigned a value) and false otherwise */
+ public boolean isSetIfOlderThanTS() {
+ return __isset_bit_vector.get(__IFOLDERTHANTS_ISSET_ID);
+ }
+
+ public void setIfOlderThanTSIsSet(boolean value) {
+ __isset_bit_vector.set(__IFOLDERTHANTS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case REGION_NAME:
if (value == null) {
- unsetColumn();
+ unsetRegionName();
} else {
- setColumn((ByteBuffer)value);
+ setRegionName((ByteBuffer)value);
}
break;
- case REGION_NAME:
+ case IF_OLDER_THAN_TS:
if (value == null) {
- unsetRegionName();
+ unsetIfOlderThanTS();
} else {
- setRegionName((ByteBuffer)value);
+ setIfOlderThanTS((Long)value);
}
break;
@@ -18919,18 +19014,12 @@ public class Hbase {
public Object getFieldValue(_Fields field) {
switch (field) {
- case TABLE_NAME:
- return getTableName();
-
- case ROW:
- return getRow();
-
- case COLUMN:
- return getColumn();
-
case REGION_NAME:
return getRegionName();
+ case IF_OLDER_THAN_TS:
+ return Long.valueOf(getIfOlderThanTS());
+
}
throw new IllegalStateException();
}
@@ -18942,14 +19031,10 @@ public class Hbase {
}
switch (field) {
- case TABLE_NAME:
- return isSetTableName();
- case ROW:
- return isSetRow();
- case COLUMN:
- return isSetColumn();
case REGION_NAME:
return isSetRegionName();
+ case IF_OLDER_THAN_TS:
+ return isSetIfOlderThanTS();
}
throw new IllegalStateException();
}
@@ -18958,42 +19043,15 @@ public class Hbase {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof get_args)
- return this.equals((get_args)that);
+ if (that instanceof flushRegion_args)
+ return this.equals((flushRegion_args)that);
return false;
}
- public boolean equals(get_args that) {
+ public boolean equals(flushRegion_args that) {
if (that == null)
return false;
- boolean this_present_tableName = true && this.isSetTableName();
- boolean that_present_tableName = true && that.isSetTableName();
- if (this_present_tableName || that_present_tableName) {
- if (!(this_present_tableName && that_present_tableName))
- return false;
- if (!this.tableName.equals(that.tableName))
- return false;
- }
-
- boolean this_present_row = true && this.isSetRow();
- boolean that_present_row = true && that.isSetRow();
- if (this_present_row || that_present_row) {
- if (!(this_present_row && that_present_row))
- return false;
- if (!this.row.equals(that.row))
- return false;
- }
-
- boolean this_present_column = true && this.isSetColumn();
- boolean that_present_column = true && that.isSetColumn();
- if (this_present_column || that_present_column) {
- if (!(this_present_column && that_present_column))
- return false;
- if (!this.column.equals(that.column))
- return false;
- }
-
boolean this_present_regionName = true && this.isSetRegionName();
boolean that_present_regionName = true && that.isSetRegionName();
if (this_present_regionName || that_present_regionName) {
@@ -19003,6 +19061,15 @@ public class Hbase {
return false;
}
+ boolean this_present_ifOlderThanTS = true;
+ boolean that_present_ifOlderThanTS = true;
+ if (this_present_ifOlderThanTS || that_present_ifOlderThanTS) {
+ if (!(this_present_ifOlderThanTS && that_present_ifOlderThanTS))
+ return false;
+ if (this.ifOlderThanTS != that.ifOlderThanTS)
+ return false;
+ }
+
return true;
}
@@ -19011,50 +19078,30 @@ public class Hbase {
return 0;
}
- public int compareTo(get_args other) {
+ public int compareTo(flushRegion_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- get_args typedOther = (get_args)other;
+ flushRegion_args typedOther = (flushRegion_args)other;
- lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetTableName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetRow()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn());
+ lastComparison = Boolean.valueOf(isSetRegionName()).compareTo(typedOther.isSetRegionName());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetColumn()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column);
+ if (isSetRegionName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.regionName, typedOther.regionName);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRegionName()).compareTo(typedOther.isSetRegionName());
+ lastComparison = Boolean.valueOf(isSetIfOlderThanTS()).compareTo(typedOther.isSetIfOlderThanTS());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetRegionName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.regionName, typedOther.regionName);
+ if (isSetIfOlderThanTS()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ifOlderThanTS, typedOther.ifOlderThanTS);
if (lastComparison != 0) {
return lastComparison;
}
@@ -19076,33 +19123,9 @@ public class Hbase {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("get_args(");
+ StringBuilder sb = new StringBuilder("flushRegion_args(");
boolean first = true;
- sb.append("tableName:");
- if (this.tableName == null) {
- sb.append("null");
- } else {
- sb.append(this.tableName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("row:");
- if (this.row == null) {
- sb.append("null");
- } else {
- sb.append(this.row);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("column:");
- if (this.column == null) {
- sb.append("null");
- } else {
- sb.append(this.column);
- }
- first = false;
- if (!first) sb.append(", ");
sb.append("regionName:");
if (this.regionName == null) {
sb.append("null");
@@ -19110,6 +19133,10 @@ public class Hbase {
sb.append(this.regionName);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("ifOlderThanTS:");
+ sb.append(this.ifOlderThanTS);
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -19134,53 +19161,2495 @@ public class Hbase {
}
}
- private static class get_argsStandardSchemeFactory implements SchemeFactory {
- public get_argsStandardScheme getScheme() {
- return new get_argsStandardScheme();
+ private static class flushRegion_argsStandardSchemeFactory implements SchemeFactory {
+ public flushRegion_argsStandardScheme getScheme() {
+ return new flushRegion_argsStandardScheme();
}
}
- private static class get_argsStandardScheme extends StandardScheme<get_args> {
+ private static class flushRegion_argsStandardScheme extends StandardScheme<flushRegion_args> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, get_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, flushRegion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
- case 1: // TABLE_NAME
+ case 1: // REGION_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.tableName = iprot.readBinary();
- struct.setTableNameIsSet(true);
- } else {
+ struct.regionName = iprot.readBinary();
+ struct.setRegionNameIsSet(true);
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 2: // ROW
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.row = iprot.readBinary();
- struct.setRowIsSet(true);
- } else {
+ case 2: // IF_OLDER_THAN_TS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.ifOlderThanTS = iprot.readI64();
+ struct.setIfOlderThanTSIsSet(true);
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 3: // COLUMN
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, flushRegion_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.regionName != null) {
+ oprot.writeFieldBegin(REGION_NAME_FIELD_DESC);
+ oprot.writeBinary(struct.regionName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(IF_OLDER_THAN_TS_FIELD_DESC);
+ oprot.writeI64(struct.ifOlderThanTS);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class flushRegion_argsTupleSchemeFactory implements SchemeFactory {
+ public flushRegion_argsTupleScheme getScheme() {
+ return new flushRegion_argsTupleScheme();
+ }
+ }
+
+ private static class flushRegion_argsTupleScheme extends TupleScheme<flushRegion_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, flushRegion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetRegionName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetIfOlderThanTS()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetRegionName()) {
+ oprot.writeBinary(struct.regionName);
+ }
+ if (struct.isSetIfOlderThanTS()) {
+ oprot.writeI64(struct.ifOlderThanTS);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, flushRegion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.regionName = iprot.readBinary();
+ struct.setRegionNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.ifOlderThanTS = iprot.readI64();
+ struct.setIfOlderThanTSIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class flushRegion_result implements org.apache.thrift.TBase<flushRegion_result, flushRegion_result._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("flushRegion_result");
+
+ private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new flushRegion_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new flushRegion_resultTupleSchemeFactory());
+ }
+
+ public IOError io; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ IO((short)1, "io");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // IO
+ return IO;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(flushRegion_result.class, metaDataMap);
+ }
+
+ public flushRegion_result() {
+ }
+
+ public flushRegion_result(
+ IOError io)
+ {
+ this();
+ this.io = io;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public flushRegion_result(flushRegion_result other) {
+ if (other.isSetIo()) {
+ this.io = new IOError(other.io);
+ }
+ }
+
+ public flushRegion_result deepCopy() {
+ return new flushRegion_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.io = null;
+ }
+
+ public IOError getIo() {
+ return this.io;
+ }
+
+ public flushRegion_result setIo(IOError io) {
+ this.io = io;
+ return this;
+ }
+
+ public void unsetIo() {
+ this.io = null;
+ }
+
+ /** Returns true if field io is set (has been assigned a value) and false otherwise */
+ public boolean isSetIo() {
+ return this.io != null;
+ }
+
+ public void setIoIsSet(boolean value) {
+ if (!value) {
+ this.io = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IO:
+ if (value == null) {
+ unsetIo();
+ } else {
+ setIo((IOError)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IO:
+ return getIo();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case IO:
+ return isSetIo();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof flushRegion_result)
+ return this.equals((flushRegion_result)that);
+ return false;
+ }
+
+ public boolean equals(flushRegion_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_io = true && this.isSetIo();
+ boolean that_present_io = true && that.isSetIo();
+ if (this_present_io || that_present_io) {
+ if (!(this_present_io && that_present_io))
+ return false;
+ if (!this.io.equals(that.io))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(flushRegion_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ flushRegion_result typedOther = (flushRegion_result)other;
+
+ lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIo()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("flushRegion_result(");
+ boolean first = true;
+
+ sb.append("io:");
+ if (this.io == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.io);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class flushRegion_resultStandardSchemeFactory implements SchemeFactory {
+ public flushRegion_resultStandardScheme getScheme() {
+ return new flushRegion_resultStandardScheme();
+ }
+ }
+
+ private static class flushRegion_resultStandardScheme extends StandardScheme<flushRegion_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, flushRegion_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // IO
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.io = new IOError();
+ struct.io.read(iprot);
+ struct.setIoIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, flushRegion_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.io != null) {
+ oprot.writeFieldBegin(IO_FIELD_DESC);
+ struct.io.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class flushRegion_resultTupleSchemeFactory implements SchemeFactory {
+ public flushRegion_resultTupleScheme getScheme() {
+ return new flushRegion_resultTupleScheme();
+ }
+ }
+
+ private static class flushRegion_resultTupleScheme extends TupleScheme<flushRegion_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, flushRegion_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetIo()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetIo()) {
+ struct.io.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, flushRegion_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.io = new IOError();
+ struct.io.read(iprot);
+ struct.setIoIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class get_args implements org.apache.thrift.TBase<get_args, get_args._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_args");
+
+ private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", 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)2);
+ private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField REGION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("regionName", org.apache.thrift.protocol.TType.STRING, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new get_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new get_argsTupleSchemeFactory());
+ }
+
+ /**
+ * name of table
+ */
+ public ByteBuffer tableName; // required
+ /**
+ * row key
+ */
+ public ByteBuffer row; // required
+ /**
+ * column name
+ */
+ public ByteBuffer column; // required
+ public ByteBuffer regionName; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ * name of table
+ */
+ TABLE_NAME((short)1, "tableName"),
+ /**
+ * row key
+ */
+ ROW((short)2, "row"),
+ /**
+ * column name
+ */
+ COLUMN((short)3, "column"),
+ REGION_NAME((short)4, "regionName");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TABLE_NAME
+ return TABLE_NAME;
+ case 2: // ROW
+ return ROW;
+ case 3: // COLUMN
+ return COLUMN;
+ case 4: // REGION_NAME
+ return REGION_NAME;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
+ tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
+ tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
+ tmpMap.put(_Fields.REGION_NAME, new org.apache.thrift.meta_data.FieldMetaData("regionName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ 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(get_args.class, metaDataMap);
+ }
+
+ public get_args() {
+ }
+
+ public get_args(
+ ByteBuffer tableName,
+ ByteBuffer row,
+ ByteBuffer column,
+ ByteBuffer regionName)
+ {
+ this();
+ this.tableName = tableName;
+ this.row = row;
+ this.column = column;
+ this.regionName = regionName;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public get_args(get_args other) {
+ if (other.isSetTableName()) {
+ this.tableName = other.tableName;
+ }
+ if (other.isSetRow()) {
+ this.row = other.row;
+ }
+ if (other.isSetColumn()) {
+ this.column = other.column;
+ }
+ if (other.isSetRegionName()) {
+ this.regionName = other.regionName;
+ }
+ }
+
+ public get_args deepCopy() {
+ return new get_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.tableName = null;
+ this.row = null;
+ this.column = null;
+ this.regionName = null;
+ }
+
+ /**
+ * name of table
+ */
+ public byte[] getTableName() {
+ setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName));
+ return tableName == null ? null : tableName.array();
+ }
+
+ public ByteBuffer bufferForTableName() {
+ return tableName;
+ }
+
+ /**
+ * name of table
+ */
+ public get_args setTableName(byte[] tableName) {
+ setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName));
+ return this;
+ }
+
+ public get_args setTableName(ByteBuffer tableName) {
+ this.tableName = tableName;
+ return this;
+ }
+
+ public void unsetTableName() {
+ this.tableName = null;
+ }
+
+ /** Returns true if field tableName is set (has been assigned a value) and false otherwise */
+ public boolean isSetTableName() {
+ return this.tableName != null;
+ }
+
+ public void setTableNameIsSet(boolean value) {
+ if (!value) {
+ this.tableName = null;
+ }
+ }
+
+ /**
+ * row key
+ */
+ public byte[] getRow() {
+ setRow(org.apache.thrift.TBaseHelper.rightSize(row));
+ return row == null ? null : row.array();
+ }
+
+ public ByteBuffer bufferForRow() {
+ return row;
+ }
+
+ /**
+ * row key
+ */
+ public get_args setRow(byte[] row) {
+ setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
+ return this;
+ }
+
+ public get_args setRow(ByteBuffer row) {
+ this.row = row;
+ return this;
+ }
+
+ public void unsetRow() {
+ this.row = null;
+ }
+
+ /** Returns true if field row is set (has been assigned a value) and false otherwise */
+ public boolean isSetRow() {
+ return this.row != null;
+ }
+
+ public void setRowIsSet(boolean value) {
+ if (!value) {
+ this.row = null;
+ }
+ }
+
+ /**
+ * column name
+ */
+ public byte[] getColumn() {
+ setColumn(org.apache.thrift.TBaseHelper.rightSize(column));
+ return column == null ? null : column.array();
+ }
+
+ public ByteBuffer bufferForColumn() {
+ return column;
+ }
+
+ /**
+ * column name
+ */
+ public get_args setColumn(byte[] column) {
+ setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column));
+ return this;
+ }
+
+ public get_args setColumn(ByteBuffer column) {
+ this.column = column;
+ return this;
+ }
+
+ public void unsetColumn() {
+ this.column = null;
+ }
+
+ /** Returns true if field column is set (has been assigned a value) and false otherwise */
+ public boolean isSetColumn() {
+ return this.column != null;
+ }
+
+ public void setColumnIsSet(boolean value) {
+ if (!value) {
+ this.column = null;
+ }
+ }
+
+ public byte[] getRegionName() {
+ setRegionName(org.apache.thrift.TBaseHelper.rightSize(regionName));
+ return regionName == null ? null : regionName.array();
+ }
+
+ public ByteBuffer bufferForRegionName() {
+ return regionName;
+ }
+
+ public get_args setRegionName(byte[] regionName) {
+ setRegionName(regionName == null ? (ByteBuffer)null : ByteBuffer.wrap(regionName));
+ return this;
+ }
+
+ public get_args setRegionName(ByteBuffer regionName) {
+ this.regionName = regionName;
+ return this;
+ }
+
+ public void unsetRegionName() {
+ this.regionName = null;
+ }
+
+ /** Returns true if field regionName is set (has been assigned a value) and false otherwise */
+ public boolean isSetRegionName() {
+ return this.regionName != null;
+ }
+
+ public void setRegionNameIsSet(boolean value) {
+ if (!value) {
+ this.regionName = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TABLE_NAME:
+ if (value == null) {
+ unsetTableName();
+ } else {
+ setTableName((ByteBuffer)value);
+ }
+ break;
+
+ case ROW:
+ if (value == null) {
+ unsetRow();
+ } else {
+ setRow((ByteBuffer)value);
+ }
+ break;
+
+ case COLUMN:
+ if (value == null) {
+ unsetColumn();
+ } else {
+ setColumn((ByteBuffer)value);
+ }
+ break;
+
+ case REGION_NAME:
+ if (value == null) {
+ unsetRegionName();
+ } else {
+ setRegionName((ByteBuffer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TABLE_NAME:
+ return getTableName();
+
+ case ROW:
+ return getRow();
+
+ case COLUMN:
+ return getColumn();
+
+ case REGION_NAME:
+ return getRegionName();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case TABLE_NAME:
+ return isSetTableName();
+ case ROW:
+ return isSetRow();
+ case COLUMN:
+ return isSetColumn();
+ case REGION_NAME:
+ return isSetRegionName();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof get_args)
+ return this.equals((get_args)that);
+ return false;
+ }
+
+ public boolean equals(get_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_tableName = true && this.isSetTableName();
+ boolean that_present_tableName = true && that.isSetTableName();
+ if (this_present_tableName || that_present_tableName) {
+ if (!(this_present_tableName && that_present_tableName))
+ return false;
+ if (!this.tableName.equals(that.tableName))
+ return false;
+ }
+
+ boolean this_present_row = true && this.isSetRow();
+ boolean that_present_row = true && that.isSetRow();
+ if (this_present_row || that_present_row) {
+ if (!(this_present_row && that_present_row))
+ return false;
+ if (!this.row.equals(that.row))
+ return false;
+ }
+
+ boolean this_present_column = true && this.isSetColumn();
+ boolean that_present_column = true && that.isSetColumn();
+ if (this_present_column || that_present_column) {
+ if (!(this_present_column && that_present_column))
+ return false;
+ if (!this.column.equals(that.column))
+ return false;
+ }
+
+ boolean this_present_regionName = true && this.isSetRegionName();
+ boolean that_present_regionName = true && that.isSetRegionName();
+ if (this_present_regionName || that_present_regionName) {
+ if (!(this_present_regionName && that_present_regionName))
+ return false;
+ if (!this.regionName.equals(that.regionName))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(get_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ get_args typedOther = (get_args)other;
+
+ lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTableName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRow()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetColumn()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetRegionName()).compareTo(typedOther.isSetRegionName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRegionName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.regionName, typedOther.regionName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("get_args(");
+ boolean first = true;
+
+ sb.append("tableName:");
+ if (this.tableName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tableName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("row:");
+ if (this.row == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.row);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("column:");
+ if (this.column == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.column);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("regionName:");
+ if (this.regionName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.regionName);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class get_argsStandardSchemeFactory implements SchemeFactory {
+ public get_argsStandardScheme getScheme() {
+ return new get_argsStandardScheme();
+ }
+ }
+
+ private static class get_argsStandardScheme extends StandardScheme<get_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, get_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // TABLE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.tableName = iprot.readBinary();
+ struct.setTableNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // ROW
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.row = iprot.readBinary();
+ struct.setRowIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // COLUMN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.column = iprot.readBinary();
+ struct.setColumnIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // REGION_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.regionName = iprot.readBinary();
+ struct.setRegionNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, get_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.tableName != null) {
+ oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+ oprot.writeBinary(struct.tableName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.row != null) {
+ oprot.writeFieldBegin(ROW_FIELD_DESC);
+ oprot.writeBinary(struct.row);
+ oprot.writeFieldEnd();
+ }
+ if (struct.column != null) {
+ oprot.writeFieldBegin(COLUMN_FIELD_DESC);
+ oprot.writeBinary(struct.column);
+ oprot.writeFieldEnd();
+ }
+ if (struct.regionName != null) {
+ oprot.writeFieldBegin(REGION_NAME_FIELD_DESC);
+ oprot.writeBinary(struct.regionName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class get_argsTupleSchemeFactory implements SchemeFactory {
+ public get_argsTupleScheme getScheme() {
+ return new get_argsTupleScheme();
+ }
+ }
+
+ private static class get_argsTupleScheme extends TupleScheme<get_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetTableName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetRow()) {
+ optionals.set(1);
+ }
+ if (struct.isSetColumn()) {
+ optionals.set(2);
+ }
+ if (struct.isSetRegionName()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetTableName()) {
+ oprot.writeBinary(struct.tableName);
+ }
+ if (struct.isSetRow()) {
+ oprot.writeBinary(struct.row);
+ }
+ if (struct.isSetColumn()) {
+ oprot.writeBinary(struct.column);
+ }
+ if (struct.isSetRegionName()) {
+ oprot.writeBinary(struct.regionName);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.tableName = iprot.readBinary();
+ struct.setTableNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.row = iprot.readBinary();
+ struct.setRowIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.column = iprot.readBinary();
+ struct.setColumnIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.regionName = iprot.readBinary();
+ struct.setRegionNameIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class get_result implements org.apache.thrift.TBase<get_result, get_result._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+ private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new get_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new get_resultTupleSchemeFactory());
+ }
+
+ public List<TCell> success; // required
+ public IOError io; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ IO((short)1, "io");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // IO
+ return IO;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCell.class))));
+ tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_result.class, metaDataMap);
+ }
+
+ public get_result() {
+ }
+
+ public get_result(
+ List<TCell> success,
+ IOError io)
+ {
+ this();
+ this.success = success;
+ this.io = io;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public get_result(get_result other) {
+ if (other.isSetSuccess()) {
+ List<TCell> __this__success = new ArrayList<TCell>();
+ for (TCell other_element : other.success) {
+ __this__success.add(new TCell(other_element));
+ }
+ this.success = __this__success;
+ }
+ if (other.isSetIo()) {
+ this.io = new IOError(other.io);
+ }
+ }
+
+ public get_result deepCopy() {
+ return new get_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.io = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<TCell> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(TCell elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<TCell>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<TCell> getSuccess() {
+ return this.success;
+ }
+
+ public get_result setSuccess(List<TCell> success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public IOError getIo() {
+ return this.io;
+ }
+
+ public get_result setIo(IOError io) {
+ this.io = io;
+ return this;
+ }
+
+ public void unsetIo() {
+ this.io = null;
+ }
+
+ /** Returns true if field io is set (has been assigned a value) and false otherwise */
+ public boolean isSetIo() {
+ return this.io != null;
+ }
+
+ public void setIoIsSet(boolean value) {
+ if (!value) {
+ this.io = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<TCell>)value);
+ }
+ break;
+
+ case IO:
+ if (value == null) {
+ unsetIo();
+ } else {
+ setIo((IOError)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case IO:
+ return getIo();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case IO:
+ return isSetIo();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof get_result)
+ return this.equals((get_result)that);
+ return false;
+ }
+
+ public boolean equals(get_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_io = true && this.isSetIo();
+ boolean that_present_io = true && that.isSetIo();
+ if (this_present_io || that_present_io) {
+ if (!(this_present_io && that_present_io))
+ return false;
+ if (!this.io.equals(that.io))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(get_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ get_result typedOther = (get_result)other;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIo()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("get_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("io:");
+ if (this.io == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.io);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class get_resultStandardSchemeFactory implements SchemeFactory {
+ public get_resultStandardScheme getScheme() {
+ return new get_resultStandardScheme();
+ }
+ }
+
+ private static class get_resultStandardScheme extends StandardScheme<get_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, get_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list80 = iprot.readListBegin();
+ struct.success = new ArrayList<TCell>(_list80.size);
+ for (int _i81 = 0; _i81 < _list80.size; ++_i81)
+ {
+ TCell _elem82; // required
+ _elem82 = new TCell();
+ _elem82.read(iprot);
+ struct.success.add(_elem82);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // IO
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.io = new IOError();
+ struct.io.read(iprot);
+ struct.setIoIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, get_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ {
[... 5305 lines stripped ...]