diff --git a/CHANGES.txt b/CHANGES.txt index c48b6ffb5a0..33148801ec6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,7 @@ Release 0.20.0 - Unreleased (Ryan Rawson and Stack) HBASE-1342 Add to filesystem info needed to rebuild .META. HBASE-1361 Disable bloom filters + HBASE-1367 Get rid of Thrift exception 'NotFound' BUG FIXES HBASE-1140 "ant clean test" fails (Nitay Joffe via Stack) diff --git a/lib/libthrift-20080411p1.jar b/lib/libthrift-20080411p1.jar deleted file mode 100644 index 7e4602abed6..00000000000 Binary files a/lib/libthrift-20080411p1.jar and /dev/null differ diff --git a/lib/libthrift-r771587.jar b/lib/libthrift-r771587.jar new file mode 100644 index 00000000000..3988da771f5 Binary files /dev/null and b/lib/libthrift-r771587.jar differ diff --git a/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift b/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift index fa29635d0a0..7a730f0aee5 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift +++ b/src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift @@ -140,14 +140,6 @@ exception IllegalArgument { 1:string message } -/** - * A NotFound exception is used to indicate that no value was found - * for a query, or that a scanner has reached it's end. - */ -exception NotFound { - 1:string message -} - /** * An AlreadyExists exceptions signals that a table with the specified * name already exists @@ -230,22 +222,23 @@ service Hbase { /** * Deletes a table * @param tableName name of table to delete - * @throws NotFound if table doesn't exist on server + * @throws IOError if table doesn't exist on server or there was some other + * problem */ void deleteTable(1:Text tableName) - throws (1:IOError io, 2:NotFound nf) + throws (1:IOError io) /** * Get a single TCell for the specified table, row, and column at the - * latest timestamp. + * latest timestamp. Returns an empty list if no such value exists. * * @param tableName name of table * @param row row key * @param column column name * @return value for specified row/column */ - TCell get(1:Text tableName, 2:Text row, 3:Text column) - throws (1:IOError io, 2:NotFound nf) + list get(1:Text tableName, 2:Text row, 3:Text column) + throws (1:IOError io) /** * Get the specified number of versions for the specified table, @@ -257,8 +250,9 @@ service Hbase { * @param numVersions number of versions to retrieve * @return list of cells for specified row/column */ - list getVer(1:Text tableName, 2:Text row, 3:Text column, 4:i32 numVersions) - throws (1:IOError io, 2:NotFound nf) + list getVer(1:Text tableName, 2:Text row, 3:Text column, + 4:i32 numVersions) + throws (1:IOError io) /** * Get the specified number of versions for the specified table, @@ -272,59 +266,58 @@ service Hbase { * @param numVersions number of versions to retrieve * @return list of cells for specified row/column */ - list getVerTs(1:Text tableName, 2:Text row, 3:Text column, 4:i64 timestamp, 5:i32 numVersions) - throws (1:IOError io, 2:NotFound nf) + list getVerTs(1:Text tableName, 2:Text row, 3:Text column, + 4:i64 timestamp, 5:i32 numVersions) + throws (1:IOError io) /** * Get all the data for the specified table and row at the latest - * timestamp. + * timestamp. Returns an empty list if the row does not exist. * * @param tableName name of table * @param row row key * @return TRowResult containing the row and map of columns to TCells - * @throws NotFound if the row does not exist */ - TRowResult getRow(1:Text tableName, 2:Text row) - throws (1:IOError io, 2:NotFound nf) + list getRow(1:Text tableName, 2:Text row) + throws (1:IOError io) /** * Get the specified columns for the specified table and row at the latest - * timestamp. + * timestamp. Returns an empty list if the row does not exist. * * @param tableName name of table * @param row row key * @param columns List of columns to return, null for all columns * @return TRowResult containing the row and map of columns to TCells - * @throws NotFound if the row does not exist */ - TRowResult getRowWithColumns(1:Text tableName, 2:Text row, 3:list columns) - throws (1:IOError io, 2:NotFound nf) + list getRowWithColumns(1:Text tableName, 2:Text row, + 3:list columns) + throws (1:IOError io) /** * Get all the data for the specified table and row at the specified - * timestamp. + * timestamp. Returns an empty list if the row does not exist. * * @param tableName of table * @param row row key * @param timestamp timestamp * @return TRowResult containing the row and map of columns to TCells - * @throws NotFound if the row does not exist */ - TRowResult getRowTs(1:Text tableName, 2:Text row, 3:i64 timestamp) - throws (1:IOError io, 2:NotFound nf) + list getRowTs(1:Text tableName, 2:Text row, 3:i64 timestamp) + throws (1:IOError io) /** * Get the specified columns for the specified table and row at the specified - * timestamp. + * timestamp. Returns an empty list if the row does not exist. * * @param tableName name of table * @param row row key * @param columns List of columns to return, null for all columns * @return TRowResult containing the row and map of columns to TCells - * @throws NotFound if the row does not exist */ - TRowResult getRowWithColumnsTs(1:Text tableName, 2:Text row, 3:list columns, 4:i64 timestamp) - throws (1:IOError io, 2:NotFound nf) + list getRowWithColumnsTs(1:Text tableName, 2:Text row, + 3:list columns, 4:i64 timestamp) + throws (1:IOError io) /** * Apply a series of mutations (updates/deletes) to a row in a @@ -520,15 +513,15 @@ service Hbase { * Returns the scanner's current row value and advances to the next * row in the table. When there are no more rows in the table, or a key * greater-than-or-equal-to the scanner's specified stopRow is reached, - * a NotFound exception is returned. + * an empty list is returned. * * @param id id of a scanner returned by scannerOpen * @return a TRowResult containing the current row and a map of the columns to TCells. * @throws IllegalArgument if ScannerID is invalid * @throws NotFound when the scanner reaches the end */ - TRowResult scannerGet(1:ScannerID id) - throws (1:IOError io, 2:IllegalArgument ia, 3:NotFound nf) + list scannerGet(1:ScannerID id) + throws (1:IOError io, 2:IllegalArgument ia) /** * Closes the server-state associated with an open scanner. diff --git a/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java b/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java index 8b221528a39..c948a77ae08 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java +++ b/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java @@ -47,19 +47,18 @@ import org.apache.hadoop.hbase.thrift.generated.Hbase; import org.apache.hadoop.hbase.thrift.generated.IOError; import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; import org.apache.hadoop.hbase.thrift.generated.Mutation; -import org.apache.hadoop.hbase.thrift.generated.NotFound; import org.apache.hadoop.hbase.thrift.generated.TRegionInfo; import org.apache.hadoop.hbase.thrift.generated.TCell; import org.apache.hadoop.hbase.thrift.generated.TRowResult; import org.apache.hadoop.hbase.util.Bytes; -import com.facebook.thrift.TException; -import com.facebook.thrift.protocol.TBinaryProtocol; -import com.facebook.thrift.protocol.TProtocolFactory; -import com.facebook.thrift.server.TServer; -import com.facebook.thrift.server.TThreadPoolServer; -import com.facebook.thrift.transport.TServerSocket; -import com.facebook.thrift.transport.TServerTransport; +import org.apache.thrift.TException; +import org.apache.thrift.protocol.TCompactProtocol; +import org.apache.thrift.protocol.TProtocolFactory; +import org.apache.thrift.server.THsHaServer; +import org.apache.thrift.server.TServer; +import org.apache.thrift.transport.TNonblockingServerSocket; +import org.apache.thrift.transport.TNonblockingServerTransport; /** * ThriftServer - this class starts up a Thrift server which implements the @@ -179,7 +178,7 @@ public class ThriftServer { } } - public void compact(byte[] tableNameOrRegionName) throws IOError, TException { + public void compact(byte[] tableNameOrRegionName) throws IOError { try{ admin.compact(tableNameOrRegionName); } catch (IOException e) { @@ -187,7 +186,7 @@ public class ThriftServer { } } - public void majorCompact(byte[] tableNameOrRegionName) throws IOError, TException { + public void majorCompact(byte[] tableNameOrRegionName) throws IOError { try{ admin.majorCompact(tableNameOrRegionName); } catch (IOException e) { @@ -230,14 +229,11 @@ public class ThriftServer { } } - public TCell get(byte[] tableName, byte[] row, byte[] column) - throws NotFound, IOError { + public List get(byte[] tableName, byte[] row, byte[] column) + throws IOError { try { HTable table = getTable(tableName); Cell cell = table.get(row, column); - if (cell == null) { - throw new NotFound(); - } return ThriftUtilities.cellFromHBase(cell); } catch (IOException e) { throw new IOError(e.getMessage()); @@ -245,63 +241,48 @@ public class ThriftServer { } public List getVer(byte[] tableName, byte[] row, - byte[] column, int numVersions) throws IOError, NotFound { + byte[] column, int numVersions) throws IOError { try { HTable table = getTable(tableName); Cell[] cells = table.get(row, column, numVersions); - if (cells == null) { - throw new NotFound(); - } - List list = new ArrayList(); - for (int i = 0; i < cells.length; i++) { - list.add(ThriftUtilities.cellFromHBase(cells[i])); - } - return list; + return ThriftUtilities.cellFromHBase(cells); } catch (IOException e) { throw new IOError(e.getMessage()); } } public List getVerTs(byte[] tableName, byte[] row, - byte[] column, long timestamp, int numVersions) throws IOError, - NotFound { + byte[] column, long timestamp, int numVersions) throws IOError { try { HTable table = getTable(tableName); Cell[] cells = table.get(row, column, timestamp, numVersions); - if (cells == null) { - throw new NotFound(); - } - List list = new ArrayList(); - for (int i = 0; i < cells.length; i++) { - list.add(ThriftUtilities.cellFromHBase(cells[i])); - } - return list; + return ThriftUtilities.cellFromHBase(cells); } catch (IOException e) { throw new IOError(e.getMessage()); } } - public TRowResult getRow(byte[] tableName, byte[] row) - throws IOError, NotFound { + public List getRow(byte[] tableName, byte[] row) + throws IOError { return getRowWithColumnsTs(tableName, row, null, HConstants.LATEST_TIMESTAMP); } - public TRowResult getRowWithColumns(byte[] tableName, byte[] row, - List columns) throws IOError, NotFound { + public List getRowWithColumns(byte[] tableName, byte[] row, + List columns) throws IOError { return getRowWithColumnsTs(tableName, row, columns, HConstants.LATEST_TIMESTAMP); } - public TRowResult getRowTs(byte[] tableName, byte[] row, - long timestamp) throws IOError, NotFound { + public List getRowTs(byte[] tableName, byte[] row, + long timestamp) throws IOError { return getRowWithColumnsTs(tableName, row, null, timestamp); } - public TRowResult getRowWithColumnsTs(byte[] tableName, byte[] row, - List columns, long timestamp) throws IOError, NotFound { + public List getRowWithColumnsTs(byte[] tableName, byte[] row, + List columns, long timestamp) throws IOError { try { HTable table = getTable(tableName); if (columns == null) { @@ -365,13 +346,13 @@ public class ThriftServer { } } - public void deleteTable(byte[] tableName) throws IOError, NotFound { + public void deleteTable(byte[] tableName) throws IOError { if (LOG.isDebugEnabled()) { LOG.debug("deleteTable: table=" + new String(tableName)); } try { if (!admin.tableExists(tableName)) { - throw new NotFound(); + throw new IOError("table does not exist"); } admin.deleteTable(tableName); } catch (IOException e) { @@ -459,7 +440,7 @@ public class ThriftServer { removeScanner(id); } - public TRowResult scannerGet(int id) throws IllegalArgument, NotFound, + public List scannerGet(int id) throws IllegalArgument, IOError { LOG.debug("scannerGet: id=" + id); Scanner scanner = getScanner(id); @@ -472,7 +453,7 @@ public class ThriftServer { try { results = scanner.next(); if (results == null) { - throw new NotFound("end of scanner reached"); + return new ArrayList(); } } catch (IOException e) { throw new IOError(e.getMessage()); @@ -632,9 +613,10 @@ public class ThriftServer { Integer.toString(port)); HBaseHandler handler = new HBaseHandler(); Hbase.Processor processor = new Hbase.Processor(handler); - TServerTransport serverTransport = new TServerSocket(port); - TProtocolFactory protFactory = new TBinaryProtocol.Factory(true, true); - TServer server = new TThreadPoolServer(processor, serverTransport, + TNonblockingServerTransport serverTransport = + new TNonblockingServerSocket(port); + TProtocolFactory protFactory = new TCompactProtocol.Factory(); + TServer server = new THsHaServer(processor, serverTransport, protFactory); server.serve(); } diff --git a/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java b/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java index 27ab070edde..7336e763fda 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java +++ b/src/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java @@ -18,6 +18,8 @@ package org.apache.hadoop.hbase.thrift; +import java.util.ArrayList; +import java.util.List; import java.util.Map; import java.util.TreeMap; @@ -27,7 +29,6 @@ import org.apache.hadoop.hbase.io.RowResult; import org.apache.hadoop.hbase.io.hfile.Compression; import org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor; import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; -import org.apache.hadoop.hbase.thrift.generated.NotFound; import org.apache.hadoop.hbase.thrift.generated.TCell; import org.apache.hadoop.hbase.thrift.generated.TRowResult; import org.apache.hadoop.hbase.util.Bytes; @@ -82,38 +83,61 @@ public class ThriftUtilities { } /** - * This utility method creates a new Thrift TCell "struct" based on - * an Hbase Cell object. + * This utility method creates a list of Thrift TCell "struct" based on + * an Hbase Cell object. The empty list is returned if the input is null. * * @param in * Hbase Cell object - * @return Thrift TCell + * @return Thrift TCell array */ - static public TCell cellFromHBase(Cell in) { - return new TCell(in.getValue(), in.getTimestamp()); + static public List cellFromHBase(Cell in) { + List list = new ArrayList(1); + if (in != null) { + list.add(new TCell(in.getValue(), in.getTimestamp())); + } + return list; } - + /** - * This utility method creates a new Thrift TRowResult "struct" based on - * an Hbase RowResult object. + * This utility method creates a list of Thrift TCell "struct" based on + * an Hbase Cell array. The empty list is returned if the input is null. + * @param in Hbase Cell array + * @return Thrift TCell array + */ + static public List cellFromHBase(Cell[] in) { + List list = new ArrayList(in.length); + if (in != null) { + for (int i = 0; i < in.length; i++) { + list.add(new TCell(in[i].getValue(), in[i].getTimestamp())); + } + } + return list; + } + + /** + * This utility method creates a list of Thrift TRowResult "struct" based on + * an Hbase RowResult object. The empty list is returned if the input is + * null. * * @param in * Hbase RowResult object - * @return Thrift TRowResult - * @throws NotFound + * @return Thrift TRowResult array */ - static public TRowResult rowResultFromHBase(RowResult in) - throws NotFound { + static public List rowResultFromHBase(RowResult in) { + List list = new ArrayList(); if(in == null) { - throw new NotFound(); + return list; } TRowResult result = new TRowResult(); result.row = in.getRow(); result.columns = new TreeMap(Bytes.BYTES_COMPARATOR); for (Map.Entry entry : in.entrySet()){ - result.columns.put(entry.getKey(), ThriftUtilities.cellFromHBase(entry.getValue())); + Cell cell = entry.getValue(); + result.columns.put(entry.getKey(), + new TCell(cell.getValue(), cell.getTimestamp())); } - return result; + list.add(result); + return list; } } diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java b/src/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java index 314269d556c..1b2f644f3b1 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * Autogenerated by Thrift * @@ -29,21 +28,34 @@ import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; -import com.facebook.thrift.*; +import java.util.Collections; -import com.facebook.thrift.protocol.*; -import com.facebook.thrift.transport.*; +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; /** * An AlreadyExists exceptions signals that a table with the specified * name already exists */ -public class AlreadyExists extends Exception implements TBase, java.io.Serializable { - public String message; +public class AlreadyExists extends Exception implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("AlreadyExists"); + private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean message = false; + public String message; + public static final int MESSAGE = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(AlreadyExists.class, metaDataMap); } public AlreadyExists() { @@ -54,9 +66,81 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa { this(); this.message = message; - this.__isset.message = true; } + /** + * Performs a deep copy on other. + */ + public AlreadyExists(AlreadyExists other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + @Override + public AlreadyExists clone() { + return new AlreadyExists(this); + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + // Returns true if field message is set (has been asigned a value) and false otherwise + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case MESSAGE: + return getMessage(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case MESSAGE: + return isSetMessage(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -69,8 +153,8 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa if (that == null) return false; - boolean this_present_message = true && (this.message != null); - boolean that_present_message = true && (that.message != null); + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); if (this_present_message || that_present_message) { if (!(this_present_message && that_present_message)) return false; @@ -81,6 +165,7 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa return true; } + @Override public int hashCode() { return 0; } @@ -96,10 +181,9 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa } switch (field.id) { - case 1: + case MESSAGE: if (field.type == TType.STRING) { this.message = iprot.readString(); - this.__isset.message = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -111,17 +195,18 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("AlreadyExists"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.message != null) { - field.name = "message"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); oprot.writeString(this.message); oprot.writeFieldEnd(); } @@ -129,13 +214,26 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("AlreadyExists("); + boolean first = true; + sb.append("message:"); - sb.append(this.message); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java b/src/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java index c2a1b77bdd2..289741c3158 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * Autogenerated by Thrift * @@ -29,22 +28,39 @@ import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; -import com.facebook.thrift.*; +import java.util.Collections; -import com.facebook.thrift.protocol.*; -import com.facebook.thrift.transport.*; +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; /** * A BatchMutation object is used to apply a number of Mutations to a single row. */ -public class BatchMutation implements TBase, java.io.Serializable { - public byte[] row; - public List mutations; +public class BatchMutation implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("BatchMutation"); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)1); + private static final TField MUTATIONS_FIELD_DESC = new TField("mutations", TType.LIST, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean row = false; - public boolean mutations = false; + public byte[] row; + public static final int ROW = 1; + public List mutations; + public static final int MUTATIONS = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(MUTATIONS, new FieldMetaData("mutations", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Mutation.class)))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(BatchMutation.class, metaDataMap); } public BatchMutation() { @@ -56,11 +72,140 @@ public class BatchMutation implements TBase, java.io.Serializable { { this(); this.row = row; - this.__isset.row = true; this.mutations = mutations; - this.__isset.mutations = true; } + /** + * Performs a deep copy on other. + */ + public BatchMutation(BatchMutation other) { + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetMutations()) { + List __this__mutations = new ArrayList(); + for (Mutation other_element : other.mutations) { + __this__mutations.add(new Mutation(other_element)); + } + this.mutations = __this__mutations; + } + } + + @Override + public BatchMutation clone() { + return new BatchMutation(this); + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getMutationsSize() { + return (this.mutations == null) ? 0 : this.mutations.size(); + } + + public java.util.Iterator getMutationsIterator() { + return (this.mutations == null) ? null : this.mutations.iterator(); + } + + public void addToMutations(Mutation elem) { + if (this.mutations == null) { + this.mutations = new ArrayList(); + } + this.mutations.add(elem); + } + + public List getMutations() { + return this.mutations; + } + + public void setMutations(List mutations) { + this.mutations = mutations; + } + + public void unsetMutations() { + this.mutations = null; + } + + // Returns true if field mutations is set (has been asigned a value) and false otherwise + public boolean isSetMutations() { + return this.mutations != null; + } + + public void setMutationsIsSet(boolean value) { + if (!value) { + this.mutations = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case MUTATIONS: + if (value == null) { + unsetMutations(); + } else { + setMutations((List)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case ROW: + return getRow(); + + case MUTATIONS: + return getMutations(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case ROW: + return isSetRow(); + case MUTATIONS: + return isSetMutations(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -73,8 +218,8 @@ public class BatchMutation implements TBase, java.io.Serializable { if (that == null) return false; - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -82,8 +227,8 @@ public class BatchMutation implements TBase, java.io.Serializable { return false; } - boolean this_present_mutations = true && (this.mutations != null); - boolean that_present_mutations = true && (that.mutations != null); + boolean this_present_mutations = true && this.isSetMutations(); + boolean that_present_mutations = true && that.isSetMutations(); if (this_present_mutations || that_present_mutations) { if (!(this_present_mutations && that_present_mutations)) return false; @@ -94,6 +239,7 @@ public class BatchMutation implements TBase, java.io.Serializable { return true; } + @Override public int hashCode() { return 0; } @@ -109,29 +255,27 @@ public class BatchMutation implements TBase, java.io.Serializable { } switch (field.id) { - case 1: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case MUTATIONS: if (field.type == TType.LIST) { { TList _list0 = iprot.readListBegin(); this.mutations = new ArrayList(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { - Mutation _elem2 = new Mutation(); + Mutation _elem2; _elem2 = new Mutation(); _elem2.read(iprot); this.mutations.add(_elem2); } iprot.readListEnd(); } - this.__isset.mutations = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -143,25 +287,23 @@ public class BatchMutation implements TBase, java.io.Serializable { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("BatchMutation"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } if (this.mutations != null) { - field.name = "mutations"; - field.type = TType.LIST; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(MUTATIONS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.mutations.size())); for (Mutation _iter3 : this.mutations) { @@ -175,15 +317,34 @@ public class BatchMutation implements TBase, java.io.Serializable { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("BatchMutation("); + boolean first = true; + sb.append("row:"); - sb.append(this.row); - sb.append(",mutations:"); - sb.append(this.mutations); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("mutations:"); + if (this.mutations == null) { + sb.append("null"); + } else { + sb.append(this.mutations); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java b/src/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java index 3f538bd6163..fc0ba7b8ff9 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * Autogenerated by Thrift * @@ -29,42 +28,89 @@ import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; -import com.facebook.thrift.*; +import java.util.Collections; -import com.facebook.thrift.protocol.*; -import com.facebook.thrift.transport.*; +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; /** * An HColumnDescriptor contains information about a column family * such as the number of versions, compression settings, etc. It is * used as input when creating a table or adding a column. */ -public class ColumnDescriptor implements TBase, java.io.Serializable { - public byte[] name; - public int maxVersions; - public String compression; - public boolean inMemory; - public int maxValueLength; - public String bloomFilterType; - public int bloomFilterVectorSize; - public int bloomFilterNbHashes; - public boolean blockCacheEnabled; - public int timeToLive; +public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("ColumnDescriptor"); + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + private static final TField MAX_VERSIONS_FIELD_DESC = new TField("maxVersions", TType.I32, (short)2); + private static final TField COMPRESSION_FIELD_DESC = new TField("compression", TType.STRING, (short)3); + private static final TField IN_MEMORY_FIELD_DESC = new TField("inMemory", TType.BOOL, (short)4); + private static final TField MAX_VALUE_LENGTH_FIELD_DESC = new TField("maxValueLength", TType.I32, (short)5); + private static final TField BLOOM_FILTER_TYPE_FIELD_DESC = new TField("bloomFilterType", TType.STRING, (short)6); + private static final TField BLOOM_FILTER_VECTOR_SIZE_FIELD_DESC = new TField("bloomFilterVectorSize", TType.I32, (short)7); + private static final TField BLOOM_FILTER_NB_HASHES_FIELD_DESC = new TField("bloomFilterNbHashes", TType.I32, (short)8); + private static final TField BLOCK_CACHE_ENABLED_FIELD_DESC = new TField("blockCacheEnabled", TType.BOOL, (short)9); + private static final TField TIME_TO_LIVE_FIELD_DESC = new TField("timeToLive", TType.I32, (short)10); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean name = false; + public byte[] name; + public static final int NAME = 1; + public int maxVersions; + public static final int MAXVERSIONS = 2; + public String compression; + public static final int COMPRESSION = 3; + public boolean inMemory; + public static final int INMEMORY = 4; + public int maxValueLength; + public static final int MAXVALUELENGTH = 5; + public String bloomFilterType; + public static final int BLOOMFILTERTYPE = 6; + public int bloomFilterVectorSize; + public static final int BLOOMFILTERVECTORSIZE = 7; + public int bloomFilterNbHashes; + public static final int BLOOMFILTERNBHASHES = 8; + public boolean blockCacheEnabled; + public static final int BLOCKCACHEENABLED = 9; + public int timeToLive; + public static final int TIMETOLIVE = 10; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean maxVersions = false; - public boolean compression = false; public boolean inMemory = false; public boolean maxValueLength = false; - public boolean bloomFilterType = false; public boolean bloomFilterVectorSize = false; public boolean bloomFilterNbHashes = false; public boolean blockCacheEnabled = false; public boolean timeToLive = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(MAXVERSIONS, new FieldMetaData("maxVersions", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(COMPRESSION, new FieldMetaData("compression", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(INMEMORY, new FieldMetaData("inMemory", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(MAXVALUELENGTH, new FieldMetaData("maxValueLength", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(BLOOMFILTERTYPE, new FieldMetaData("bloomFilterType", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(BLOOMFILTERVECTORSIZE, new FieldMetaData("bloomFilterVectorSize", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(BLOOMFILTERNBHASHES, new FieldMetaData("bloomFilterNbHashes", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(BLOCKCACHEENABLED, new FieldMetaData("blockCacheEnabled", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(TIMETOLIVE, new FieldMetaData("timeToLive", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(ColumnDescriptor.class, metaDataMap); + } + public ColumnDescriptor() { this.maxVersions = 3; @@ -100,17 +146,14 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { { this(); this.name = name; - this.__isset.name = true; this.maxVersions = maxVersions; this.__isset.maxVersions = true; this.compression = compression; - this.__isset.compression = true; this.inMemory = inMemory; this.__isset.inMemory = true; this.maxValueLength = maxValueLength; this.__isset.maxValueLength = true; this.bloomFilterType = bloomFilterType; - this.__isset.bloomFilterType = true; this.bloomFilterVectorSize = bloomFilterVectorSize; this.__isset.bloomFilterVectorSize = true; this.bloomFilterNbHashes = bloomFilterNbHashes; @@ -121,6 +164,416 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { this.__isset.timeToLive = true; } + /** + * Performs a deep copy on other. + */ + public ColumnDescriptor(ColumnDescriptor other) { + if (other.isSetName()) { + this.name = other.name; + } + __isset.maxVersions = other.__isset.maxVersions; + this.maxVersions = other.maxVersions; + if (other.isSetCompression()) { + this.compression = other.compression; + } + __isset.inMemory = other.__isset.inMemory; + this.inMemory = other.inMemory; + __isset.maxValueLength = other.__isset.maxValueLength; + this.maxValueLength = other.maxValueLength; + if (other.isSetBloomFilterType()) { + this.bloomFilterType = other.bloomFilterType; + } + __isset.bloomFilterVectorSize = other.__isset.bloomFilterVectorSize; + this.bloomFilterVectorSize = other.bloomFilterVectorSize; + __isset.bloomFilterNbHashes = other.__isset.bloomFilterNbHashes; + this.bloomFilterNbHashes = other.bloomFilterNbHashes; + __isset.blockCacheEnabled = other.__isset.blockCacheEnabled; + this.blockCacheEnabled = other.blockCacheEnabled; + __isset.timeToLive = other.__isset.timeToLive; + this.timeToLive = other.timeToLive; + } + + @Override + public ColumnDescriptor clone() { + return new ColumnDescriptor(this); + } + + public byte[] getName() { + return this.name; + } + + public void setName(byte[] name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + // Returns true if field name is set (has been asigned a value) and false otherwise + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public int getMaxVersions() { + return this.maxVersions; + } + + public void setMaxVersions(int maxVersions) { + this.maxVersions = maxVersions; + this.__isset.maxVersions = true; + } + + public void unsetMaxVersions() { + this.__isset.maxVersions = false; + } + + // Returns true if field maxVersions is set (has been asigned a value) and false otherwise + public boolean isSetMaxVersions() { + return this.__isset.maxVersions; + } + + public void setMaxVersionsIsSet(boolean value) { + this.__isset.maxVersions = value; + } + + public String getCompression() { + return this.compression; + } + + public void setCompression(String compression) { + this.compression = compression; + } + + public void unsetCompression() { + this.compression = null; + } + + // Returns true if field compression is set (has been asigned a value) and false otherwise + public boolean isSetCompression() { + return this.compression != null; + } + + public void setCompressionIsSet(boolean value) { + if (!value) { + this.compression = null; + } + } + + public boolean isInMemory() { + return this.inMemory; + } + + public void setInMemory(boolean inMemory) { + this.inMemory = inMemory; + this.__isset.inMemory = true; + } + + public void unsetInMemory() { + this.__isset.inMemory = false; + } + + // Returns true if field inMemory is set (has been asigned a value) and false otherwise + public boolean isSetInMemory() { + return this.__isset.inMemory; + } + + public void setInMemoryIsSet(boolean value) { + this.__isset.inMemory = value; + } + + public int getMaxValueLength() { + return this.maxValueLength; + } + + public void setMaxValueLength(int maxValueLength) { + this.maxValueLength = maxValueLength; + this.__isset.maxValueLength = true; + } + + public void unsetMaxValueLength() { + this.__isset.maxValueLength = false; + } + + // Returns true if field maxValueLength is set (has been asigned a value) and false otherwise + public boolean isSetMaxValueLength() { + return this.__isset.maxValueLength; + } + + public void setMaxValueLengthIsSet(boolean value) { + this.__isset.maxValueLength = value; + } + + public String getBloomFilterType() { + return this.bloomFilterType; + } + + public void setBloomFilterType(String bloomFilterType) { + this.bloomFilterType = bloomFilterType; + } + + public void unsetBloomFilterType() { + this.bloomFilterType = null; + } + + // Returns true if field bloomFilterType is set (has been asigned a value) and false otherwise + public boolean isSetBloomFilterType() { + return this.bloomFilterType != null; + } + + public void setBloomFilterTypeIsSet(boolean value) { + if (!value) { + this.bloomFilterType = null; + } + } + + public int getBloomFilterVectorSize() { + return this.bloomFilterVectorSize; + } + + public void setBloomFilterVectorSize(int bloomFilterVectorSize) { + this.bloomFilterVectorSize = bloomFilterVectorSize; + this.__isset.bloomFilterVectorSize = true; + } + + public void unsetBloomFilterVectorSize() { + this.__isset.bloomFilterVectorSize = false; + } + + // Returns true if field bloomFilterVectorSize is set (has been asigned a value) and false otherwise + public boolean isSetBloomFilterVectorSize() { + return this.__isset.bloomFilterVectorSize; + } + + public void setBloomFilterVectorSizeIsSet(boolean value) { + this.__isset.bloomFilterVectorSize = value; + } + + public int getBloomFilterNbHashes() { + return this.bloomFilterNbHashes; + } + + public void setBloomFilterNbHashes(int bloomFilterNbHashes) { + this.bloomFilterNbHashes = bloomFilterNbHashes; + this.__isset.bloomFilterNbHashes = true; + } + + public void unsetBloomFilterNbHashes() { + this.__isset.bloomFilterNbHashes = false; + } + + // Returns true if field bloomFilterNbHashes is set (has been asigned a value) and false otherwise + public boolean isSetBloomFilterNbHashes() { + return this.__isset.bloomFilterNbHashes; + } + + public void setBloomFilterNbHashesIsSet(boolean value) { + this.__isset.bloomFilterNbHashes = value; + } + + public boolean isBlockCacheEnabled() { + return this.blockCacheEnabled; + } + + public void setBlockCacheEnabled(boolean blockCacheEnabled) { + this.blockCacheEnabled = blockCacheEnabled; + this.__isset.blockCacheEnabled = true; + } + + public void unsetBlockCacheEnabled() { + this.__isset.blockCacheEnabled = false; + } + + // Returns true if field blockCacheEnabled is set (has been asigned a value) and false otherwise + public boolean isSetBlockCacheEnabled() { + return this.__isset.blockCacheEnabled; + } + + public void setBlockCacheEnabledIsSet(boolean value) { + this.__isset.blockCacheEnabled = value; + } + + public int getTimeToLive() { + return this.timeToLive; + } + + public void setTimeToLive(int timeToLive) { + this.timeToLive = timeToLive; + this.__isset.timeToLive = true; + } + + public void unsetTimeToLive() { + this.__isset.timeToLive = false; + } + + // Returns true if field timeToLive is set (has been asigned a value) and false otherwise + public boolean isSetTimeToLive() { + return this.__isset.timeToLive; + } + + public void setTimeToLiveIsSet(boolean value) { + this.__isset.timeToLive = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((byte[])value); + } + break; + + case MAXVERSIONS: + if (value == null) { + unsetMaxVersions(); + } else { + setMaxVersions((Integer)value); + } + break; + + case COMPRESSION: + if (value == null) { + unsetCompression(); + } else { + setCompression((String)value); + } + break; + + case INMEMORY: + if (value == null) { + unsetInMemory(); + } else { + setInMemory((Boolean)value); + } + break; + + case MAXVALUELENGTH: + if (value == null) { + unsetMaxValueLength(); + } else { + setMaxValueLength((Integer)value); + } + break; + + case BLOOMFILTERTYPE: + if (value == null) { + unsetBloomFilterType(); + } else { + setBloomFilterType((String)value); + } + break; + + case BLOOMFILTERVECTORSIZE: + if (value == null) { + unsetBloomFilterVectorSize(); + } else { + setBloomFilterVectorSize((Integer)value); + } + break; + + case BLOOMFILTERNBHASHES: + if (value == null) { + unsetBloomFilterNbHashes(); + } else { + setBloomFilterNbHashes((Integer)value); + } + break; + + case BLOCKCACHEENABLED: + if (value == null) { + unsetBlockCacheEnabled(); + } else { + setBlockCacheEnabled((Boolean)value); + } + break; + + case TIMETOLIVE: + if (value == null) { + unsetTimeToLive(); + } else { + setTimeToLive((Integer)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case NAME: + return getName(); + + case MAXVERSIONS: + return new Integer(getMaxVersions()); + + case COMPRESSION: + return getCompression(); + + case INMEMORY: + return new Boolean(isInMemory()); + + case MAXVALUELENGTH: + return new Integer(getMaxValueLength()); + + case BLOOMFILTERTYPE: + return getBloomFilterType(); + + case BLOOMFILTERVECTORSIZE: + return new Integer(getBloomFilterVectorSize()); + + case BLOOMFILTERNBHASHES: + return new Integer(getBloomFilterNbHashes()); + + case BLOCKCACHEENABLED: + return new Boolean(isBlockCacheEnabled()); + + case TIMETOLIVE: + return new Integer(getTimeToLive()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case NAME: + return isSetName(); + case MAXVERSIONS: + return isSetMaxVersions(); + case COMPRESSION: + return isSetCompression(); + case INMEMORY: + return isSetInMemory(); + case MAXVALUELENGTH: + return isSetMaxValueLength(); + case BLOOMFILTERTYPE: + return isSetBloomFilterType(); + case BLOOMFILTERVECTORSIZE: + return isSetBloomFilterVectorSize(); + case BLOOMFILTERNBHASHES: + return isSetBloomFilterNbHashes(); + case BLOCKCACHEENABLED: + return isSetBlockCacheEnabled(); + case TIMETOLIVE: + return isSetTimeToLive(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -133,8 +586,8 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { if (that == null) return false; - boolean this_present_name = true && (this.name != null); - boolean that_present_name = true && (that.name != null); + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; @@ -151,8 +604,8 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { return false; } - boolean this_present_compression = true && (this.compression != null); - boolean that_present_compression = true && (that.compression != null); + boolean this_present_compression = true && this.isSetCompression(); + boolean that_present_compression = true && that.isSetCompression(); if (this_present_compression || that_present_compression) { if (!(this_present_compression && that_present_compression)) return false; @@ -178,8 +631,8 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { return false; } - boolean this_present_bloomFilterType = true && (this.bloomFilterType != null); - boolean that_present_bloomFilterType = true && (that.bloomFilterType != null); + boolean this_present_bloomFilterType = true && this.isSetBloomFilterType(); + boolean that_present_bloomFilterType = true && that.isSetBloomFilterType(); if (this_present_bloomFilterType || that_present_bloomFilterType) { if (!(this_present_bloomFilterType && that_present_bloomFilterType)) return false; @@ -226,6 +679,7 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { return true; } + @Override public int hashCode() { return 0; } @@ -241,15 +695,14 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { } switch (field.id) { - case 1: + case NAME: if (field.type == TType.STRING) { this.name = iprot.readBinary(); - this.__isset.name = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case MAXVERSIONS: if (field.type == TType.I32) { this.maxVersions = iprot.readI32(); this.__isset.maxVersions = true; @@ -257,15 +710,14 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case COMPRESSION: if (field.type == TType.STRING) { this.compression = iprot.readString(); - this.__isset.compression = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: + case INMEMORY: if (field.type == TType.BOOL) { this.inMemory = iprot.readBool(); this.__isset.inMemory = true; @@ -273,7 +725,7 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { TProtocolUtil.skip(iprot, field.type); } break; - case 5: + case MAXVALUELENGTH: if (field.type == TType.I32) { this.maxValueLength = iprot.readI32(); this.__isset.maxValueLength = true; @@ -281,15 +733,14 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { TProtocolUtil.skip(iprot, field.type); } break; - case 6: + case BLOOMFILTERTYPE: if (field.type == TType.STRING) { this.bloomFilterType = iprot.readString(); - this.__isset.bloomFilterType = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 7: + case BLOOMFILTERVECTORSIZE: if (field.type == TType.I32) { this.bloomFilterVectorSize = iprot.readI32(); this.__isset.bloomFilterVectorSize = true; @@ -297,7 +748,7 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { TProtocolUtil.skip(iprot, field.type); } break; - case 8: + case BLOOMFILTERNBHASHES: if (field.type == TType.I32) { this.bloomFilterNbHashes = iprot.readI32(); this.__isset.bloomFilterNbHashes = true; @@ -305,7 +756,7 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { TProtocolUtil.skip(iprot, field.type); } break; - case 9: + case BLOCKCACHEENABLED: if (field.type == TType.BOOL) { this.blockCacheEnabled = iprot.readBool(); this.__isset.blockCacheEnabled = true; @@ -313,7 +764,7 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { TProtocolUtil.skip(iprot, field.type); } break; - case 10: + case TIMETOLIVE: if (field.type == TType.I32) { this.timeToLive = iprot.readI32(); this.__isset.timeToLive = true; @@ -328,107 +779,120 @@ public class ColumnDescriptor implements TBase, java.io.Serializable { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("ColumnDescriptor"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.name != null) { - field.name = "name"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeBinary(this.name); oprot.writeFieldEnd(); } - field.name = "maxVersions"; - field.type = TType.I32; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC); oprot.writeI32(this.maxVersions); oprot.writeFieldEnd(); if (this.compression != null) { - field.name = "compression"; - field.type = TType.STRING; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COMPRESSION_FIELD_DESC); oprot.writeString(this.compression); oprot.writeFieldEnd(); } - field.name = "inMemory"; - field.type = TType.BOOL; - field.id = 4; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(IN_MEMORY_FIELD_DESC); oprot.writeBool(this.inMemory); oprot.writeFieldEnd(); - field.name = "maxValueLength"; - field.type = TType.I32; - field.id = 5; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(MAX_VALUE_LENGTH_FIELD_DESC); oprot.writeI32(this.maxValueLength); oprot.writeFieldEnd(); if (this.bloomFilterType != null) { - field.name = "bloomFilterType"; - field.type = TType.STRING; - field.id = 6; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(BLOOM_FILTER_TYPE_FIELD_DESC); oprot.writeString(this.bloomFilterType); oprot.writeFieldEnd(); } - field.name = "bloomFilterVectorSize"; - field.type = TType.I32; - field.id = 7; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(BLOOM_FILTER_VECTOR_SIZE_FIELD_DESC); oprot.writeI32(this.bloomFilterVectorSize); oprot.writeFieldEnd(); - field.name = "bloomFilterNbHashes"; - field.type = TType.I32; - field.id = 8; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(BLOOM_FILTER_NB_HASHES_FIELD_DESC); oprot.writeI32(this.bloomFilterNbHashes); oprot.writeFieldEnd(); - field.name = "blockCacheEnabled"; - field.type = TType.BOOL; - field.id = 9; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(BLOCK_CACHE_ENABLED_FIELD_DESC); oprot.writeBool(this.blockCacheEnabled); oprot.writeFieldEnd(); - field.name = "timeToLive"; - field.type = TType.I32; - field.id = 10; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TIME_TO_LIVE_FIELD_DESC); oprot.writeI32(this.timeToLive); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("ColumnDescriptor("); + boolean first = true; + sb.append("name:"); - sb.append(this.name); - sb.append(",maxVersions:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("maxVersions:"); sb.append(this.maxVersions); - sb.append(",compression:"); - sb.append(this.compression); - sb.append(",inMemory:"); + first = false; + if (!first) sb.append(", "); + sb.append("compression:"); + if (this.compression == null) { + sb.append("null"); + } else { + sb.append(this.compression); + } + first = false; + if (!first) sb.append(", "); + sb.append("inMemory:"); sb.append(this.inMemory); - sb.append(",maxValueLength:"); + first = false; + if (!first) sb.append(", "); + sb.append("maxValueLength:"); sb.append(this.maxValueLength); - sb.append(",bloomFilterType:"); - sb.append(this.bloomFilterType); - sb.append(",bloomFilterVectorSize:"); + first = false; + if (!first) sb.append(", "); + sb.append("bloomFilterType:"); + if (this.bloomFilterType == null) { + sb.append("null"); + } else { + sb.append(this.bloomFilterType); + } + first = false; + if (!first) sb.append(", "); + sb.append("bloomFilterVectorSize:"); sb.append(this.bloomFilterVectorSize); - sb.append(",bloomFilterNbHashes:"); + first = false; + if (!first) sb.append(", "); + sb.append("bloomFilterNbHashes:"); sb.append(this.bloomFilterNbHashes); - sb.append(",blockCacheEnabled:"); + first = false; + if (!first) sb.append(", "); + sb.append("blockCacheEnabled:"); sb.append(this.blockCacheEnabled); - sb.append(",timeToLive:"); + first = false; + if (!first) sb.append(", "); + sb.append("timeToLive:"); sb.append(this.timeToLive); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/Constants.java b/src/java/org/apache/hadoop/hbase/thrift/generated/Constants.java deleted file mode 100644 index 1f73410c7ef..00000000000 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/Constants.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hbase.thrift.generated; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import com.facebook.thrift.*; - -public class Constants { - -} diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java b/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java index 29d792006bd..d30e680f903 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * Autogenerated by Thrift * @@ -29,10 +28,11 @@ import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; -import com.facebook.thrift.*; +import java.util.Collections; -import com.facebook.thrift.protocol.*; -import com.facebook.thrift.transport.*; +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; public class Hbase { @@ -41,6 +41,8 @@ public class Hbase { /** * Brings a table on-line (enables it) * @param tableName name of the table + * + * @param tableName */ public void enableTable(byte[] tableName) throws IOError, TException; @@ -48,12 +50,16 @@ public class Hbase { * Disables a table (takes it off-line) If it is being served, the master * will tell the servers to stop serving it. * @param tableName name of the table + * + * @param tableName */ public void disableTable(byte[] tableName) throws IOError, TException; /** * @param tableName name of table to check * @return true if table is on-line + * + * @param tableName */ public boolean isTableEnabled(byte[] tableName) throws IOError, TException; @@ -71,6 +77,8 @@ public class Hbase { * List all the column families assoicated with a table. * @param tableName table name * @return list of column family descriptors + * + * @param tableName */ public Map getColumnDescriptors(byte[] tableName) throws IOError, TException; @@ -78,6 +86,8 @@ public class Hbase { * List the regions associated with a table. * @param tableName table name * @return list of region descriptors + * + * @param tableName */ public List getTableRegions(byte[] tableName) throws IOError, TException; @@ -92,26 +102,36 @@ public class Hbase { * * @throws IllegalArgument if an input parameter is invalid * @throws AlreadyExists if the table name already exists + * + * @param tableName + * @param columnFamilies */ public void createTable(byte[] tableName, List columnFamilies) throws IOError, IllegalArgument, AlreadyExists, TException; /** * Deletes a table * @param tableName name of table to delete - * @throws NotFound if table doesn't exist on server + * @throws IOError if table doesn't exist on server or there was some other + * problem + * + * @param tableName */ - public void deleteTable(byte[] tableName) throws IOError, NotFound, TException; + public void deleteTable(byte[] tableName) throws IOError, TException; /** * Get a single TCell for the specified table, row, and column at the - * latest timestamp. + * latest timestamp. Returns an empty list if no such value exists. * * @param tableName name of table * @param row row key * @param column column name * @return value for specified row/column + * + * @param tableName + * @param row + * @param column */ - public TCell get(byte[] tableName, byte[] row, byte[] column) throws IOError, NotFound, TException; + public List get(byte[] tableName, byte[] row, byte[] column) throws IOError, TException; /** * Get the specified number of versions for the specified table, @@ -122,8 +142,13 @@ public class Hbase { * @param column column name * @param numVersions number of versions to retrieve * @return list of cells for specified row/column + * + * @param tableName + * @param row + * @param column + * @param numVersions */ - public List getVer(byte[] tableName, byte[] row, byte[] column, int numVersions) throws IOError, NotFound, TException; + public List getVer(byte[] tableName, byte[] row, byte[] column, int numVersions) throws IOError, TException; /** * Get the specified number of versions for the specified table, @@ -136,55 +161,73 @@ public class Hbase { * @param timestamp timestamp * @param numVersions number of versions to retrieve * @return list of cells for specified row/column + * + * @param tableName + * @param row + * @param column + * @param timestamp + * @param numVersions */ - public List getVerTs(byte[] tableName, byte[] row, byte[] column, long timestamp, int numVersions) throws IOError, NotFound, TException; + public List getVerTs(byte[] tableName, byte[] row, byte[] column, long timestamp, int numVersions) throws IOError, TException; /** * Get all the data for the specified table and row at the latest - * timestamp. + * timestamp. Returns an empty list if the row does not exist. * * @param tableName name of table * @param row row key * @return TRowResult containing the row and map of columns to TCells - * @throws NotFound if the row does not exist + * + * @param tableName + * @param row */ - public TRowResult getRow(byte[] tableName, byte[] row) throws IOError, NotFound, TException; + public List getRow(byte[] tableName, byte[] row) throws IOError, TException; /** * Get the specified columns for the specified table and row at the latest - * timestamp. + * timestamp. Returns an empty list if the row does not exist. * * @param tableName name of table * @param row row key * @param columns List of columns to return, null for all columns * @return TRowResult containing the row and map of columns to TCells - * @throws NotFound if the row does not exist + * + * @param tableName + * @param row + * @param columns */ - public TRowResult getRowWithColumns(byte[] tableName, byte[] row, List columns) throws IOError, NotFound, TException; + public List getRowWithColumns(byte[] tableName, byte[] row, List columns) throws IOError, TException; /** * Get all the data for the specified table and row at the specified - * timestamp. + * timestamp. Returns an empty list if the row does not exist. * * @param tableName of table * @param row row key * @param timestamp timestamp * @return TRowResult containing the row and map of columns to TCells - * @throws NotFound if the row does not exist + * + * @param tableName + * @param row + * @param timestamp */ - public TRowResult getRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, NotFound, TException; + public List getRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, TException; /** * Get the specified columns for the specified table and row at the specified - * timestamp. + * timestamp. Returns an empty list if the row does not exist. * * @param tableName name of table * @param row row key * @param columns List of columns to return, null for all columns * @return TRowResult containing the row and map of columns to TCells - * @throws NotFound if the row does not exist + * + * @param tableName + * @param row + * @param columns + * @param timestamp */ - public TRowResult getRowWithColumnsTs(byte[] tableName, byte[] row, List columns, long timestamp) throws IOError, NotFound, TException; + public List getRowWithColumnsTs(byte[] tableName, byte[] row, List columns, long timestamp) throws IOError, TException; /** * Apply a series of mutations (updates/deletes) to a row in a @@ -195,6 +238,10 @@ public class Hbase { * @param tableName name of table * @param row row key * @param mutations list of mutation commands + * + * @param tableName + * @param row + * @param mutations */ public void mutateRow(byte[] tableName, byte[] row, List mutations) throws IOError, IllegalArgument, TException; @@ -208,6 +255,11 @@ public class Hbase { * @param row row key * @param mutations list of mutation commands * @param timestamp timestamp + * + * @param tableName + * @param row + * @param mutations + * @param timestamp */ public void mutateRowTs(byte[] tableName, byte[] row, List mutations, long timestamp) throws IOError, IllegalArgument, TException; @@ -219,6 +271,9 @@ public class Hbase { * * @param tableName name of table * @param rowBatches list of row batches + * + * @param tableName + * @param rowBatches */ public void mutateRows(byte[] tableName, List rowBatches) throws IOError, IllegalArgument, TException; @@ -231,17 +286,37 @@ public class Hbase { * @param tableName name of table * @param rowBatches list of row batches * @param timestamp timestamp + * + * @param tableName + * @param rowBatches + * @param timestamp */ public void mutateRowsTs(byte[] tableName, List rowBatches, long timestamp) throws IOError, IllegalArgument, TException; + /** + * Atomically increment the column value specified. Returns the next value post increment. + * @param tableName name of table + * @param row row to increment + * @param column name of column + * @param value amount to increment by + * + * @param tableName + * @param row + * @param column + * @param value + */ public long atomicIncrement(byte[] tableName, byte[] row, byte[] column, long value) throws IOError, IllegalArgument, TException; - + /** * Delete all cells that match the passed row and column. * * @param tableName name of table * @param row Row to update * @param column name of column whose value is to be deleted + * + * @param tableName + * @param row + * @param column */ public void deleteAll(byte[] tableName, byte[] row, byte[] column) throws IOError, TException; @@ -253,6 +328,11 @@ public class Hbase { * @param row Row to update * @param column name of column whose value is to be deleted * @param timestamp timestamp + * + * @param tableName + * @param row + * @param column + * @param timestamp */ public void deleteAllTs(byte[] tableName, byte[] row, byte[] column, long timestamp) throws IOError, TException; @@ -261,6 +341,9 @@ public class Hbase { * * @param tableName name of table * @param row key of the row to be completely deleted. + * + * @param tableName + * @param row */ public void deleteAllRow(byte[] tableName, byte[] row) throws IOError, TException; @@ -271,6 +354,10 @@ public class Hbase { * @param tableName name of table * @param row key of the row to be completely deleted. * @param timestamp timestamp + * + * @param tableName + * @param row + * @param timestamp */ public void deleteAllRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, TException; @@ -286,6 +373,10 @@ public class Hbase { * start at the first row. * * @return scanner id to be used with other scanner procedures + * + * @param tableName + * @param startRow + * @param columns */ public int scannerOpen(byte[] tableName, byte[] startRow, List columns) throws IOError, TException; @@ -304,6 +395,11 @@ public class Hbase { * scanner's results * * @return scanner id to be used with other scanner procedures + * + * @param tableName + * @param startRow + * @param stopRow + * @param columns */ public int scannerOpenWithStop(byte[] tableName, byte[] startRow, byte[] stopRow, List columns) throws IOError, TException; @@ -321,6 +417,11 @@ public class Hbase { * @param timestamp timestamp * * @return scanner id to be used with other scanner procedures + * + * @param tableName + * @param startRow + * @param columns + * @param timestamp */ public int scannerOpenTs(byte[] tableName, byte[] startRow, List columns, long timestamp) throws IOError, TException; @@ -341,6 +442,12 @@ public class Hbase { * @param timestamp timestamp * * @return scanner id to be used with other scanner procedures + * + * @param tableName + * @param startRow + * @param stopRow + * @param columns + * @param timestamp */ public int scannerOpenWithStopTs(byte[] tableName, byte[] startRow, byte[] stopRow, List columns, long timestamp) throws IOError, TException; @@ -348,20 +455,24 @@ public class Hbase { * Returns the scanner's current row value and advances to the next * row in the table. When there are no more rows in the table, or a key * greater-than-or-equal-to the scanner's specified stopRow is reached, - * a NotFound exception is returned. + * an empty list is returned. * * @param id id of a scanner returned by scannerOpen * @return a TRowResult containing the current row and a map of the columns to TCells. * @throws IllegalArgument if ScannerID is invalid * @throws NotFound when the scanner reaches the end + * + * @param id */ - public TRowResult scannerGet(int id) throws IOError, IllegalArgument, NotFound, TException; + public List scannerGet(int id) throws IOError, IllegalArgument, TException; /** * Closes the server-state associated with an open scanner. * * @param id id of a scanner returned by scannerOpen * @throws IllegalArgument if ScannerID is invalid + * + * @param id */ public void scannerClose(int id) throws IOError, IllegalArgument, TException; @@ -421,7 +532,7 @@ public class Hbase { enableTable_result result = new enableTable_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } return; @@ -454,7 +565,7 @@ public class Hbase { disableTable_result result = new disableTable_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } return; @@ -487,10 +598,10 @@ public class Hbase { isTableEnabled_result result = new isTableEnabled_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "isTableEnabled failed: unknown result"); @@ -523,7 +634,7 @@ public class Hbase { compact_result result = new compact_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } return; @@ -556,7 +667,7 @@ public class Hbase { majorCompact_result result = new majorCompact_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } return; @@ -588,10 +699,10 @@ public class Hbase { getTableNames_result result = new getTableNames_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTableNames failed: unknown result"); @@ -624,10 +735,10 @@ public class Hbase { getColumnDescriptors_result result = new getColumnDescriptors_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "getColumnDescriptors failed: unknown result"); @@ -660,10 +771,10 @@ public class Hbase { getTableRegions_result result = new getTableRegions_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTableRegions failed: unknown result"); @@ -697,19 +808,19 @@ public class Hbase { createTable_result result = new createTable_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.ia) { + if (result.ia != null) { throw result.ia; } - if (result.__isset.exist) { + if (result.exist != null) { throw result.exist; } return; } - public void deleteTable(byte[] tableName) throws IOError, NotFound, TException + public void deleteTable(byte[] tableName) throws IOError, TException { send_deleteTable(tableName); recv_deleteTable(); @@ -725,7 +836,7 @@ public class Hbase { oprot_.getTransport().flush(); } - public void recv_deleteTable() throws IOError, NotFound, TException + public void recv_deleteTable() throws IOError, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { @@ -736,16 +847,13 @@ public class Hbase { deleteTable_result result = new deleteTable_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.nf) { - throw result.nf; - } return; } - public TCell get(byte[] tableName, byte[] row, byte[] column) throws IOError, NotFound, TException + public List get(byte[] tableName, byte[] row, byte[] column) throws IOError, TException { send_get(tableName, row, column); return recv_get(); @@ -763,7 +871,7 @@ public class Hbase { oprot_.getTransport().flush(); } - public TCell recv_get() throws IOError, NotFound, TException + public List recv_get() throws IOError, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { @@ -774,19 +882,16 @@ public class Hbase { get_result result = new get_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.nf) { - throw result.nf; - } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get failed: unknown result"); } - public List getVer(byte[] tableName, byte[] row, byte[] column, int numVersions) throws IOError, NotFound, TException + public List getVer(byte[] tableName, byte[] row, byte[] column, int numVersions) throws IOError, TException { send_getVer(tableName, row, column, numVersions); return recv_getVer(); @@ -805,7 +910,7 @@ public class Hbase { oprot_.getTransport().flush(); } - public List recv_getVer() throws IOError, NotFound, TException + public List recv_getVer() throws IOError, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { @@ -816,19 +921,16 @@ public class Hbase { getVer_result result = new getVer_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.nf) { - throw result.nf; - } throw new TApplicationException(TApplicationException.MISSING_RESULT, "getVer failed: unknown result"); } - public List getVerTs(byte[] tableName, byte[] row, byte[] column, long timestamp, int numVersions) throws IOError, NotFound, TException + public List getVerTs(byte[] tableName, byte[] row, byte[] column, long timestamp, int numVersions) throws IOError, TException { send_getVerTs(tableName, row, column, timestamp, numVersions); return recv_getVerTs(); @@ -848,7 +950,7 @@ public class Hbase { oprot_.getTransport().flush(); } - public List recv_getVerTs() throws IOError, NotFound, TException + public List recv_getVerTs() throws IOError, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { @@ -859,19 +961,16 @@ public class Hbase { getVerTs_result result = new getVerTs_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.nf) { - throw result.nf; - } throw new TApplicationException(TApplicationException.MISSING_RESULT, "getVerTs failed: unknown result"); } - public TRowResult getRow(byte[] tableName, byte[] row) throws IOError, NotFound, TException + public List getRow(byte[] tableName, byte[] row) throws IOError, TException { send_getRow(tableName, row); return recv_getRow(); @@ -888,7 +987,7 @@ public class Hbase { oprot_.getTransport().flush(); } - public TRowResult recv_getRow() throws IOError, NotFound, TException + public List recv_getRow() throws IOError, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { @@ -899,19 +998,16 @@ public class Hbase { getRow_result result = new getRow_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.nf) { - throw result.nf; - } throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRow failed: unknown result"); } - public TRowResult getRowWithColumns(byte[] tableName, byte[] row, List columns) throws IOError, NotFound, TException + public List getRowWithColumns(byte[] tableName, byte[] row, List columns) throws IOError, TException { send_getRowWithColumns(tableName, row, columns); return recv_getRowWithColumns(); @@ -929,7 +1025,7 @@ public class Hbase { oprot_.getTransport().flush(); } - public TRowResult recv_getRowWithColumns() throws IOError, NotFound, TException + public List recv_getRowWithColumns() throws IOError, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { @@ -940,19 +1036,16 @@ public class Hbase { getRowWithColumns_result result = new getRowWithColumns_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.nf) { - throw result.nf; - } throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRowWithColumns failed: unknown result"); } - public TRowResult getRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, NotFound, TException + public List getRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, TException { send_getRowTs(tableName, row, timestamp); return recv_getRowTs(); @@ -970,7 +1063,7 @@ public class Hbase { oprot_.getTransport().flush(); } - public TRowResult recv_getRowTs() throws IOError, NotFound, TException + public List recv_getRowTs() throws IOError, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { @@ -981,19 +1074,16 @@ public class Hbase { getRowTs_result result = new getRowTs_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.nf) { - throw result.nf; - } throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRowTs failed: unknown result"); } - public TRowResult getRowWithColumnsTs(byte[] tableName, byte[] row, List columns, long timestamp) throws IOError, NotFound, TException + public List getRowWithColumnsTs(byte[] tableName, byte[] row, List columns, long timestamp) throws IOError, TException { send_getRowWithColumnsTs(tableName, row, columns, timestamp); return recv_getRowWithColumnsTs(); @@ -1012,7 +1102,7 @@ public class Hbase { oprot_.getTransport().flush(); } - public TRowResult recv_getRowWithColumnsTs() throws IOError, NotFound, TException + public List recv_getRowWithColumnsTs() throws IOError, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { @@ -1023,15 +1113,12 @@ public class Hbase { getRowWithColumnsTs_result result = new getRowWithColumnsTs_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.nf) { - throw result.nf; - } throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRowWithColumnsTs failed: unknown result"); } @@ -1064,10 +1151,10 @@ public class Hbase { mutateRow_result result = new mutateRow_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.ia) { + if (result.ia != null) { throw result.ia; } return; @@ -1103,10 +1190,10 @@ public class Hbase { mutateRowTs_result result = new mutateRowTs_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.ia) { + if (result.ia != null) { throw result.ia; } return; @@ -1140,10 +1227,10 @@ public class Hbase { mutateRows_result result = new mutateRows_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.ia) { + if (result.ia != null) { throw result.ia; } return; @@ -1178,10 +1265,10 @@ public class Hbase { mutateRowsTs_result result = new mutateRowsTs_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.ia) { + if (result.ia != null) { throw result.ia; } return; @@ -1217,18 +1304,17 @@ public class Hbase { atomicIncrement_result result = new atomicIncrement_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.ia) { + if (result.ia != null) { throw result.ia; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "atomicIncrement failed: unknown result"); } - public void deleteAll(byte[] tableName, byte[] row, byte[] column) throws IOError, TException { @@ -1259,7 +1345,7 @@ public class Hbase { deleteAll_result result = new deleteAll_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } return; @@ -1295,7 +1381,7 @@ public class Hbase { deleteAllTs_result result = new deleteAllTs_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } return; @@ -1329,7 +1415,7 @@ public class Hbase { deleteAllRow_result result = new deleteAllRow_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } return; @@ -1364,7 +1450,7 @@ public class Hbase { deleteAllRowTs_result result = new deleteAllRowTs_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } return; @@ -1399,10 +1485,10 @@ public class Hbase { scannerOpen_result result = new scannerOpen_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpen failed: unknown result"); @@ -1438,10 +1524,10 @@ public class Hbase { scannerOpenWithStop_result result = new scannerOpenWithStop_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithStop failed: unknown result"); @@ -1477,10 +1563,10 @@ public class Hbase { scannerOpenTs_result result = new scannerOpenTs_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenTs failed: unknown result"); @@ -1517,16 +1603,16 @@ public class Hbase { scannerOpenWithStopTs_result result = new scannerOpenWithStopTs_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithStopTs failed: unknown result"); } - public TRowResult scannerGet(int id) throws IOError, IllegalArgument, NotFound, TException + public List scannerGet(int id) throws IOError, IllegalArgument, TException { send_scannerGet(id); return recv_scannerGet(); @@ -1542,7 +1628,7 @@ public class Hbase { oprot_.getTransport().flush(); } - public TRowResult recv_scannerGet() throws IOError, IllegalArgument, NotFound, TException + public List recv_scannerGet() throws IOError, IllegalArgument, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { @@ -1553,18 +1639,15 @@ public class Hbase { scannerGet_result result = new scannerGet_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.success) { + if (result.isSetSuccess()) { return result.success; } - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.ia) { + if (result.ia != null) { throw result.ia; } - if (result.__isset.nf) { - throw result.nf; - } throw new TApplicationException(TApplicationException.MISSING_RESULT, "scannerGet failed: unknown result"); } @@ -1595,10 +1678,10 @@ public class Hbase { scannerClose_result result = new scannerClose_result(); result.read(iprot_); iprot_.readMessageEnd(); - if (result.__isset.io) { + if (result.io != null) { throw result.io; } - if (result.__isset.ia) { + if (result.ia != null) { throw result.ia; } return; @@ -1679,7 +1762,6 @@ public class Hbase { iface_.enableTable(args.tableName); } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("enableTable", TMessageType.REPLY, seqid)); result.write(oprot); @@ -1700,7 +1782,6 @@ public class Hbase { iface_.disableTable(args.tableName); } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("disableTable", TMessageType.REPLY, seqid)); result.write(oprot); @@ -1722,7 +1803,6 @@ public class Hbase { result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("isTableEnabled", TMessageType.REPLY, seqid)); result.write(oprot); @@ -1743,7 +1823,6 @@ public class Hbase { iface_.compact(args.tableNameOrRegionName); } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("compact", TMessageType.REPLY, seqid)); result.write(oprot); @@ -1764,7 +1843,6 @@ public class Hbase { iface_.majorCompact(args.tableNameOrRegionName); } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("majorCompact", TMessageType.REPLY, seqid)); result.write(oprot); @@ -1783,10 +1861,8 @@ public class Hbase { getTableNames_result result = new getTableNames_result(); try { result.success = iface_.getTableNames(); - result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("getTableNames", TMessageType.REPLY, seqid)); result.write(oprot); @@ -1805,10 +1881,8 @@ public class Hbase { getColumnDescriptors_result result = new getColumnDescriptors_result(); try { result.success = iface_.getColumnDescriptors(args.tableName); - result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("getColumnDescriptors", TMessageType.REPLY, seqid)); result.write(oprot); @@ -1827,10 +1901,8 @@ public class Hbase { getTableRegions_result result = new getTableRegions_result(); try { result.success = iface_.getTableRegions(args.tableName); - result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("getTableRegions", TMessageType.REPLY, seqid)); result.write(oprot); @@ -1851,13 +1923,10 @@ public class Hbase { iface_.createTable(args.tableName, args.columnFamilies); } catch (IOError io) { result.io = io; - result.__isset.io = true; } catch (IllegalArgument ia) { result.ia = ia; - result.__isset.ia = true; } catch (AlreadyExists exist) { result.exist = exist; - result.__isset.exist = true; } oprot.writeMessageBegin(new TMessage("createTable", TMessageType.REPLY, seqid)); result.write(oprot); @@ -1878,10 +1947,6 @@ public class Hbase { iface_.deleteTable(args.tableName); } catch (IOError io) { result.io = io; - result.__isset.io = true; - } catch (NotFound nf) { - result.nf = nf; - result.__isset.nf = true; } oprot.writeMessageBegin(new TMessage("deleteTable", TMessageType.REPLY, seqid)); result.write(oprot); @@ -1900,13 +1965,8 @@ public class Hbase { get_result result = new get_result(); try { result.success = iface_.get(args.tableName, args.row, args.column); - result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; - } catch (NotFound nf) { - result.nf = nf; - result.__isset.nf = true; } oprot.writeMessageBegin(new TMessage("get", TMessageType.REPLY, seqid)); result.write(oprot); @@ -1925,13 +1985,8 @@ public class Hbase { getVer_result result = new getVer_result(); try { result.success = iface_.getVer(args.tableName, args.row, args.column, args.numVersions); - result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; - } catch (NotFound nf) { - result.nf = nf; - result.__isset.nf = true; } oprot.writeMessageBegin(new TMessage("getVer", TMessageType.REPLY, seqid)); result.write(oprot); @@ -1950,13 +2005,8 @@ public class Hbase { getVerTs_result result = new getVerTs_result(); try { result.success = iface_.getVerTs(args.tableName, args.row, args.column, args.timestamp, args.numVersions); - result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; - } catch (NotFound nf) { - result.nf = nf; - result.__isset.nf = true; } oprot.writeMessageBegin(new TMessage("getVerTs", TMessageType.REPLY, seqid)); result.write(oprot); @@ -1975,13 +2025,8 @@ public class Hbase { getRow_result result = new getRow_result(); try { result.success = iface_.getRow(args.tableName, args.row); - result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; - } catch (NotFound nf) { - result.nf = nf; - result.__isset.nf = true; } oprot.writeMessageBegin(new TMessage("getRow", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2000,13 +2045,8 @@ public class Hbase { getRowWithColumns_result result = new getRowWithColumns_result(); try { result.success = iface_.getRowWithColumns(args.tableName, args.row, args.columns); - result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; - } catch (NotFound nf) { - result.nf = nf; - result.__isset.nf = true; } oprot.writeMessageBegin(new TMessage("getRowWithColumns", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2025,13 +2065,8 @@ public class Hbase { getRowTs_result result = new getRowTs_result(); try { result.success = iface_.getRowTs(args.tableName, args.row, args.timestamp); - result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; - } catch (NotFound nf) { - result.nf = nf; - result.__isset.nf = true; } oprot.writeMessageBegin(new TMessage("getRowTs", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2050,13 +2085,8 @@ public class Hbase { getRowWithColumnsTs_result result = new getRowWithColumnsTs_result(); try { result.success = iface_.getRowWithColumnsTs(args.tableName, args.row, args.columns, args.timestamp); - result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; - } catch (NotFound nf) { - result.nf = nf; - result.__isset.nf = true; } oprot.writeMessageBegin(new TMessage("getRowWithColumnsTs", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2077,10 +2107,8 @@ public class Hbase { iface_.mutateRow(args.tableName, args.row, args.mutations); } catch (IOError io) { result.io = io; - result.__isset.io = true; } catch (IllegalArgument ia) { result.ia = ia; - result.__isset.ia = true; } oprot.writeMessageBegin(new TMessage("mutateRow", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2101,10 +2129,8 @@ public class Hbase { iface_.mutateRowTs(args.tableName, args.row, args.mutations, args.timestamp); } catch (IOError io) { result.io = io; - result.__isset.io = true; } catch (IllegalArgument ia) { result.ia = ia; - result.__isset.ia = true; } oprot.writeMessageBegin(new TMessage("mutateRowTs", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2125,10 +2151,8 @@ public class Hbase { iface_.mutateRows(args.tableName, args.rowBatches); } catch (IOError io) { result.io = io; - result.__isset.io = true; } catch (IllegalArgument ia) { result.ia = ia; - result.__isset.ia = true; } oprot.writeMessageBegin(new TMessage("mutateRows", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2149,10 +2173,8 @@ public class Hbase { iface_.mutateRowsTs(args.tableName, args.rowBatches, args.timestamp); } catch (IOError io) { result.io = io; - result.__isset.io = true; } catch (IllegalArgument ia) { result.ia = ia; - result.__isset.ia = true; } oprot.writeMessageBegin(new TMessage("mutateRowsTs", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2174,10 +2196,8 @@ public class Hbase { result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; } catch (IllegalArgument ia) { result.ia = ia; - result.__isset.ia = true; } oprot.writeMessageBegin(new TMessage("atomicIncrement", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2187,7 +2207,6 @@ public class Hbase { } - private class deleteAll implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { @@ -2199,7 +2218,6 @@ public class Hbase { iface_.deleteAll(args.tableName, args.row, args.column); } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("deleteAll", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2220,7 +2238,6 @@ public class Hbase { iface_.deleteAllTs(args.tableName, args.row, args.column, args.timestamp); } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("deleteAllTs", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2241,7 +2258,6 @@ public class Hbase { iface_.deleteAllRow(args.tableName, args.row); } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("deleteAllRow", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2262,7 +2278,6 @@ public class Hbase { iface_.deleteAllRowTs(args.tableName, args.row, args.timestamp); } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("deleteAllRowTs", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2284,7 +2299,6 @@ public class Hbase { result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("scannerOpen", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2306,7 +2320,6 @@ public class Hbase { result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("scannerOpenWithStop", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2328,7 +2341,6 @@ public class Hbase { result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("scannerOpenTs", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2350,7 +2362,6 @@ public class Hbase { result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; } oprot.writeMessageBegin(new TMessage("scannerOpenWithStopTs", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2369,16 +2380,10 @@ public class Hbase { scannerGet_result result = new scannerGet_result(); try { result.success = iface_.scannerGet(args.id); - result.__isset.success = true; } catch (IOError io) { result.io = io; - result.__isset.io = true; } catch (IllegalArgument ia) { result.ia = ia; - result.__isset.ia = true; - } catch (NotFound nf) { - result.nf = nf; - result.__isset.nf = true; } oprot.writeMessageBegin(new TMessage("scannerGet", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2399,10 +2404,8 @@ public class Hbase { iface_.scannerClose(args.id); } catch (IOError io) { result.io = io; - result.__isset.io = true; } catch (IllegalArgument ia) { result.ia = ia; - result.__isset.ia = true; } oprot.writeMessageBegin(new TMessage("scannerClose", TMessageType.REPLY, seqid)); result.write(oprot); @@ -2414,12 +2417,24 @@ public class Hbase { } - public static class enableTable_args implements TBase, java.io.Serializable { - public byte[] tableName; + public static class enableTable_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("enableTable_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; + public byte[] tableName; + public static final int TABLENAME = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(enableTable_args.class, metaDataMap); } public enableTable_args() { @@ -2430,9 +2445,81 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; } + /** + * Performs a deep copy on other. + */ + public enableTable_args(enableTable_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + } + + @Override + public enableTable_args clone() { + return new enableTable_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -2445,8 +2532,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -2457,6 +2544,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -2472,10 +2560,9 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -2487,17 +2574,18 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("enableTable_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } @@ -2505,22 +2593,47 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("enableTable_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class enableTable_result implements TBase, java.io.Serializable { - public IOError io; + public static class enableTable_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("enableTable_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(enableTable_result.class, metaDataMap); } public enableTable_result() { @@ -2531,9 +2644,81 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public enableTable_result(enableTable_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public enableTable_result clone() { + return new enableTable_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -2546,8 +2731,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -2558,6 +2743,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -2573,11 +2759,10 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -2589,43 +2774,65 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("enableTable_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("enableTable_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class disableTable_args implements TBase, java.io.Serializable { - public byte[] tableName; + public static class disableTable_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("disableTable_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; + public byte[] tableName; + public static final int TABLENAME = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(disableTable_args.class, metaDataMap); } public disableTable_args() { @@ -2636,9 +2843,81 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; } + /** + * Performs a deep copy on other. + */ + public disableTable_args(disableTable_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + } + + @Override + public disableTable_args clone() { + return new disableTable_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -2651,8 +2930,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -2663,6 +2942,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -2678,10 +2958,9 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -2693,17 +2972,18 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("disableTable_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } @@ -2711,22 +2991,47 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("disableTable_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class disableTable_result implements TBase, java.io.Serializable { - public IOError io; + public static class disableTable_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("disableTable_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(disableTable_result.class, metaDataMap); } public disableTable_result() { @@ -2737,9 +3042,81 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public disableTable_result(disableTable_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public disableTable_result clone() { + return new disableTable_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -2752,8 +3129,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -2764,6 +3141,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -2779,11 +3157,10 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -2795,43 +3172,65 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("disableTable_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("disableTable_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class isTableEnabled_args implements TBase, java.io.Serializable { - public byte[] tableName; + public static class isTableEnabled_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("isTableEnabled_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; + public byte[] tableName; + public static final int TABLENAME = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(isTableEnabled_args.class, metaDataMap); } public isTableEnabled_args() { @@ -2842,9 +3241,81 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; } + /** + * Performs a deep copy on other. + */ + public isTableEnabled_args(isTableEnabled_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + } + + @Override + public isTableEnabled_args clone() { + return new isTableEnabled_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -2857,8 +3328,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -2869,6 +3340,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -2884,10 +3356,9 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -2899,17 +3370,18 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("isTableEnabled_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } @@ -2917,24 +3389,53 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("isTableEnabled_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class isTableEnabled_result implements TBase, java.io.Serializable { - public boolean success; - public IOError io; + public static class isTableEnabled_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("isTableEnabled_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { + public boolean success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean success = false; - public boolean io = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(isTableEnabled_result.class, metaDataMap); } public isTableEnabled_result() { @@ -2948,9 +3449,118 @@ public class Hbase { this.success = success; this.__isset.success = true; this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public isTableEnabled_result(isTableEnabled_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public isTableEnabled_result clone() { + return new isTableEnabled_result(this); + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + this.__isset.success = true; + } + + public void unsetSuccess() { + this.__isset.success = false; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; + } + + public void setSuccessIsSet(boolean value) { + this.__isset.success = value; + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return new Boolean(isSuccess()); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -2972,8 +3582,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -2984,6 +3594,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -2999,7 +3610,7 @@ public class Hbase { } switch (field.id) { - case 0: + case SUCCESS: if (field.type == TType.BOOL) { this.success = iprot.readBool(); this.__isset.success = true; @@ -3007,11 +3618,10 @@ public class Hbase { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -3023,52 +3633,73 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("isTableEnabled_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - field.name = "success"; - field.type = TType.BOOL; - field.id = 0; - oprot.writeFieldBegin(field); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("isTableEnabled_result("); + boolean first = true; + sb.append("success:"); sb.append(this.success); - sb.append(",io:"); - sb.append(this.io.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class compact_args implements TBase, java.io.Serializable { - public byte[] tableNameOrRegionName; + public static class compact_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("compact_args"); + private static final TField TABLE_NAME_OR_REGION_NAME_FIELD_DESC = new TField("tableNameOrRegionName", TType.STRING, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableNameOrRegionName = false; + public byte[] tableNameOrRegionName; + public static final int TABLENAMEORREGIONNAME = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAMEORREGIONNAME, new FieldMetaData("tableNameOrRegionName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(compact_args.class, metaDataMap); } public compact_args() { @@ -3079,9 +3710,81 @@ public class Hbase { { this(); this.tableNameOrRegionName = tableNameOrRegionName; - this.__isset.tableNameOrRegionName = true; } + /** + * Performs a deep copy on other. + */ + public compact_args(compact_args other) { + if (other.isSetTableNameOrRegionName()) { + this.tableNameOrRegionName = other.tableNameOrRegionName; + } + } + + @Override + public compact_args clone() { + return new compact_args(this); + } + + public byte[] getTableNameOrRegionName() { + return this.tableNameOrRegionName; + } + + public void setTableNameOrRegionName(byte[] tableNameOrRegionName) { + this.tableNameOrRegionName = tableNameOrRegionName; + } + + public void unsetTableNameOrRegionName() { + this.tableNameOrRegionName = null; + } + + // Returns true if field tableNameOrRegionName is set (has been asigned a value) and false otherwise + public boolean isSetTableNameOrRegionName() { + return this.tableNameOrRegionName != null; + } + + public void setTableNameOrRegionNameIsSet(boolean value) { + if (!value) { + this.tableNameOrRegionName = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAMEORREGIONNAME: + if (value == null) { + unsetTableNameOrRegionName(); + } else { + setTableNameOrRegionName((byte[])value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAMEORREGIONNAME: + return getTableNameOrRegionName(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAMEORREGIONNAME: + return isSetTableNameOrRegionName(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -3094,8 +3797,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableNameOrRegionName = true && (this.tableNameOrRegionName != null); - boolean that_present_tableNameOrRegionName = true && (that.tableNameOrRegionName != null); + boolean this_present_tableNameOrRegionName = true && this.isSetTableNameOrRegionName(); + boolean that_present_tableNameOrRegionName = true && that.isSetTableNameOrRegionName(); if (this_present_tableNameOrRegionName || that_present_tableNameOrRegionName) { if (!(this_present_tableNameOrRegionName && that_present_tableNameOrRegionName)) return false; @@ -3106,6 +3809,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -3121,10 +3825,9 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAMEORREGIONNAME: if (field.type == TType.STRING) { this.tableNameOrRegionName = iprot.readBinary(); - this.__isset.tableNameOrRegionName = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -3136,17 +3839,18 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("compact_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableNameOrRegionName != null) { - field.name = "tableNameOrRegionName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_OR_REGION_NAME_FIELD_DESC); oprot.writeBinary(this.tableNameOrRegionName); oprot.writeFieldEnd(); } @@ -3154,22 +3858,47 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("compact_args("); + boolean first = true; + sb.append("tableNameOrRegionName:"); - sb.append(this.tableNameOrRegionName); + if (this.tableNameOrRegionName == null) { + sb.append("null"); + } else { + sb.append(this.tableNameOrRegionName); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class compact_result implements TBase, java.io.Serializable { - public IOError io; + public static class compact_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("compact_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(compact_result.class, metaDataMap); } public compact_result() { @@ -3180,9 +3909,81 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public compact_result(compact_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public compact_result clone() { + return new compact_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -3195,8 +3996,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -3207,6 +4008,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -3222,11 +4024,10 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -3238,43 +4039,65 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("compact_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("compact_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class majorCompact_args implements TBase, java.io.Serializable { - public byte[] tableNameOrRegionName; + public static class majorCompact_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("majorCompact_args"); + private static final TField TABLE_NAME_OR_REGION_NAME_FIELD_DESC = new TField("tableNameOrRegionName", TType.STRING, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableNameOrRegionName = false; + public byte[] tableNameOrRegionName; + public static final int TABLENAMEORREGIONNAME = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAMEORREGIONNAME, new FieldMetaData("tableNameOrRegionName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(majorCompact_args.class, metaDataMap); } public majorCompact_args() { @@ -3285,9 +4108,81 @@ public class Hbase { { this(); this.tableNameOrRegionName = tableNameOrRegionName; - this.__isset.tableNameOrRegionName = true; } + /** + * Performs a deep copy on other. + */ + public majorCompact_args(majorCompact_args other) { + if (other.isSetTableNameOrRegionName()) { + this.tableNameOrRegionName = other.tableNameOrRegionName; + } + } + + @Override + public majorCompact_args clone() { + return new majorCompact_args(this); + } + + public byte[] getTableNameOrRegionName() { + return this.tableNameOrRegionName; + } + + public void setTableNameOrRegionName(byte[] tableNameOrRegionName) { + this.tableNameOrRegionName = tableNameOrRegionName; + } + + public void unsetTableNameOrRegionName() { + this.tableNameOrRegionName = null; + } + + // Returns true if field tableNameOrRegionName is set (has been asigned a value) and false otherwise + public boolean isSetTableNameOrRegionName() { + return this.tableNameOrRegionName != null; + } + + public void setTableNameOrRegionNameIsSet(boolean value) { + if (!value) { + this.tableNameOrRegionName = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAMEORREGIONNAME: + if (value == null) { + unsetTableNameOrRegionName(); + } else { + setTableNameOrRegionName((byte[])value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAMEORREGIONNAME: + return getTableNameOrRegionName(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAMEORREGIONNAME: + return isSetTableNameOrRegionName(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -3300,8 +4195,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableNameOrRegionName = true && (this.tableNameOrRegionName != null); - boolean that_present_tableNameOrRegionName = true && (that.tableNameOrRegionName != null); + boolean this_present_tableNameOrRegionName = true && this.isSetTableNameOrRegionName(); + boolean that_present_tableNameOrRegionName = true && that.isSetTableNameOrRegionName(); if (this_present_tableNameOrRegionName || that_present_tableNameOrRegionName) { if (!(this_present_tableNameOrRegionName && that_present_tableNameOrRegionName)) return false; @@ -3312,6 +4207,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -3327,10 +4223,9 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAMEORREGIONNAME: if (field.type == TType.STRING) { this.tableNameOrRegionName = iprot.readBinary(); - this.__isset.tableNameOrRegionName = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -3342,17 +4237,18 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("majorCompact_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableNameOrRegionName != null) { - field.name = "tableNameOrRegionName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_OR_REGION_NAME_FIELD_DESC); oprot.writeBinary(this.tableNameOrRegionName); oprot.writeFieldEnd(); } @@ -3360,22 +4256,47 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("majorCompact_args("); + boolean first = true; + sb.append("tableNameOrRegionName:"); - sb.append(this.tableNameOrRegionName); + if (this.tableNameOrRegionName == null) { + sb.append("null"); + } else { + sb.append(this.tableNameOrRegionName); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class majorCompact_result implements TBase, java.io.Serializable { - public IOError io; + public static class majorCompact_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("majorCompact_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(majorCompact_result.class, metaDataMap); } public majorCompact_result() { @@ -3386,9 +4307,81 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public majorCompact_result(majorCompact_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public majorCompact_result clone() { + return new majorCompact_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -3401,8 +4394,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -3413,6 +4406,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -3428,11 +4422,10 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -3444,41 +4437,94 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("majorCompact_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("majorCompact_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class getTableNames_args implements TBase, java.io.Serializable { + public static class getTableNames_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getTableNames_args"); + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + }}); + + static { + FieldMetaData.addStructMetaDataMap(getTableNames_args.class, metaDataMap); + } + public getTableNames_args() { } + /** + * Performs a deep copy on other. + */ + public getTableNames_args(getTableNames_args other) { + } + + @Override + public getTableNames_args clone() { + return new getTableNames_args(this); + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -3494,6 +4540,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -3516,31 +4563,60 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getTableNames_args"); - oprot.writeStructBegin(struct); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getTableNames_args("); + boolean first = true; + sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class getTableNames_result implements TBase, java.io.Serializable { - public List success; - public IOError io; + public static class getTableNames_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getTableNames_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean success = false; - public boolean io = false; + public List success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getTableNames_result.class, metaDataMap); } public getTableNames_result() { @@ -3552,11 +4628,140 @@ public class Hbase { { this(); this.success = success; - this.__isset.success = true; this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public getTableNames_result(getTableNames_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (byte[] other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public getTableNames_result clone() { + return new getTableNames_result(this); + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(byte[] elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned 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 void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -3569,8 +4774,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_success = true && (this.success != null); - boolean that_present_success = true && (that.success != null); + 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; @@ -3578,8 +4783,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -3590,6 +4795,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -3605,29 +4811,27 @@ public class Hbase { } switch (field.id) { - case 0: + case SUCCESS: if (field.type == TType.LIST) { { TList _list9 = iprot.readListBegin(); this.success = new ArrayList(_list9.size); for (int _i10 = 0; _i10 < _list9.size; ++_i10) { - byte[] _elem11 = null; + byte[] _elem11; _elem11 = iprot.readBinary(); this.success.add(_elem11); } iprot.readListEnd(); } - this.__isset.success = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -3639,60 +4843,83 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getTableNames_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - if (this.success != null) { - field.name = "success"; - field.type = TType.LIST; - field.id = 0; - oprot.writeFieldBegin(field); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (byte[] _iter12 : this.success) { - oprot.writeBinary(_iter12); - } - oprot.writeListEnd(); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (byte[] _iter12 : this.success) { + oprot.writeBinary(_iter12); } - oprot.writeFieldEnd(); - } - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); + oprot.writeListEnd(); } + oprot.writeFieldEnd(); + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getTableNames_result("); + boolean first = true; + sb.append("success:"); - sb.append(this.success); - sb.append(",io:"); - sb.append(this.io.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class getColumnDescriptors_args implements TBase, java.io.Serializable { - public byte[] tableName; + public static class getColumnDescriptors_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getColumnDescriptors_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; + public byte[] tableName; + public static final int TABLENAME = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getColumnDescriptors_args.class, metaDataMap); } public getColumnDescriptors_args() { @@ -3703,9 +4930,81 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; } + /** + * Performs a deep copy on other. + */ + public getColumnDescriptors_args(getColumnDescriptors_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + } + + @Override + public getColumnDescriptors_args clone() { + return new getColumnDescriptors_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -3718,8 +5017,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -3730,6 +5029,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -3745,10 +5045,9 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -3760,17 +5059,18 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getColumnDescriptors_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } @@ -3778,24 +5078,54 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getColumnDescriptors_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class getColumnDescriptors_result implements TBase, java.io.Serializable { - public Map success; - public IOError io; + public static class getColumnDescriptors_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getColumnDescriptors_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean success = false; - public boolean io = false; + public Map success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new StructMetaData(TType.STRUCT, ColumnDescriptor.class)))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getColumnDescriptors_result.class, metaDataMap); } public getColumnDescriptors_result() { @@ -3807,11 +5137,144 @@ public class Hbase { { this(); this.success = success; - this.__isset.success = true; this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public getColumnDescriptors_result(getColumnDescriptors_result other) { + if (other.isSetSuccess()) { + Map __this__success = new HashMap(); + for (Map.Entry other_element : other.success.entrySet()) { + + byte[] other_element_key = other_element.getKey(); + ColumnDescriptor other_element_value = other_element.getValue(); + + byte[] __this__success_copy_key = other_element_key; + + ColumnDescriptor __this__success_copy_value = new ColumnDescriptor(other_element_value); + + __this__success.put(__this__success_copy_key, __this__success_copy_value); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public getColumnDescriptors_result clone() { + return new getColumnDescriptors_result(this); + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public void putToSuccess(byte[] key, ColumnDescriptor val) { + if (this.success == null) { + this.success = new HashMap(); + } + this.success.put(key, val); + } + + public Map getSuccess() { + return this.success; + } + + public void setSuccess(Map success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned 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 void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Map)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -3824,8 +5287,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_success = true && (this.success != null); - boolean that_present_success = true && (that.success != null); + 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; @@ -3833,8 +5296,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -3845,6 +5308,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -3860,7 +5324,7 @@ public class Hbase { } switch (field.id) { - case 0: + case SUCCESS: if (field.type == TType.MAP) { { TMap _map13 = iprot.readMapBegin(); @@ -3876,16 +5340,14 @@ public class Hbase { } iprot.readMapEnd(); } - this.__isset.success = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -3897,61 +5359,84 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getColumnDescriptors_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - if (this.success != null) { - field.name = "success"; - field.type = TType.MAP; - field.id = 0; - oprot.writeFieldBegin(field); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size())); - for (byte[] _iter17 : this.success.keySet()) { - oprot.writeBinary(_iter17); - this.success.get(_iter17).write(oprot); - } - oprot.writeMapEnd(); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size())); + for (Map.Entry _iter17 : this.success.entrySet()) { + oprot.writeBinary(_iter17.getKey()); + _iter17.getValue().write(oprot); } - oprot.writeFieldEnd(); - } - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); + oprot.writeMapEnd(); } + oprot.writeFieldEnd(); + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getColumnDescriptors_result("); + boolean first = true; + sb.append("success:"); - sb.append(this.success); - sb.append(",io:"); - sb.append(this.io.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class getTableRegions_args implements TBase, java.io.Serializable { - public byte[] tableName; + public static class getTableRegions_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getTableRegions_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; + public byte[] tableName; + public static final int TABLENAME = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getTableRegions_args.class, metaDataMap); } public getTableRegions_args() { @@ -3962,9 +5447,81 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; } + /** + * Performs a deep copy on other. + */ + public getTableRegions_args(getTableRegions_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + } + + @Override + public getTableRegions_args clone() { + return new getTableRegions_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -3977,8 +5534,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -3989,6 +5546,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -4004,10 +5562,9 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -4019,17 +5576,18 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getTableRegions_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } @@ -4037,24 +5595,53 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getTableRegions_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class getTableRegions_result implements TBase, java.io.Serializable { - public List success; - public IOError io; + public static class getTableRegions_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getTableRegions_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean success = false; - public boolean io = false; + public List success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, TRegionInfo.class)))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getTableRegions_result.class, metaDataMap); } public getTableRegions_result() { @@ -4066,11 +5653,140 @@ public class Hbase { { this(); this.success = success; - this.__isset.success = true; this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public getTableRegions_result(getTableRegions_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRegionInfo other_element : other.success) { + __this__success.add(new TRegionInfo(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public getTableRegions_result clone() { + return new getTableRegions_result(this); + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRegionInfo elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned 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 void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -4083,8 +5799,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_success = true && (this.success != null); - boolean that_present_success = true && (that.success != null); + 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; @@ -4092,8 +5808,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -4104,6 +5820,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -4119,30 +5836,28 @@ public class Hbase { } switch (field.id) { - case 0: + case SUCCESS: if (field.type == TType.LIST) { { TList _list18 = iprot.readListBegin(); this.success = new ArrayList(_list18.size); for (int _i19 = 0; _i19 < _list18.size; ++_i19) { - TRegionInfo _elem20 = new TRegionInfo(); + TRegionInfo _elem20; _elem20 = new TRegionInfo(); _elem20.read(iprot); this.success.add(_elem20); } iprot.readListEnd(); } - this.__isset.success = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -4154,62 +5869,89 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getTableRegions_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - if (this.success != null) { - field.name = "success"; - field.type = TType.LIST; - field.id = 0; - oprot.writeFieldBegin(field); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (TRegionInfo _iter21 : this.success) { - _iter21.write(oprot); - } - oprot.writeListEnd(); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (TRegionInfo _iter21 : this.success) { + _iter21.write(oprot); } - oprot.writeFieldEnd(); - } - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); + oprot.writeListEnd(); } + oprot.writeFieldEnd(); + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getTableRegions_result("); + boolean first = true; + sb.append("success:"); - sb.append(this.success); - sb.append(",io:"); - sb.append(this.io.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class createTable_args implements TBase, java.io.Serializable { - public byte[] tableName; - public List columnFamilies; + public static class createTable_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("createTable_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField COLUMN_FAMILIES_FIELD_DESC = new TField("columnFamilies", TType.LIST, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean columnFamilies = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public List columnFamilies; + public static final int COLUMNFAMILIES = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMNFAMILIES, new FieldMetaData("columnFamilies", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, ColumnDescriptor.class)))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(createTable_args.class, metaDataMap); } public createTable_args() { @@ -4221,11 +5963,140 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.columnFamilies = columnFamilies; - this.__isset.columnFamilies = true; } + /** + * Performs a deep copy on other. + */ + public createTable_args(createTable_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetColumnFamilies()) { + List __this__columnFamilies = new ArrayList(); + for (ColumnDescriptor other_element : other.columnFamilies) { + __this__columnFamilies.add(new ColumnDescriptor(other_element)); + } + this.columnFamilies = __this__columnFamilies; + } + } + + @Override + public createTable_args clone() { + return new createTable_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public int getColumnFamiliesSize() { + return (this.columnFamilies == null) ? 0 : this.columnFamilies.size(); + } + + public java.util.Iterator getColumnFamiliesIterator() { + return (this.columnFamilies == null) ? null : this.columnFamilies.iterator(); + } + + public void addToColumnFamilies(ColumnDescriptor elem) { + if (this.columnFamilies == null) { + this.columnFamilies = new ArrayList(); + } + this.columnFamilies.add(elem); + } + + public List getColumnFamilies() { + return this.columnFamilies; + } + + public void setColumnFamilies(List columnFamilies) { + this.columnFamilies = columnFamilies; + } + + public void unsetColumnFamilies() { + this.columnFamilies = null; + } + + // Returns true if field columnFamilies is set (has been asigned a value) and false otherwise + public boolean isSetColumnFamilies() { + return this.columnFamilies != null; + } + + public void setColumnFamiliesIsSet(boolean value) { + if (!value) { + this.columnFamilies = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case COLUMNFAMILIES: + if (value == null) { + unsetColumnFamilies(); + } else { + setColumnFamilies((List)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case COLUMNFAMILIES: + return getColumnFamilies(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case COLUMNFAMILIES: + return isSetColumnFamilies(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -4238,8 +6109,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -4247,8 +6118,8 @@ public class Hbase { return false; } - boolean this_present_columnFamilies = true && (this.columnFamilies != null); - boolean that_present_columnFamilies = true && (that.columnFamilies != null); + boolean this_present_columnFamilies = true && this.isSetColumnFamilies(); + boolean that_present_columnFamilies = true && that.isSetColumnFamilies(); if (this_present_columnFamilies || that_present_columnFamilies) { if (!(this_present_columnFamilies && that_present_columnFamilies)) return false; @@ -4259,6 +6130,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -4274,29 +6146,27 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case COLUMNFAMILIES: if (field.type == TType.LIST) { { TList _list22 = iprot.readListBegin(); this.columnFamilies = new ArrayList(_list22.size); for (int _i23 = 0; _i23 < _list22.size; ++_i23) { - ColumnDescriptor _elem24 = new ColumnDescriptor(); + ColumnDescriptor _elem24; _elem24 = new ColumnDescriptor(); _elem24.read(iprot); this.columnFamilies.add(_elem24); } iprot.readListEnd(); } - this.__isset.columnFamilies = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -4308,25 +6178,23 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("createTable_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.columnFamilies != null) { - field.name = "columnFamilies"; - field.type = TType.LIST; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMN_FAMILIES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.columnFamilies.size())); for (ColumnDescriptor _iter25 : this.columnFamilies) { @@ -4340,28 +6208,65 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("createTable_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",columnFamilies:"); - sb.append(this.columnFamilies); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("columnFamilies:"); + if (this.columnFamilies == null) { + sb.append("null"); + } else { + sb.append(this.columnFamilies); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class createTable_result implements TBase, java.io.Serializable { - public IOError io; - public IllegalArgument ia; - public AlreadyExists exist; + public static class createTable_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("createTable_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); + private static final TField IA_FIELD_DESC = new TField("ia", TType.STRUCT, (short)2); + private static final TField EXIST_FIELD_DESC = new TField("exist", TType.STRUCT, (short)3); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; - public boolean ia = false; - public boolean exist = false; + public IOError io; + public static final int IO = 1; + public IllegalArgument ia; + public static final int IA = 2; + public AlreadyExists exist; + public static final int EXIST = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(EXIST, new FieldMetaData("exist", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(createTable_result.class, metaDataMap); } public createTable_result() { @@ -4374,13 +6279,161 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; this.ia = ia; - this.__isset.ia = true; this.exist = exist; - this.__isset.exist = true; } + /** + * Performs a deep copy on other. + */ + public createTable_result(createTable_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + if (other.isSetExist()) { + this.exist = new AlreadyExists(other.exist); + } + } + + @Override + public createTable_result clone() { + return new createTable_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned a value) and false otherwise + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public void setIa(IllegalArgument ia) { + this.ia = ia; + } + + public void unsetIa() { + this.ia = null; + } + + // Returns true if field ia is set (has been asigned a value) and false otherwise + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public AlreadyExists getExist() { + return this.exist; + } + + public void setExist(AlreadyExists exist) { + this.exist = exist; + } + + public void unsetExist() { + this.exist = null; + } + + // Returns true if field exist is set (has been asigned a value) and false otherwise + public boolean isSetExist() { + return this.exist != null; + } + + public void setExistIsSet(boolean value) { + if (!value) { + this.exist = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + case EXIST: + if (value == null) { + unsetExist(); + } else { + setExist((AlreadyExists)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + case IA: + return getIa(); + + case EXIST: + return getExist(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + case IA: + return isSetIa(); + case EXIST: + return isSetExist(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -4393,8 +6446,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -4402,8 +6455,8 @@ public class Hbase { return false; } - boolean this_present_ia = true && (this.ia != null); - boolean that_present_ia = true && (that.ia != null); + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); if (this_present_ia || that_present_ia) { if (!(this_present_ia && that_present_ia)) return false; @@ -4411,8 +6464,8 @@ public class Hbase { return false; } - boolean this_present_exist = true && (this.exist != null); - boolean that_present_exist = true && (that.exist != null); + boolean this_present_exist = true && this.isSetExist(); + boolean that_present_exist = true && that.isSetExist(); if (this_present_exist || that_present_exist) { if (!(this_present_exist && that_present_exist)) return false; @@ -4423,6 +6476,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -4438,29 +6492,26 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case IA: if (field.type == TType.STRUCT) { this.ia = new IllegalArgument(); this.ia.read(iprot); - this.__isset.ia = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case EXIST: if (field.type == TType.STRUCT) { this.exist = new AlreadyExists(); this.exist.read(iprot); - this.__isset.exist = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -4472,65 +6523,89 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("createTable_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.ia) { - if (this.ia != null) { - field.name = "ia"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.ia.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.exist) { - if (this.exist != null) { - field.name = "exist"; - field.type = TType.STRUCT; - field.id = 3; - oprot.writeFieldBegin(field); - this.exist.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetIa()) { + oprot.writeFieldBegin(IA_FIELD_DESC); + this.ia.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetExist()) { + oprot.writeFieldBegin(EXIST_FIELD_DESC); + this.exist.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("createTable_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); - sb.append(",ia:"); - sb.append(this.ia.toString()); - sb.append(",exist:"); - sb.append(this.exist.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; + if (!first) sb.append(", "); + sb.append("exist:"); + if (this.exist == null) { + sb.append("null"); + } else { + sb.append(this.exist); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class deleteTable_args implements TBase, java.io.Serializable { - public byte[] tableName; + public static class deleteTable_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("deleteTable_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; + public byte[] tableName; + public static final int TABLENAME = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(deleteTable_args.class, metaDataMap); } public deleteTable_args() { @@ -4541,9 +6616,81 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; } + /** + * Performs a deep copy on other. + */ + public deleteTable_args(deleteTable_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + } + + @Override + public deleteTable_args clone() { + return new deleteTable_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -4556,8 +6703,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -4568,6 +6715,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -4583,10 +6731,9 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -4598,17 +6745,18 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("deleteTable_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } @@ -4616,40 +6764,132 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("deleteTable_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class deleteTable_result implements TBase, java.io.Serializable { - public IOError io; - public NotFound nf; + public static class deleteTable_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("deleteTable_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; - public boolean nf = false; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(deleteTable_result.class, metaDataMap); } public deleteTable_result() { } public deleteTable_result( - IOError io, - NotFound nf) + IOError io) { this(); this.io = io; - this.__isset.io = true; - this.nf = nf; - this.__isset.nf = true; } + /** + * Performs a deep copy on other. + */ + public deleteTable_result(deleteTable_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public deleteTable_result clone() { + return new deleteTable_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -4662,8 +6902,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -4671,18 +6911,10 @@ public class Hbase { return false; } - boolean this_present_nf = true && (this.nf != null); - boolean that_present_nf = true && (that.nf != null); - if (this_present_nf || that_present_nf) { - if (!(this_present_nf && that_present_nf)) - return false; - if (!this.nf.equals(that.nf)) - return false; - } - return true; } + @Override public int hashCode() { return 0; } @@ -4698,20 +6930,10 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: - if (field.type == TType.STRUCT) { - this.nf = new NotFound(); - this.nf.read(iprot); - this.__isset.nf = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -4723,58 +6945,75 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("deleteTable_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.nf) { - if (this.nf != null) { - field.name = "nf"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.nf.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("deleteTable_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); - sb.append(",nf:"); - sb.append(this.nf.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class get_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] row; - public byte[] column; + public static class get_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); + private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRING, (short)3); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; - public boolean column = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] row; + public static final int ROW = 2; + public byte[] column; + public static final int COLUMN = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap); } public get_args() { @@ -4787,13 +7026,161 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; this.column = column; - this.__isset.column = true; } + /** + * Performs a deep copy on other. + */ + 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; + } + } + + @Override + public get_args clone() { + return new get_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public byte[] getColumn() { + return this.column; + } + + public void setColumn(byte[] column) { + this.column = column; + } + + public void unsetColumn() { + this.column = null; + } + + // Returns true if field column is set (has been asigned a value) and false otherwise + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((byte[])value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMN: + return getColumn(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMN: + return isSetColumn(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -4806,8 +7193,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -4815,8 +7202,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -4824,8 +7211,8 @@ public class Hbase { return false; } - boolean this_present_column = true && (this.column != null); - boolean that_present_column = true && (that.column != null); + 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; @@ -4836,6 +7223,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -4851,26 +7239,23 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case COLUMN: if (field.type == TType.STRING) { this.column = iprot.readBinary(); - this.__isset.column = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -4882,33 +7267,28 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("get_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } if (this.column != null) { - field.name = "column"; - field.type = TType.STRING; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMN_FIELD_DESC); oprot.writeBinary(this.column); oprot.writeFieldEnd(); } @@ -4916,49 +7296,214 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("get_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); - sb.append(",column:"); - sb.append(this.column); + 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; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class get_result implements TBase, java.io.Serializable { - public TCell success; - public IOError io; - public NotFound nf; + public static class get_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean success = false; - public boolean io = false; - public boolean nf = false; + public List success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, TCell.class)))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(get_result.class, metaDataMap); } public get_result() { } public get_result( - TCell success, - IOError io, - NotFound nf) + List success, + IOError io) { this(); this.success = success; - this.__isset.success = true; this.io = io; - this.__isset.io = true; - this.nf = nf; - this.__isset.nf = true; } + /** + * Performs a deep copy on other. + */ + public get_result(get_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + 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); + } + } + + @Override + public get_result clone() { + return new get_result(this); + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TCell elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned 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 void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -4971,8 +7516,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_success = true && (this.success != null); - boolean that_present_success = true && (that.success != null); + 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; @@ -4980,8 +7525,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -4989,18 +7534,10 @@ public class Hbase { return false; } - boolean this_present_nf = true && (this.nf != null); - boolean that_present_nf = true && (that.nf != null); - if (this_present_nf || that_present_nf) { - if (!(this_present_nf && that_present_nf)) - return false; - if (!this.nf.equals(that.nf)) - return false; - } - return true; } + @Override public int hashCode() { return 0; } @@ -5016,29 +7553,28 @@ public class Hbase { } switch (field.id) { - case 0: - if (field.type == TType.STRUCT) { - this.success = new TCell(); - this.success.read(iprot); - this.__isset.success = true; + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list26 = iprot.readListBegin(); + this.success = new ArrayList(_list26.size); + for (int _i27 = 0; _i27 < _list26.size; ++_i27) + { + TCell _elem28; + _elem28 = new TCell(); + _elem28.read(iprot); + this.success.add(_elem28); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: - if (field.type == TType.STRUCT) { - this.nf = new NotFound(); - this.nf.read(iprot); - this.__isset.nf = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -5050,73 +7586,101 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("get_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - if (this.success != null) { - field.name = "success"; - field.type = TType.STRUCT; - field.id = 0; - oprot.writeFieldBegin(field); - this.success.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.nf) { - if (this.nf != null) { - field.name = "nf"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.nf.write(oprot); - oprot.writeFieldEnd(); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (TCell _iter29 : this.success) { + _iter29.write(oprot); + } + oprot.writeListEnd(); } + oprot.writeFieldEnd(); + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("get_result("); + boolean first = true; + sb.append("success:"); - sb.append(this.success.toString()); - sb.append(",io:"); - sb.append(this.io.toString()); - sb.append(",nf:"); - sb.append(this.nf.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class getVer_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] row; - public byte[] column; - public int numVersions; + public static class getVer_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getVer_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); + private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRING, (short)3); + private static final TField NUM_VERSIONS_FIELD_DESC = new TField("numVersions", TType.I32, (short)4); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; - public boolean column = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] row; + public static final int ROW = 2; + public byte[] column; + public static final int COLUMN = 3; + public int numVersions; + public static final int NUMVERSIONS = 4; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean numVersions = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(NUMVERSIONS, new FieldMetaData("numVersions", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getVer_args.class, metaDataMap); + } + public getVer_args() { } @@ -5128,15 +7692,200 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; this.column = column; - this.__isset.column = true; this.numVersions = numVersions; this.__isset.numVersions = true; } + /** + * Performs a deep copy on other. + */ + public getVer_args(getVer_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumn()) { + this.column = other.column; + } + __isset.numVersions = other.__isset.numVersions; + this.numVersions = other.numVersions; + } + + @Override + public getVer_args clone() { + return new getVer_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public byte[] getColumn() { + return this.column; + } + + public void setColumn(byte[] column) { + this.column = column; + } + + public void unsetColumn() { + this.column = null; + } + + // Returns true if field column is set (has been asigned a value) and false otherwise + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + public int getNumVersions() { + return this.numVersions; + } + + public void setNumVersions(int numVersions) { + this.numVersions = numVersions; + this.__isset.numVersions = true; + } + + public void unsetNumVersions() { + this.__isset.numVersions = false; + } + + // Returns true if field numVersions is set (has been asigned a value) and false otherwise + public boolean isSetNumVersions() { + return this.__isset.numVersions; + } + + public void setNumVersionsIsSet(boolean value) { + this.__isset.numVersions = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((byte[])value); + } + break; + + case NUMVERSIONS: + if (value == null) { + unsetNumVersions(); + } else { + setNumVersions((Integer)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMN: + return getColumn(); + + case NUMVERSIONS: + return new Integer(getNumVersions()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMN: + return isSetColumn(); + case NUMVERSIONS: + return isSetNumVersions(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -5149,8 +7898,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -5158,8 +7907,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -5167,8 +7916,8 @@ public class Hbase { return false; } - boolean this_present_column = true && (this.column != null); - boolean that_present_column = true && (that.column != null); + 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; @@ -5188,6 +7937,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -5203,31 +7953,28 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case COLUMN: if (field.type == TType.STRING) { this.column = iprot.readBinary(); - this.__isset.column = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: + case NUMVERSIONS: if (field.type == TType.I32) { this.numVersions = iprot.readI32(); this.__isset.numVersions = true; @@ -5242,72 +7989,105 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getVer_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } if (this.column != null) { - field.name = "column"; - field.type = TType.STRING; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMN_FIELD_DESC); oprot.writeBinary(this.column); oprot.writeFieldEnd(); } - field.name = "numVersions"; - field.type = TType.I32; - field.id = 4; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(NUM_VERSIONS_FIELD_DESC); oprot.writeI32(this.numVersions); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getVer_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); - sb.append(",column:"); - sb.append(this.column); - sb.append(",numVersions:"); + 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("numVersions:"); sb.append(this.numVersions); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class getVer_result implements TBase, java.io.Serializable { - public List success; - public IOError io; - public NotFound nf; + public static class getVer_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getVer_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean success = false; - public boolean io = false; - public boolean nf = false; + public List success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, TCell.class)))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getVer_result.class, metaDataMap); } public getVer_result() { @@ -5315,18 +8095,144 @@ public class Hbase { public getVer_result( List success, - IOError io, - NotFound nf) + IOError io) { this(); this.success = success; - this.__isset.success = true; this.io = io; - this.__isset.io = true; - this.nf = nf; - this.__isset.nf = true; } + /** + * Performs a deep copy on other. + */ + public getVer_result(getVer_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + 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); + } + } + + @Override + public getVer_result clone() { + return new getVer_result(this); + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TCell elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned 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 void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -5339,8 +8245,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_success = true && (this.success != null); - boolean that_present_success = true && (that.success != null); + 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; @@ -5348,8 +8254,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -5357,18 +8263,10 @@ public class Hbase { return false; } - boolean this_present_nf = true && (this.nf != null); - boolean that_present_nf = true && (that.nf != null); - if (this_present_nf || that_present_nf) { - if (!(this_present_nf && that_present_nf)) - return false; - if (!this.nf.equals(that.nf)) - return false; - } - return true; } + @Override public int hashCode() { return 0; } @@ -5384,39 +8282,28 @@ public class Hbase { } switch (field.id) { - case 0: + case SUCCESS: if (field.type == TType.LIST) { { - TList _list26 = iprot.readListBegin(); - this.success = new ArrayList(_list26.size); - for (int _i27 = 0; _i27 < _list26.size; ++_i27) + TList _list30 = iprot.readListBegin(); + this.success = new ArrayList(_list30.size); + for (int _i31 = 0; _i31 < _list30.size; ++_i31) { - TCell _elem28 = new TCell(); - _elem28 = new TCell(); - _elem28.read(iprot); - this.success.add(_elem28); + TCell _elem32; + _elem32 = new TCell(); + _elem32.read(iprot); + this.success.add(_elem32); } iprot.readListEnd(); } - this.__isset.success = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: - if (field.type == TType.STRUCT) { - this.nf = new NotFound(); - this.nf.read(iprot); - this.__isset.nf = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -5428,81 +8315,107 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getVer_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - if (this.success != null) { - field.name = "success"; - field.type = TType.LIST; - field.id = 0; - oprot.writeFieldBegin(field); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (TCell _iter29 : this.success) { - _iter29.write(oprot); - } - oprot.writeListEnd(); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (TCell _iter33 : this.success) { + _iter33.write(oprot); } - oprot.writeFieldEnd(); - } - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.nf) { - if (this.nf != null) { - field.name = "nf"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.nf.write(oprot); - oprot.writeFieldEnd(); + oprot.writeListEnd(); } + oprot.writeFieldEnd(); + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getVer_result("); + boolean first = true; + sb.append("success:"); - sb.append(this.success); - sb.append(",io:"); - sb.append(this.io.toString()); - sb.append(",nf:"); - sb.append(this.nf.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class getVerTs_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] row; - public byte[] column; - public long timestamp; - public int numVersions; + public static class getVerTs_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getVerTs_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); + private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRING, (short)3); + private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)4); + private static final TField NUM_VERSIONS_FIELD_DESC = new TField("numVersions", TType.I32, (short)5); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; - public boolean column = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] row; + public static final int ROW = 2; + public byte[] column; + public static final int COLUMN = 3; + public long timestamp; + public static final int TIMESTAMP = 4; + public int numVersions; + public static final int NUMVERSIONS = 5; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean timestamp = false; public boolean numVersions = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + put(NUMVERSIONS, new FieldMetaData("numVersions", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getVerTs_args.class, metaDataMap); + } + public getVerTs_args() { } @@ -5515,17 +8428,239 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; this.column = column; - this.__isset.column = true; this.timestamp = timestamp; this.__isset.timestamp = true; this.numVersions = numVersions; this.__isset.numVersions = true; } + /** + * Performs a deep copy on other. + */ + public getVerTs_args(getVerTs_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumn()) { + this.column = other.column; + } + __isset.timestamp = other.__isset.timestamp; + this.timestamp = other.timestamp; + __isset.numVersions = other.__isset.numVersions; + this.numVersions = other.numVersions; + } + + @Override + public getVerTs_args clone() { + return new getVerTs_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public byte[] getColumn() { + return this.column; + } + + public void setColumn(byte[] column) { + this.column = column; + } + + public void unsetColumn() { + this.column = null; + } + + // Returns true if field column is set (has been asigned a value) and false otherwise + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + this.__isset.timestamp = true; + } + + public void unsetTimestamp() { + this.__isset.timestamp = false; + } + + // Returns true if field timestamp is set (has been asigned a value) and false otherwise + public boolean isSetTimestamp() { + return this.__isset.timestamp; + } + + public void setTimestampIsSet(boolean value) { + this.__isset.timestamp = value; + } + + public int getNumVersions() { + return this.numVersions; + } + + public void setNumVersions(int numVersions) { + this.numVersions = numVersions; + this.__isset.numVersions = true; + } + + public void unsetNumVersions() { + this.__isset.numVersions = false; + } + + // Returns true if field numVersions is set (has been asigned a value) and false otherwise + public boolean isSetNumVersions() { + return this.__isset.numVersions; + } + + public void setNumVersionsIsSet(boolean value) { + this.__isset.numVersions = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((byte[])value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case NUMVERSIONS: + if (value == null) { + unsetNumVersions(); + } else { + setNumVersions((Integer)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMN: + return getColumn(); + + case TIMESTAMP: + return new Long(getTimestamp()); + + case NUMVERSIONS: + return new Integer(getNumVersions()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMN: + return isSetColumn(); + case TIMESTAMP: + return isSetTimestamp(); + case NUMVERSIONS: + return isSetNumVersions(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -5538,8 +8673,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -5547,8 +8682,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -5556,8 +8691,8 @@ public class Hbase { return false; } - boolean this_present_column = true && (this.column != null); - boolean that_present_column = true && (that.column != null); + 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; @@ -5586,6 +8721,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -5601,31 +8737,28 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case COLUMN: if (field.type == TType.STRING) { this.column = iprot.readBinary(); - this.__isset.column = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: + case TIMESTAMP: if (field.type == TType.I64) { this.timestamp = iprot.readI64(); this.__isset.timestamp = true; @@ -5633,7 +8766,7 @@ public class Hbase { TProtocolUtil.skip(iprot, field.type); } break; - case 5: + case NUMVERSIONS: if (field.type == TType.I32) { this.numVersions = iprot.readI32(); this.__isset.numVersions = true; @@ -5648,80 +8781,112 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getVerTs_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } if (this.column != null) { - field.name = "column"; - field.type = TType.STRING; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMN_FIELD_DESC); oprot.writeBinary(this.column); oprot.writeFieldEnd(); } - field.name = "timestamp"; - field.type = TType.I64; - field.id = 4; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); - field.name = "numVersions"; - field.type = TType.I32; - field.id = 5; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(NUM_VERSIONS_FIELD_DESC); oprot.writeI32(this.numVersions); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getVerTs_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); - sb.append(",column:"); - sb.append(this.column); - sb.append(",timestamp:"); + 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("timestamp:"); sb.append(this.timestamp); - sb.append(",numVersions:"); + first = false; + if (!first) sb.append(", "); + sb.append("numVersions:"); sb.append(this.numVersions); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class getVerTs_result implements TBase, java.io.Serializable { - public List success; - public IOError io; - public NotFound nf; + public static class getVerTs_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getVerTs_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean success = false; - public boolean io = false; - public boolean nf = false; + public List success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, TCell.class)))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getVerTs_result.class, metaDataMap); } public getVerTs_result() { @@ -5729,18 +8894,144 @@ public class Hbase { public getVerTs_result( List success, - IOError io, - NotFound nf) + IOError io) { this(); this.success = success; - this.__isset.success = true; this.io = io; - this.__isset.io = true; - this.nf = nf; - this.__isset.nf = true; } + /** + * Performs a deep copy on other. + */ + public getVerTs_result(getVerTs_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + 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); + } + } + + @Override + public getVerTs_result clone() { + return new getVerTs_result(this); + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TCell elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned 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 void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -5753,8 +9044,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_success = true && (this.success != null); - boolean that_present_success = true && (that.success != null); + 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; @@ -5762,8 +9053,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -5771,18 +9062,10 @@ public class Hbase { return false; } - boolean this_present_nf = true && (this.nf != null); - boolean that_present_nf = true && (that.nf != null); - if (this_present_nf || that_present_nf) { - if (!(this_present_nf && that_present_nf)) - return false; - if (!this.nf.equals(that.nf)) - return false; - } - return true; } + @Override public int hashCode() { return 0; } @@ -5798,39 +9081,28 @@ public class Hbase { } switch (field.id) { - case 0: + case SUCCESS: if (field.type == TType.LIST) { { - TList _list30 = iprot.readListBegin(); - this.success = new ArrayList(_list30.size); - for (int _i31 = 0; _i31 < _list30.size; ++_i31) + TList _list34 = iprot.readListBegin(); + this.success = new ArrayList(_list34.size); + for (int _i35 = 0; _i35 < _list34.size; ++_i35) { - TCell _elem32 = new TCell(); - _elem32 = new TCell(); - _elem32.read(iprot); - this.success.add(_elem32); + TCell _elem36; + _elem36 = new TCell(); + _elem36.read(iprot); + this.success.add(_elem36); } iprot.readListEnd(); } - this.__isset.success = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: - if (field.type == TType.STRUCT) { - this.nf = new NotFound(); - this.nf.read(iprot); - this.__isset.nf = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -5842,73 +9114,88 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getVerTs_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - if (this.success != null) { - field.name = "success"; - field.type = TType.LIST; - field.id = 0; - oprot.writeFieldBegin(field); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (TCell _iter33 : this.success) { - _iter33.write(oprot); - } - oprot.writeListEnd(); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (TCell _iter37 : this.success) { + _iter37.write(oprot); } - oprot.writeFieldEnd(); - } - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.nf) { - if (this.nf != null) { - field.name = "nf"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.nf.write(oprot); - oprot.writeFieldEnd(); + oprot.writeListEnd(); } + oprot.writeFieldEnd(); + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getVerTs_result("); + boolean first = true; + sb.append("success:"); - sb.append(this.success); - sb.append(",io:"); - sb.append(this.io.toString()); - sb.append(",nf:"); - sb.append(this.nf.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class getRow_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] row; + public static class getRow_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getRow_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] row; + public static final int ROW = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getRow_args.class, metaDataMap); } public getRow_args() { @@ -5920,11 +9207,121 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; } + /** + * Performs a deep copy on other. + */ + public getRow_args(getRow_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + } + + @Override + public getRow_args clone() { + return new getRow_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -5937,8 +9334,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -5946,8 +9343,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -5958,6 +9355,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -5973,18 +9371,16 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -5996,25 +9392,23 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getRow_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } @@ -6022,47 +9416,206 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getRow_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); + 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; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class getRow_result implements TBase, java.io.Serializable { - public TRowResult success; - public IOError io; - public NotFound nf; + public static class getRow_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getRow_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean success = false; - public boolean io = false; - public boolean nf = false; + public List success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, TRowResult.class)))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getRow_result.class, metaDataMap); } public getRow_result() { } public getRow_result( - TRowResult success, - IOError io, - NotFound nf) + List success, + IOError io) { this(); this.success = success; - this.__isset.success = true; this.io = io; - this.__isset.io = true; - this.nf = nf; - this.__isset.nf = true; } + /** + * Performs a deep copy on other. + */ + public getRow_result(getRow_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public getRow_result clone() { + return new getRow_result(this); + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned 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 void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -6075,8 +9628,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_success = true && (this.success != null); - boolean that_present_success = true && (that.success != null); + 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; @@ -6084,8 +9637,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -6093,18 +9646,10 @@ public class Hbase { return false; } - boolean this_present_nf = true && (this.nf != null); - boolean that_present_nf = true && (that.nf != null); - if (this_present_nf || that_present_nf) { - if (!(this_present_nf && that_present_nf)) - return false; - if (!this.nf.equals(that.nf)) - return false; - } - return true; } + @Override public int hashCode() { return 0; } @@ -6120,29 +9665,28 @@ public class Hbase { } switch (field.id) { - case 0: - if (field.type == TType.STRUCT) { - this.success = new TRowResult(); - this.success.read(iprot); - this.__isset.success = true; + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list38 = iprot.readListBegin(); + this.success = new ArrayList(_list38.size); + for (int _i39 = 0; _i39 < _list38.size; ++_i39) + { + TRowResult _elem40; + _elem40 = new TRowResult(); + _elem40.read(iprot); + this.success.add(_elem40); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: - if (field.type == TType.STRUCT) { - this.nf = new NotFound(); - this.nf.read(iprot); - this.__isset.nf = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -6154,69 +9698,94 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getRow_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - if (this.success != null) { - field.name = "success"; - field.type = TType.STRUCT; - field.id = 0; - oprot.writeFieldBegin(field); - this.success.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.nf) { - if (this.nf != null) { - field.name = "nf"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.nf.write(oprot); - oprot.writeFieldEnd(); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (TRowResult _iter41 : this.success) { + _iter41.write(oprot); + } + oprot.writeListEnd(); } + oprot.writeFieldEnd(); + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getRow_result("); + boolean first = true; + sb.append("success:"); - sb.append(this.success.toString()); - sb.append(",io:"); - sb.append(this.io.toString()); - sb.append(",nf:"); - sb.append(this.nf.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class getRowWithColumns_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] row; - public List columns; + public static class getRowWithColumns_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getRowWithColumns_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); + private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.LIST, (short)3); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; - public boolean columns = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] row; + public static final int ROW = 2; + public List columns; + public static final int COLUMNS = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getRowWithColumns_args.class, metaDataMap); } public getRowWithColumns_args() { @@ -6229,13 +9798,180 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; this.columns = columns; - this.__isset.columns = true; } + /** + * Performs a deep copy on other. + */ + public getRowWithColumns_args(getRowWithColumns_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (byte[] other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + } + + @Override + public getRowWithColumns_args clone() { + return new getRowWithColumns_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(byte[] elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + public List getColumns() { + return this.columns; + } + + public void setColumns(List columns) { + this.columns = columns; + } + + public void unsetColumns() { + this.columns = null; + } + + // Returns true if field columns is set (has been asigned a value) and false otherwise + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMNS: + return getColumns(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMNS: + return isSetColumns(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -6248,8 +9984,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -6257,8 +9993,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -6266,8 +10002,8 @@ public class Hbase { return false; } - boolean this_present_columns = true && (this.columns != null); - boolean that_present_columns = true && (that.columns != null); + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); if (this_present_columns || that_present_columns) { if (!(this_present_columns && that_present_columns)) return false; @@ -6278,6 +10014,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -6293,36 +10030,33 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case COLUMNS: if (field.type == TType.LIST) { { - TList _list34 = iprot.readListBegin(); - this.columns = new ArrayList(_list34.size); - for (int _i35 = 0; _i35 < _list34.size; ++_i35) + TList _list42 = iprot.readListBegin(); + this.columns = new ArrayList(_list42.size); + for (int _i43 = 0; _i43 < _list42.size; ++_i43) { - byte[] _elem36 = null; - _elem36 = iprot.readBinary(); - this.columns.add(_elem36); + byte[] _elem44; + _elem44 = iprot.readBinary(); + this.columns.add(_elem44); } iprot.readListEnd(); } - this.__isset.columns = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -6334,37 +10068,32 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getRowWithColumns_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } if (this.columns != null) { - field.name = "columns"; - field.type = TType.LIST; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter37 : this.columns) { - oprot.writeBinary(_iter37); + for (byte[] _iter45 : this.columns) { + oprot.writeBinary(_iter45); } oprot.writeListEnd(); } @@ -6374,49 +10103,214 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getRowWithColumns_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); - sb.append(",columns:"); - sb.append(this.columns); + 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("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class getRowWithColumns_result implements TBase, java.io.Serializable { - public TRowResult success; - public IOError io; - public NotFound nf; + public static class getRowWithColumns_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getRowWithColumns_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean success = false; - public boolean io = false; - public boolean nf = false; + public List success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, TRowResult.class)))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getRowWithColumns_result.class, metaDataMap); } public getRowWithColumns_result() { } public getRowWithColumns_result( - TRowResult success, - IOError io, - NotFound nf) + List success, + IOError io) { this(); this.success = success; - this.__isset.success = true; this.io = io; - this.__isset.io = true; - this.nf = nf; - this.__isset.nf = true; } + /** + * Performs a deep copy on other. + */ + public getRowWithColumns_result(getRowWithColumns_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public getRowWithColumns_result clone() { + return new getRowWithColumns_result(this); + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned 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 void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -6429,8 +10323,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_success = true && (this.success != null); - boolean that_present_success = true && (that.success != null); + 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; @@ -6438,8 +10332,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -6447,18 +10341,10 @@ public class Hbase { return false; } - boolean this_present_nf = true && (this.nf != null); - boolean that_present_nf = true && (that.nf != null); - if (this_present_nf || that_present_nf) { - if (!(this_present_nf && that_present_nf)) - return false; - if (!this.nf.equals(that.nf)) - return false; - } - return true; } + @Override public int hashCode() { return 0; } @@ -6474,29 +10360,28 @@ public class Hbase { } switch (field.id) { - case 0: - if (field.type == TType.STRUCT) { - this.success = new TRowResult(); - this.success.read(iprot); - this.__isset.success = true; + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list46 = iprot.readListBegin(); + this.success = new ArrayList(_list46.size); + for (int _i47 = 0; _i47 < _list46.size; ++_i47) + { + TRowResult _elem48; + _elem48 = new TRowResult(); + _elem48.read(iprot); + this.success.add(_elem48); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: - if (field.type == TType.STRUCT) { - this.nf = new NotFound(); - this.nf.read(iprot); - this.__isset.nf = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -6508,71 +10393,96 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getRowWithColumns_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - if (this.success != null) { - field.name = "success"; - field.type = TType.STRUCT; - field.id = 0; - oprot.writeFieldBegin(field); - this.success.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.nf) { - if (this.nf != null) { - field.name = "nf"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.nf.write(oprot); - oprot.writeFieldEnd(); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (TRowResult _iter49 : this.success) { + _iter49.write(oprot); + } + oprot.writeListEnd(); } + oprot.writeFieldEnd(); + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getRowWithColumns_result("); + boolean first = true; + sb.append("success:"); - sb.append(this.success.toString()); - sb.append(",io:"); - sb.append(this.io.toString()); - sb.append(",nf:"); - sb.append(this.nf.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class getRowTs_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] row; - public long timestamp; + public static class getRowTs_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getRowTs_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); + private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)3); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] row; + public static final int ROW = 2; + public long timestamp; + public static final int TIMESTAMP = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean timestamp = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getRowTs_args.class, metaDataMap); + } + public getRowTs_args() { } @@ -6583,13 +10493,160 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; this.timestamp = timestamp; this.__isset.timestamp = true; } + /** + * Performs a deep copy on other. + */ + public getRowTs_args(getRowTs_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + __isset.timestamp = other.__isset.timestamp; + this.timestamp = other.timestamp; + } + + @Override + public getRowTs_args clone() { + return new getRowTs_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + this.__isset.timestamp = true; + } + + public void unsetTimestamp() { + this.__isset.timestamp = false; + } + + // Returns true if field timestamp is set (has been asigned a value) and false otherwise + public boolean isSetTimestamp() { + return this.__isset.timestamp; + } + + public void setTimestampIsSet(boolean value) { + this.__isset.timestamp = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + case TIMESTAMP: + return new Long(getTimestamp()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case TIMESTAMP: + return isSetTimestamp(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -6602,8 +10659,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -6611,8 +10668,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -6632,6 +10689,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -6647,23 +10705,21 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case TIMESTAMP: if (field.type == TType.I64) { this.timestamp = iprot.readI64(); this.__isset.timestamp = true; @@ -6678,81 +10734,237 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getRowTs_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } - field.name = "timestamp"; - field.type = TType.I64; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getRowTs_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); - sb.append(",timestamp:"); + 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("timestamp:"); sb.append(this.timestamp); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class getRowTs_result implements TBase, java.io.Serializable { - public TRowResult success; - public IOError io; - public NotFound nf; + public static class getRowTs_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getRowTs_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean success = false; - public boolean io = false; - public boolean nf = false; + public List success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, TRowResult.class)))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getRowTs_result.class, metaDataMap); } public getRowTs_result() { } public getRowTs_result( - TRowResult success, - IOError io, - NotFound nf) + List success, + IOError io) { this(); this.success = success; - this.__isset.success = true; this.io = io; - this.__isset.io = true; - this.nf = nf; - this.__isset.nf = true; } + /** + * Performs a deep copy on other. + */ + public getRowTs_result(getRowTs_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public getRowTs_result clone() { + return new getRowTs_result(this); + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned 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 void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -6765,8 +10977,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_success = true && (this.success != null); - boolean that_present_success = true && (that.success != null); + 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; @@ -6774,8 +10986,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -6783,18 +10995,10 @@ public class Hbase { return false; } - boolean this_present_nf = true && (this.nf != null); - boolean that_present_nf = true && (that.nf != null); - if (this_present_nf || that_present_nf) { - if (!(this_present_nf && that_present_nf)) - return false; - if (!this.nf.equals(that.nf)) - return false; - } - return true; } + @Override public int hashCode() { return 0; } @@ -6810,29 +11014,28 @@ public class Hbase { } switch (field.id) { - case 0: - if (field.type == TType.STRUCT) { - this.success = new TRowResult(); - this.success.read(iprot); - this.__isset.success = true; + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list50 = iprot.readListBegin(); + this.success = new ArrayList(_list50.size); + for (int _i51 = 0; _i51 < _list50.size; ++_i51) + { + TRowResult _elem52; + _elem52 = new TRowResult(); + _elem52.read(iprot); + this.success.add(_elem52); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: - if (field.type == TType.STRUCT) { - this.nf = new NotFound(); - this.nf.read(iprot); - this.__isset.nf = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -6844,73 +11047,102 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getRowTs_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - if (this.success != null) { - field.name = "success"; - field.type = TType.STRUCT; - field.id = 0; - oprot.writeFieldBegin(field); - this.success.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.nf) { - if (this.nf != null) { - field.name = "nf"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.nf.write(oprot); - oprot.writeFieldEnd(); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (TRowResult _iter53 : this.success) { + _iter53.write(oprot); + } + oprot.writeListEnd(); } + oprot.writeFieldEnd(); + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getRowTs_result("); + boolean first = true; + sb.append("success:"); - sb.append(this.success.toString()); - sb.append(",io:"); - sb.append(this.io.toString()); - sb.append(",nf:"); - sb.append(this.nf.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class getRowWithColumnsTs_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] row; - public List columns; - public long timestamp; + public static class getRowWithColumnsTs_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getRowWithColumnsTs_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); + private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.LIST, (short)3); + private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)4); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; - public boolean columns = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] row; + public static final int ROW = 2; + public List columns; + public static final int COLUMNS = 3; + public long timestamp; + public static final int TIMESTAMP = 4; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean timestamp = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getRowWithColumnsTs_args.class, metaDataMap); + } + public getRowWithColumnsTs_args() { } @@ -6922,15 +11154,219 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; this.columns = columns; - this.__isset.columns = true; this.timestamp = timestamp; this.__isset.timestamp = true; } + /** + * Performs a deep copy on other. + */ + public getRowWithColumnsTs_args(getRowWithColumnsTs_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (byte[] other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + __isset.timestamp = other.__isset.timestamp; + this.timestamp = other.timestamp; + } + + @Override + public getRowWithColumnsTs_args clone() { + return new getRowWithColumnsTs_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(byte[] elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + public List getColumns() { + return this.columns; + } + + public void setColumns(List columns) { + this.columns = columns; + } + + public void unsetColumns() { + this.columns = null; + } + + // Returns true if field columns is set (has been asigned a value) and false otherwise + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + this.__isset.timestamp = true; + } + + public void unsetTimestamp() { + this.__isset.timestamp = false; + } + + // Returns true if field timestamp is set (has been asigned a value) and false otherwise + public boolean isSetTimestamp() { + return this.__isset.timestamp; + } + + public void setTimestampIsSet(boolean value) { + this.__isset.timestamp = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMNS: + return getColumns(); + + case TIMESTAMP: + return new Long(getTimestamp()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMNS: + return isSetColumns(); + case TIMESTAMP: + return isSetTimestamp(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -6943,8 +11379,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -6952,8 +11388,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -6961,8 +11397,8 @@ public class Hbase { return false; } - boolean this_present_columns = true && (this.columns != null); - boolean that_present_columns = true && (that.columns != null); + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); if (this_present_columns || that_present_columns) { if (!(this_present_columns && that_present_columns)) return false; @@ -6982,6 +11418,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -6997,41 +11434,38 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case COLUMNS: if (field.type == TType.LIST) { { - TList _list38 = iprot.readListBegin(); - this.columns = new ArrayList(_list38.size); - for (int _i39 = 0; _i39 < _list38.size; ++_i39) + TList _list54 = iprot.readListBegin(); + this.columns = new ArrayList(_list54.size); + for (int _i55 = 0; _i55 < _list54.size; ++_i55) { - byte[] _elem40 = null; - _elem40 = iprot.readBinary(); - this.columns.add(_elem40); + byte[] _elem56; + _elem56 = iprot.readBinary(); + this.columns.add(_elem56); } iprot.readListEnd(); } - this.__isset.columns = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: + case TIMESTAMP: if (field.type == TType.I64) { this.timestamp = iprot.readI64(); this.__isset.timestamp = true; @@ -7046,97 +11480,256 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getRowWithColumnsTs_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } if (this.columns != null) { - field.name = "columns"; - field.type = TType.LIST; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter41 : this.columns) { - oprot.writeBinary(_iter41); + for (byte[] _iter57 : this.columns) { + oprot.writeBinary(_iter57); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } - field.name = "timestamp"; - field.type = TType.I64; - field.id = 4; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getRowWithColumnsTs_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); - sb.append(",columns:"); - sb.append(this.columns); - sb.append(",timestamp:"); + 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("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); sb.append(this.timestamp); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class getRowWithColumnsTs_result implements TBase, java.io.Serializable { - public TRowResult success; - public IOError io; - public NotFound nf; + public static class getRowWithColumnsTs_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("getRowWithColumnsTs_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean success = false; - public boolean io = false; - public boolean nf = false; + public List success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, TRowResult.class)))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(getRowWithColumnsTs_result.class, metaDataMap); } public getRowWithColumnsTs_result() { } public getRowWithColumnsTs_result( - TRowResult success, - IOError io, - NotFound nf) + List success, + IOError io) { this(); this.success = success; - this.__isset.success = true; this.io = io; - this.__isset.io = true; - this.nf = nf; - this.__isset.nf = true; } + /** + * Performs a deep copy on other. + */ + public getRowWithColumnsTs_result(getRowWithColumnsTs_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public getRowWithColumnsTs_result clone() { + return new getRowWithColumnsTs_result(this); + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned 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 void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -7149,8 +11742,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_success = true && (this.success != null); - boolean that_present_success = true && (that.success != null); + 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; @@ -7158,8 +11751,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -7167,18 +11760,10 @@ public class Hbase { return false; } - boolean this_present_nf = true && (this.nf != null); - boolean that_present_nf = true && (that.nf != null); - if (this_present_nf || that_present_nf) { - if (!(this_present_nf && that_present_nf)) - return false; - if (!this.nf.equals(that.nf)) - return false; - } - return true; } + @Override public int hashCode() { return 0; } @@ -7194,29 +11779,28 @@ public class Hbase { } switch (field.id) { - case 0: - if (field.type == TType.STRUCT) { - this.success = new TRowResult(); - this.success.read(iprot); - this.__isset.success = true; + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list58 = iprot.readListBegin(); + this.success = new ArrayList(_list58.size); + for (int _i59 = 0; _i59 < _list58.size; ++_i59) + { + TRowResult _elem60; + _elem60 = new TRowResult(); + _elem60.read(iprot); + this.success.add(_elem60); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: - if (field.type == TType.STRUCT) { - this.nf = new NotFound(); - this.nf.read(iprot); - this.__isset.nf = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -7228,69 +11812,94 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("getRowWithColumnsTs_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - if (this.success != null) { - field.name = "success"; - field.type = TType.STRUCT; - field.id = 0; - oprot.writeFieldBegin(field); - this.success.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.nf) { - if (this.nf != null) { - field.name = "nf"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.nf.write(oprot); - oprot.writeFieldEnd(); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (TRowResult _iter61 : this.success) { + _iter61.write(oprot); + } + oprot.writeListEnd(); } + oprot.writeFieldEnd(); + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("getRowWithColumnsTs_result("); + boolean first = true; + sb.append("success:"); - sb.append(this.success.toString()); - sb.append(",io:"); - sb.append(this.io.toString()); - sb.append(",nf:"); - sb.append(this.nf.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class mutateRow_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] row; - public List mutations; + public static class mutateRow_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("mutateRow_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); + private static final TField MUTATIONS_FIELD_DESC = new TField("mutations", TType.LIST, (short)3); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; - public boolean mutations = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] row; + public static final int ROW = 2; + public List mutations; + public static final int MUTATIONS = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(MUTATIONS, new FieldMetaData("mutations", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Mutation.class)))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(mutateRow_args.class, metaDataMap); } public mutateRow_args() { @@ -7303,13 +11912,180 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; this.mutations = mutations; - this.__isset.mutations = true; } + /** + * Performs a deep copy on other. + */ + public mutateRow_args(mutateRow_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetMutations()) { + List __this__mutations = new ArrayList(); + for (Mutation other_element : other.mutations) { + __this__mutations.add(new Mutation(other_element)); + } + this.mutations = __this__mutations; + } + } + + @Override + public mutateRow_args clone() { + return new mutateRow_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getMutationsSize() { + return (this.mutations == null) ? 0 : this.mutations.size(); + } + + public java.util.Iterator getMutationsIterator() { + return (this.mutations == null) ? null : this.mutations.iterator(); + } + + public void addToMutations(Mutation elem) { + if (this.mutations == null) { + this.mutations = new ArrayList(); + } + this.mutations.add(elem); + } + + public List getMutations() { + return this.mutations; + } + + public void setMutations(List mutations) { + this.mutations = mutations; + } + + public void unsetMutations() { + this.mutations = null; + } + + // Returns true if field mutations is set (has been asigned a value) and false otherwise + public boolean isSetMutations() { + return this.mutations != null; + } + + public void setMutationsIsSet(boolean value) { + if (!value) { + this.mutations = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case MUTATIONS: + if (value == null) { + unsetMutations(); + } else { + setMutations((List)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + case MUTATIONS: + return getMutations(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case MUTATIONS: + return isSetMutations(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -7322,8 +12098,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -7331,8 +12107,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -7340,8 +12116,8 @@ public class Hbase { return false; } - boolean this_present_mutations = true && (this.mutations != null); - boolean that_present_mutations = true && (that.mutations != null); + boolean this_present_mutations = true && this.isSetMutations(); + boolean that_present_mutations = true && that.isSetMutations(); if (this_present_mutations || that_present_mutations) { if (!(this_present_mutations && that_present_mutations)) return false; @@ -7352,6 +12128,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -7367,37 +12144,34 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case MUTATIONS: if (field.type == TType.LIST) { { - TList _list42 = iprot.readListBegin(); - this.mutations = new ArrayList(_list42.size); - for (int _i43 = 0; _i43 < _list42.size; ++_i43) + TList _list62 = iprot.readListBegin(); + this.mutations = new ArrayList(_list62.size); + for (int _i63 = 0; _i63 < _list62.size; ++_i63) { - Mutation _elem44 = new Mutation(); - _elem44 = new Mutation(); - _elem44.read(iprot); - this.mutations.add(_elem44); + Mutation _elem64; + _elem64 = new Mutation(); + _elem64.read(iprot); + this.mutations.add(_elem64); } iprot.readListEnd(); } - this.__isset.mutations = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -7409,37 +12183,32 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("mutateRow_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } if (this.mutations != null) { - field.name = "mutations"; - field.type = TType.LIST; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(MUTATIONS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.mutations.size())); - for (Mutation _iter45 : this.mutations) { - _iter45.write(oprot); + for (Mutation _iter65 : this.mutations) { + _iter65.write(oprot); } oprot.writeListEnd(); } @@ -7449,28 +12218,68 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("mutateRow_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); - sb.append(",mutations:"); - sb.append(this.mutations); + 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("mutations:"); + if (this.mutations == null) { + sb.append("null"); + } else { + sb.append(this.mutations); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class mutateRow_result implements TBase, java.io.Serializable { - public IOError io; - public IllegalArgument ia; + public static class mutateRow_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("mutateRow_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); + private static final TField IA_FIELD_DESC = new TField("ia", TType.STRUCT, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; - public boolean ia = false; + public IOError io; + public static final int IO = 1; + public IllegalArgument ia; + public static final int IA = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(mutateRow_result.class, metaDataMap); } public mutateRow_result() { @@ -7482,11 +12291,121 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; this.ia = ia; - this.__isset.ia = true; } + /** + * Performs a deep copy on other. + */ + public mutateRow_result(mutateRow_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + @Override + public mutateRow_result clone() { + return new mutateRow_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned a value) and false otherwise + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public void setIa(IllegalArgument ia) { + this.ia = ia; + } + + public void unsetIa() { + this.ia = null; + } + + // Returns true if field ia is set (has been asigned a value) and false otherwise + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + case IA: + return getIa(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + case IA: + return isSetIa(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -7499,8 +12418,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -7508,8 +12427,8 @@ public class Hbase { return false; } - boolean this_present_ia = true && (this.ia != null); - boolean that_present_ia = true && (that.ia != null); + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); if (this_present_ia || that_present_ia) { if (!(this_present_ia && that_present_ia)) return false; @@ -7520,6 +12439,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -7535,20 +12455,18 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case IA: if (field.type == TType.STRUCT) { this.ia = new IllegalArgument(); this.ia.read(iprot); - this.__isset.ia = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -7560,62 +12478,96 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("mutateRow_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.ia) { - if (this.ia != null) { - field.name = "ia"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.ia.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetIa()) { + oprot.writeFieldBegin(IA_FIELD_DESC); + this.ia.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("mutateRow_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); - sb.append(",ia:"); - sb.append(this.ia.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class mutateRowTs_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] row; - public List mutations; - public long timestamp; + public static class mutateRowTs_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("mutateRowTs_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); + private static final TField MUTATIONS_FIELD_DESC = new TField("mutations", TType.LIST, (short)3); + private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)4); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; - public boolean mutations = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] row; + public static final int ROW = 2; + public List mutations; + public static final int MUTATIONS = 3; + public long timestamp; + public static final int TIMESTAMP = 4; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean timestamp = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(MUTATIONS, new FieldMetaData("mutations", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Mutation.class)))); + put(TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(mutateRowTs_args.class, metaDataMap); + } + public mutateRowTs_args() { } @@ -7627,15 +12579,219 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; this.mutations = mutations; - this.__isset.mutations = true; this.timestamp = timestamp; this.__isset.timestamp = true; } + /** + * Performs a deep copy on other. + */ + public mutateRowTs_args(mutateRowTs_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetMutations()) { + List __this__mutations = new ArrayList(); + for (Mutation other_element : other.mutations) { + __this__mutations.add(new Mutation(other_element)); + } + this.mutations = __this__mutations; + } + __isset.timestamp = other.__isset.timestamp; + this.timestamp = other.timestamp; + } + + @Override + public mutateRowTs_args clone() { + return new mutateRowTs_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getMutationsSize() { + return (this.mutations == null) ? 0 : this.mutations.size(); + } + + public java.util.Iterator getMutationsIterator() { + return (this.mutations == null) ? null : this.mutations.iterator(); + } + + public void addToMutations(Mutation elem) { + if (this.mutations == null) { + this.mutations = new ArrayList(); + } + this.mutations.add(elem); + } + + public List getMutations() { + return this.mutations; + } + + public void setMutations(List mutations) { + this.mutations = mutations; + } + + public void unsetMutations() { + this.mutations = null; + } + + // Returns true if field mutations is set (has been asigned a value) and false otherwise + public boolean isSetMutations() { + return this.mutations != null; + } + + public void setMutationsIsSet(boolean value) { + if (!value) { + this.mutations = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + this.__isset.timestamp = true; + } + + public void unsetTimestamp() { + this.__isset.timestamp = false; + } + + // Returns true if field timestamp is set (has been asigned a value) and false otherwise + public boolean isSetTimestamp() { + return this.__isset.timestamp; + } + + public void setTimestampIsSet(boolean value) { + this.__isset.timestamp = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case MUTATIONS: + if (value == null) { + unsetMutations(); + } else { + setMutations((List)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + case MUTATIONS: + return getMutations(); + + case TIMESTAMP: + return new Long(getTimestamp()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case MUTATIONS: + return isSetMutations(); + case TIMESTAMP: + return isSetTimestamp(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -7648,8 +12804,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -7657,8 +12813,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -7666,8 +12822,8 @@ public class Hbase { return false; } - boolean this_present_mutations = true && (this.mutations != null); - boolean that_present_mutations = true && (that.mutations != null); + boolean this_present_mutations = true && this.isSetMutations(); + boolean that_present_mutations = true && that.isSetMutations(); if (this_present_mutations || that_present_mutations) { if (!(this_present_mutations && that_present_mutations)) return false; @@ -7687,6 +12843,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -7702,42 +12859,39 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case MUTATIONS: if (field.type == TType.LIST) { { - TList _list46 = iprot.readListBegin(); - this.mutations = new ArrayList(_list46.size); - for (int _i47 = 0; _i47 < _list46.size; ++_i47) + TList _list66 = iprot.readListBegin(); + this.mutations = new ArrayList(_list66.size); + for (int _i67 = 0; _i67 < _list66.size; ++_i67) { - Mutation _elem48 = new Mutation(); - _elem48 = new Mutation(); - _elem48.read(iprot); - this.mutations.add(_elem48); + Mutation _elem68; + _elem68 = new Mutation(); + _elem68.read(iprot); + this.mutations.add(_elem68); } iprot.readListEnd(); } - this.__isset.mutations = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: + case TIMESTAMP: if (field.type == TType.I64) { this.timestamp = iprot.readI64(); this.__isset.timestamp = true; @@ -7752,76 +12906,110 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("mutateRowTs_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } if (this.mutations != null) { - field.name = "mutations"; - field.type = TType.LIST; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(MUTATIONS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.mutations.size())); - for (Mutation _iter49 : this.mutations) { - _iter49.write(oprot); + for (Mutation _iter69 : this.mutations) { + _iter69.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } - field.name = "timestamp"; - field.type = TType.I64; - field.id = 4; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("mutateRowTs_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); - sb.append(",mutations:"); - sb.append(this.mutations); - sb.append(",timestamp:"); + 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("mutations:"); + if (this.mutations == null) { + sb.append("null"); + } else { + sb.append(this.mutations); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); sb.append(this.timestamp); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class mutateRowTs_result implements TBase, java.io.Serializable { - public IOError io; - public IllegalArgument ia; + public static class mutateRowTs_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("mutateRowTs_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); + private static final TField IA_FIELD_DESC = new TField("ia", TType.STRUCT, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; - public boolean ia = false; + public IOError io; + public static final int IO = 1; + public IllegalArgument ia; + public static final int IA = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(mutateRowTs_result.class, metaDataMap); } public mutateRowTs_result() { @@ -7833,11 +13021,121 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; this.ia = ia; - this.__isset.ia = true; } + /** + * Performs a deep copy on other. + */ + public mutateRowTs_result(mutateRowTs_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + @Override + public mutateRowTs_result clone() { + return new mutateRowTs_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned a value) and false otherwise + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public void setIa(IllegalArgument ia) { + this.ia = ia; + } + + public void unsetIa() { + this.ia = null; + } + + // Returns true if field ia is set (has been asigned a value) and false otherwise + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + case IA: + return getIa(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + case IA: + return isSetIa(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -7850,8 +13148,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -7859,8 +13157,8 @@ public class Hbase { return false; } - boolean this_present_ia = true && (this.ia != null); - boolean that_present_ia = true && (that.ia != null); + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); if (this_present_ia || that_present_ia) { if (!(this_present_ia && that_present_ia)) return false; @@ -7871,6 +13169,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -7886,20 +13185,18 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case IA: if (field.type == TType.STRUCT) { this.ia = new IllegalArgument(); this.ia.read(iprot); - this.__isset.ia = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -7911,56 +13208,83 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("mutateRowTs_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.ia) { - if (this.ia != null) { - field.name = "ia"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.ia.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetIa()) { + oprot.writeFieldBegin(IA_FIELD_DESC); + this.ia.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("mutateRowTs_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); - sb.append(",ia:"); - sb.append(this.ia.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class mutateRows_args implements TBase, java.io.Serializable { - public byte[] tableName; - public List rowBatches; + public static class mutateRows_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("mutateRows_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_BATCHES_FIELD_DESC = new TField("rowBatches", TType.LIST, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean rowBatches = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public List rowBatches; + public static final int ROWBATCHES = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROWBATCHES, new FieldMetaData("rowBatches", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, BatchMutation.class)))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(mutateRows_args.class, metaDataMap); } public mutateRows_args() { @@ -7972,11 +13296,140 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.rowBatches = rowBatches; - this.__isset.rowBatches = true; } + /** + * Performs a deep copy on other. + */ + public mutateRows_args(mutateRows_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRowBatches()) { + List __this__rowBatches = new ArrayList(); + for (BatchMutation other_element : other.rowBatches) { + __this__rowBatches.add(new BatchMutation(other_element)); + } + this.rowBatches = __this__rowBatches; + } + } + + @Override + public mutateRows_args clone() { + return new mutateRows_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public int getRowBatchesSize() { + return (this.rowBatches == null) ? 0 : this.rowBatches.size(); + } + + public java.util.Iterator getRowBatchesIterator() { + return (this.rowBatches == null) ? null : this.rowBatches.iterator(); + } + + public void addToRowBatches(BatchMutation elem) { + if (this.rowBatches == null) { + this.rowBatches = new ArrayList(); + } + this.rowBatches.add(elem); + } + + public List getRowBatches() { + return this.rowBatches; + } + + public void setRowBatches(List rowBatches) { + this.rowBatches = rowBatches; + } + + public void unsetRowBatches() { + this.rowBatches = null; + } + + // Returns true if field rowBatches is set (has been asigned a value) and false otherwise + public boolean isSetRowBatches() { + return this.rowBatches != null; + } + + public void setRowBatchesIsSet(boolean value) { + if (!value) { + this.rowBatches = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROWBATCHES: + if (value == null) { + unsetRowBatches(); + } else { + setRowBatches((List)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROWBATCHES: + return getRowBatches(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROWBATCHES: + return isSetRowBatches(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -7989,8 +13442,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -7998,8 +13451,8 @@ public class Hbase { return false; } - boolean this_present_rowBatches = true && (this.rowBatches != null); - boolean that_present_rowBatches = true && (that.rowBatches != null); + boolean this_present_rowBatches = true && this.isSetRowBatches(); + boolean that_present_rowBatches = true && that.isSetRowBatches(); if (this_present_rowBatches || that_present_rowBatches) { if (!(this_present_rowBatches && that_present_rowBatches)) return false; @@ -8010,6 +13463,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -8025,29 +13479,27 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROWBATCHES: if (field.type == TType.LIST) { { - TList _list50 = iprot.readListBegin(); - this.rowBatches = new ArrayList(_list50.size); - for (int _i51 = 0; _i51 < _list50.size; ++_i51) + TList _list70 = iprot.readListBegin(); + this.rowBatches = new ArrayList(_list70.size); + for (int _i71 = 0; _i71 < _list70.size; ++_i71) { - BatchMutation _elem52 = new BatchMutation(); - _elem52 = new BatchMutation(); - _elem52.read(iprot); - this.rowBatches.add(_elem52); + BatchMutation _elem72; + _elem72 = new BatchMutation(); + _elem72.read(iprot); + this.rowBatches.add(_elem72); } iprot.readListEnd(); } - this.__isset.rowBatches = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -8059,29 +13511,27 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("mutateRows_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.rowBatches != null) { - field.name = "rowBatches"; - field.type = TType.LIST; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_BATCHES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.rowBatches.size())); - for (BatchMutation _iter53 : this.rowBatches) { - _iter53.write(oprot); + for (BatchMutation _iter73 : this.rowBatches) { + _iter73.write(oprot); } oprot.writeListEnd(); } @@ -8091,26 +13541,60 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("mutateRows_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",rowBatches:"); - sb.append(this.rowBatches); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("rowBatches:"); + if (this.rowBatches == null) { + sb.append("null"); + } else { + sb.append(this.rowBatches); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class mutateRows_result implements TBase, java.io.Serializable { - public IOError io; - public IllegalArgument ia; + public static class mutateRows_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("mutateRows_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); + private static final TField IA_FIELD_DESC = new TField("ia", TType.STRUCT, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; - public boolean ia = false; + public IOError io; + public static final int IO = 1; + public IllegalArgument ia; + public static final int IA = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(mutateRows_result.class, metaDataMap); } public mutateRows_result() { @@ -8122,11 +13606,121 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; this.ia = ia; - this.__isset.ia = true; } + /** + * Performs a deep copy on other. + */ + public mutateRows_result(mutateRows_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + @Override + public mutateRows_result clone() { + return new mutateRows_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned a value) and false otherwise + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public void setIa(IllegalArgument ia) { + this.ia = ia; + } + + public void unsetIa() { + this.ia = null; + } + + // Returns true if field ia is set (has been asigned a value) and false otherwise + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + case IA: + return getIa(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + case IA: + return isSetIa(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -8139,8 +13733,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -8148,8 +13742,8 @@ public class Hbase { return false; } - boolean this_present_ia = true && (this.ia != null); - boolean that_present_ia = true && (that.ia != null); + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); if (this_present_ia || that_present_ia) { if (!(this_present_ia && that_present_ia)) return false; @@ -8160,6 +13754,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -8175,20 +13770,18 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case IA: if (field.type == TType.STRUCT) { this.ia = new IllegalArgument(); this.ia.read(iprot); - this.__isset.ia = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -8200,60 +13793,91 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("mutateRows_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.ia) { - if (this.ia != null) { - field.name = "ia"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.ia.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetIa()) { + oprot.writeFieldBegin(IA_FIELD_DESC); + this.ia.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("mutateRows_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); - sb.append(",ia:"); - sb.append(this.ia.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class mutateRowsTs_args implements TBase, java.io.Serializable { - public byte[] tableName; - public List rowBatches; - public long timestamp; + public static class mutateRowsTs_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("mutateRowsTs_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_BATCHES_FIELD_DESC = new TField("rowBatches", TType.LIST, (short)2); + private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)3); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean rowBatches = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public List rowBatches; + public static final int ROWBATCHES = 2; + public long timestamp; + public static final int TIMESTAMP = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean timestamp = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROWBATCHES, new FieldMetaData("rowBatches", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, BatchMutation.class)))); + put(TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(mutateRowsTs_args.class, metaDataMap); + } + public mutateRowsTs_args() { } @@ -8264,13 +13888,179 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.rowBatches = rowBatches; - this.__isset.rowBatches = true; this.timestamp = timestamp; this.__isset.timestamp = true; } + /** + * Performs a deep copy on other. + */ + public mutateRowsTs_args(mutateRowsTs_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRowBatches()) { + List __this__rowBatches = new ArrayList(); + for (BatchMutation other_element : other.rowBatches) { + __this__rowBatches.add(new BatchMutation(other_element)); + } + this.rowBatches = __this__rowBatches; + } + __isset.timestamp = other.__isset.timestamp; + this.timestamp = other.timestamp; + } + + @Override + public mutateRowsTs_args clone() { + return new mutateRowsTs_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public int getRowBatchesSize() { + return (this.rowBatches == null) ? 0 : this.rowBatches.size(); + } + + public java.util.Iterator getRowBatchesIterator() { + return (this.rowBatches == null) ? null : this.rowBatches.iterator(); + } + + public void addToRowBatches(BatchMutation elem) { + if (this.rowBatches == null) { + this.rowBatches = new ArrayList(); + } + this.rowBatches.add(elem); + } + + public List getRowBatches() { + return this.rowBatches; + } + + public void setRowBatches(List rowBatches) { + this.rowBatches = rowBatches; + } + + public void unsetRowBatches() { + this.rowBatches = null; + } + + // Returns true if field rowBatches is set (has been asigned a value) and false otherwise + public boolean isSetRowBatches() { + return this.rowBatches != null; + } + + public void setRowBatchesIsSet(boolean value) { + if (!value) { + this.rowBatches = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + this.__isset.timestamp = true; + } + + public void unsetTimestamp() { + this.__isset.timestamp = false; + } + + // Returns true if field timestamp is set (has been asigned a value) and false otherwise + public boolean isSetTimestamp() { + return this.__isset.timestamp; + } + + public void setTimestampIsSet(boolean value) { + this.__isset.timestamp = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROWBATCHES: + if (value == null) { + unsetRowBatches(); + } else { + setRowBatches((List)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROWBATCHES: + return getRowBatches(); + + case TIMESTAMP: + return new Long(getTimestamp()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROWBATCHES: + return isSetRowBatches(); + case TIMESTAMP: + return isSetTimestamp(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -8283,8 +14073,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -8292,8 +14082,8 @@ public class Hbase { return false; } - boolean this_present_rowBatches = true && (this.rowBatches != null); - boolean that_present_rowBatches = true && (that.rowBatches != null); + boolean this_present_rowBatches = true && this.isSetRowBatches(); + boolean that_present_rowBatches = true && that.isSetRowBatches(); if (this_present_rowBatches || that_present_rowBatches) { if (!(this_present_rowBatches && that_present_rowBatches)) return false; @@ -8313,6 +14103,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -8328,34 +14119,32 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROWBATCHES: if (field.type == TType.LIST) { { - TList _list54 = iprot.readListBegin(); - this.rowBatches = new ArrayList(_list54.size); - for (int _i55 = 0; _i55 < _list54.size; ++_i55) + TList _list74 = iprot.readListBegin(); + this.rowBatches = new ArrayList(_list74.size); + for (int _i75 = 0; _i75 < _list74.size; ++_i75) { - BatchMutation _elem56 = new BatchMutation(); - _elem56 = new BatchMutation(); - _elem56.read(iprot); - this.rowBatches.add(_elem56); + BatchMutation _elem76; + _elem76 = new BatchMutation(); + _elem76.read(iprot); + this.rowBatches.add(_elem76); } iprot.readListEnd(); } - this.__isset.rowBatches = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case TIMESTAMP: if (field.type == TType.I64) { this.timestamp = iprot.readI64(); this.__isset.timestamp = true; @@ -8370,66 +14159,97 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("mutateRowsTs_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.rowBatches != null) { - field.name = "rowBatches"; - field.type = TType.LIST; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_BATCHES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.rowBatches.size())); - for (BatchMutation _iter57 : this.rowBatches) { - _iter57.write(oprot); + for (BatchMutation _iter77 : this.rowBatches) { + _iter77.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } - field.name = "timestamp"; - field.type = TType.I64; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("mutateRowsTs_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",rowBatches:"); - sb.append(this.rowBatches); - sb.append(",timestamp:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("rowBatches:"); + if (this.rowBatches == null) { + sb.append("null"); + } else { + sb.append(this.rowBatches); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); sb.append(this.timestamp); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class mutateRowsTs_result implements TBase, java.io.Serializable { - public IOError io; - public IllegalArgument ia; + public static class mutateRowsTs_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("mutateRowsTs_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); + private static final TField IA_FIELD_DESC = new TField("ia", TType.STRUCT, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; - public boolean ia = false; + public IOError io; + public static final int IO = 1; + public IllegalArgument ia; + public static final int IA = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(mutateRowsTs_result.class, metaDataMap); } public mutateRowsTs_result() { @@ -8441,11 +14261,121 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; this.ia = ia; - this.__isset.ia = true; } + /** + * Performs a deep copy on other. + */ + public mutateRowsTs_result(mutateRowsTs_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + @Override + public mutateRowsTs_result clone() { + return new mutateRowsTs_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned a value) and false otherwise + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public void setIa(IllegalArgument ia) { + this.ia = ia; + } + + public void unsetIa() { + this.ia = null; + } + + // Returns true if field ia is set (has been asigned a value) and false otherwise + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + case IA: + return getIa(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + case IA: + return isSetIa(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -8458,8 +14388,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -8467,8 +14397,8 @@ public class Hbase { return false; } - boolean this_present_ia = true && (this.ia != null); - boolean that_present_ia = true && (that.ia != null); + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); if (this_present_ia || that_present_ia) { if (!(this_present_ia && that_present_ia)) return false; @@ -8479,6 +14409,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -8494,20 +14425,18 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case IA: if (field.type == TType.STRUCT) { this.ia = new IllegalArgument(); this.ia.read(iprot); - this.__isset.ia = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -8519,82 +14448,300 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("mutateRowsTs_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.ia) { - if (this.ia != null) { - field.name = "ia"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.ia.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetIa()) { + oprot.writeFieldBegin(IA_FIELD_DESC); + this.ia.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("mutateRowsTs_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); - sb.append(",ia:"); - sb.append(this.ia.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; sb.append(")"); return sb.toString(); } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class atomicIncrement_args implements TBase, java.io.Serializable { + public static class atomicIncrement_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("atomicIncrement_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); + private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRING, (short)3); + private static final TField VALUE_FIELD_DESC = new TField("value", TType.I64, (short)4); + public byte[] tableName; + public static final int TABLENAME = 1; public byte[] row; + public static final int ROW = 2; public byte[] column; + public static final int COLUMN = 3; public long value; + public static final int VALUE = 4; - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; - public boolean column = false; + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean value = false; + } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(atomicIncrement_args.class, metaDataMap); } public atomicIncrement_args() { } public atomicIncrement_args( - byte[] tableName, - byte[] row, - byte[] column, - long value) + byte[] tableName, + byte[] row, + byte[] column, + long value) { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; this.column = column; - this.__isset.column = true; this.value = value; this.__isset.value = true; } + /** + * Performs a deep copy on other. + */ + public atomicIncrement_args(atomicIncrement_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumn()) { + this.column = other.column; + } + __isset.value = other.__isset.value; + this.value = other.value; + } + + @Override + public atomicIncrement_args clone() { + return new atomicIncrement_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public byte[] getColumn() { + return this.column; + } + + public void setColumn(byte[] column) { + this.column = column; + } + + public void unsetColumn() { + this.column = null; + } + + // Returns true if field column is set (has been asigned a value) and false otherwise + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + public long getValue() { + return this.value; + } + + public void setValue(long value) { + this.value = value; + this.__isset.value = true; + } + + public void unsetValue() { + this.__isset.value = false; + } + + // Returns true if field value is set (has been asigned a value) and false otherwise + public boolean isSetValue() { + return this.__isset.value; + } + + public void setValueIsSet(boolean value) { + this.__isset.value = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((byte[])value); + } + break; + + case VALUE: + if (value == null) { + unsetValue(); + } else { + setValue((Long)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMN: + return getColumn(); + + case VALUE: + return new Long(getValue()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMN: + return isSetColumn(); + case VALUE: + return isSetValue(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -8607,8 +14754,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -8616,8 +14763,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -8625,9 +14772,8 @@ public class Hbase { return false; } - - boolean this_present_column = true && (this.column != null); - boolean that_present_column = true && (that.column != null); + 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; @@ -8647,6 +14793,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -8657,40 +14804,37 @@ public class Hbase { while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == TType.STOP) { break; } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; - } else { + } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; - } else { + } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case COLUMN: if (field.type == TType.STRING) { this.column = iprot.readBinary(); - this.__isset.column = true; - } else { + } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: + case VALUE: if (field.type == TType.I64) { this.value = iprot.readI64(); this.__isset.value = true; - } else { + } else { TProtocolUtil.skip(iprot, field.type); } break; @@ -8701,91 +14845,276 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("atomicIncrement_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } if (this.column != null) { - field.name = "column"; - field.type = TType.STRING; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMN_FIELD_DESC); oprot.writeBinary(this.column); oprot.writeFieldEnd(); } - field.name = "value"; - field.type = TType.I64; - field.id = 4; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(VALUE_FIELD_DESC); oprot.writeI64(this.value); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("atomicIncrement_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); - sb.append(",column:"); - sb.append(this.column); - sb.append(",value:"); + 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("value:"); sb.append(this.value); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class atomicIncrement_result implements TBase, java.io.Serializable { - public long success; - public IOError io; - public IllegalArgument ia; + public static class atomicIncrement_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("atomicIncrement_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); + private static final TField IA_FIELD_DESC = new TField("ia", TType.STRUCT, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { + public long success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + public IllegalArgument ia; + public static final int IA = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean success = false; - public boolean io = false; - public boolean ia = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(atomicIncrement_result.class, metaDataMap); } public atomicIncrement_result() { } public atomicIncrement_result( - long success, - IOError io, - IllegalArgument ia) + long success, + IOError io, + IllegalArgument ia) { this(); this.success = success; this.__isset.success = true; this.io = io; - this.__isset.io = true; this.ia = ia; - this.__isset.ia = true; } + /** + * Performs a deep copy on other. + */ + public atomicIncrement_result(atomicIncrement_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + @Override + public atomicIncrement_result clone() { + return new atomicIncrement_result(this); + } + + public long getSuccess() { + return this.success; + } + + public void setSuccess(long success) { + this.success = success; + this.__isset.success = true; + } + + public void unsetSuccess() { + this.__isset.success = false; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; + } + + public void setSuccessIsSet(boolean value) { + this.__isset.success = value; + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned a value) and false otherwise + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public void setIa(IllegalArgument ia) { + this.ia = ia; + } + + public void unsetIa() { + this.ia = null; + } + + // Returns true if field ia is set (has been asigned a value) and false otherwise + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Long)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return new Long(getSuccess()); + + case IO: + return getIo(); + + case IA: + return getIa(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + case IA: + return isSetIa(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -8807,8 +15136,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -8816,8 +15145,8 @@ public class Hbase { return false; } - boolean this_present_ia = true && (this.ia != null); - boolean that_present_ia = true && (that.ia != null); + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); if (this_present_ia || that_present_ia) { if (!(this_present_ia && that_present_ia)) return false; @@ -8828,6 +15157,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -8838,34 +15168,32 @@ public class Hbase { while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == TType.STOP) { break; } switch (field.id) { - case 0: + case SUCCESS: if (field.type == TType.I64) { this.success = iprot.readI64(); this.__isset.success = true; - } else { + } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; - } else { + } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case IA: if (field.type == TType.STRUCT) { this.ia = new IllegalArgument(); this.ia.read(iprot); - this.__isset.ia = true; - } else { + } else { TProtocolUtil.skip(iprot, field.type); } break; @@ -8876,71 +15204,95 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("atomicIncrement_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - field.name = "success"; - field.type = TType.I64; - field.id = 0; - oprot.writeFieldBegin(field); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI64(this.success); oprot.writeFieldEnd(); - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.ia) { - if (this.ia != null) { - field.name = "ia"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.ia.write(oprot); - oprot.writeFieldEnd(); - } + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetIa()) { + oprot.writeFieldBegin(IA_FIELD_DESC); + this.ia.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("atomicIncrement_result("); + boolean first = true; + sb.append("success:"); sb.append(this.success); - sb.append(",io:"); - sb.append(this.io.toString()); - sb.append(",ia:"); - sb.append(this.ia.toString()); - - + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } + public static class deleteAll_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("deleteAll_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); + private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRING, (short)3); - - public static class deleteAll_args implements TBase, java.io.Serializable { public byte[] tableName; + public static final int TABLENAME = 1; public byte[] row; + public static final int ROW = 2; public byte[] column; + public static final int COLUMN = 3; - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; - public boolean column = false; + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(deleteAll_args.class, metaDataMap); } public deleteAll_args() { @@ -8953,13 +15305,161 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; this.column = column; - this.__isset.column = true; } + /** + * Performs a deep copy on other. + */ + public deleteAll_args(deleteAll_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumn()) { + this.column = other.column; + } + } + + @Override + public deleteAll_args clone() { + return new deleteAll_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public byte[] getColumn() { + return this.column; + } + + public void setColumn(byte[] column) { + this.column = column; + } + + public void unsetColumn() { + this.column = null; + } + + // Returns true if field column is set (has been asigned a value) and false otherwise + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((byte[])value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMN: + return getColumn(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMN: + return isSetColumn(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -8972,8 +15472,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -8981,8 +15481,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -8990,8 +15490,8 @@ public class Hbase { return false; } - boolean this_present_column = true && (this.column != null); - boolean that_present_column = true && (that.column != null); + 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; @@ -9002,6 +15502,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -9017,26 +15518,23 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case COLUMN: if (field.type == TType.STRING) { this.column = iprot.readBinary(); - this.__isset.column = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -9048,33 +15546,28 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("deleteAll_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } if (this.column != null) { - field.name = "column"; - field.type = TType.STRING; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMN_FIELD_DESC); oprot.writeBinary(this.column); oprot.writeFieldEnd(); } @@ -9082,26 +15575,63 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("deleteAll_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); - sb.append(",column:"); - sb.append(this.column); + 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; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class deleteAll_result implements TBase, java.io.Serializable { - public IOError io; + public static class deleteAll_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("deleteAll_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(deleteAll_result.class, metaDataMap); } public deleteAll_result() { @@ -9112,9 +15642,81 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public deleteAll_result(deleteAll_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public deleteAll_result clone() { + return new deleteAll_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -9127,8 +15729,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -9139,6 +15741,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -9154,11 +15757,10 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -9170,51 +15772,83 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("deleteAll_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("deleteAll_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class deleteAllTs_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] row; - public byte[] column; - public long timestamp; + public static class deleteAllTs_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("deleteAllTs_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); + private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRING, (short)3); + private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)4); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; - public boolean column = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] row; + public static final int ROW = 2; + public byte[] column; + public static final int COLUMN = 3; + public long timestamp; + public static final int TIMESTAMP = 4; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean timestamp = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(deleteAllTs_args.class, metaDataMap); + } + public deleteAllTs_args() { } @@ -9226,15 +15860,200 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; this.column = column; - this.__isset.column = true; this.timestamp = timestamp; this.__isset.timestamp = true; } + /** + * Performs a deep copy on other. + */ + public deleteAllTs_args(deleteAllTs_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumn()) { + this.column = other.column; + } + __isset.timestamp = other.__isset.timestamp; + this.timestamp = other.timestamp; + } + + @Override + public deleteAllTs_args clone() { + return new deleteAllTs_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public byte[] getColumn() { + return this.column; + } + + public void setColumn(byte[] column) { + this.column = column; + } + + public void unsetColumn() { + this.column = null; + } + + // Returns true if field column is set (has been asigned a value) and false otherwise + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + this.__isset.timestamp = true; + } + + public void unsetTimestamp() { + this.__isset.timestamp = false; + } + + // Returns true if field timestamp is set (has been asigned a value) and false otherwise + public boolean isSetTimestamp() { + return this.__isset.timestamp; + } + + public void setTimestampIsSet(boolean value) { + this.__isset.timestamp = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((byte[])value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMN: + return getColumn(); + + case TIMESTAMP: + return new Long(getTimestamp()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMN: + return isSetColumn(); + case TIMESTAMP: + return isSetTimestamp(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -9247,8 +16066,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -9256,8 +16075,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -9265,8 +16084,8 @@ public class Hbase { return false; } - boolean this_present_column = true && (this.column != null); - boolean that_present_column = true && (that.column != null); + 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; @@ -9286,6 +16105,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -9301,31 +16121,28 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case COLUMN: if (field.type == TType.STRING) { this.column = iprot.readBinary(); - this.__isset.column = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: + case TIMESTAMP: if (field.type == TType.I64) { this.timestamp = iprot.readI64(); this.__isset.timestamp = true; @@ -9340,68 +16157,99 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("deleteAllTs_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } if (this.column != null) { - field.name = "column"; - field.type = TType.STRING; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMN_FIELD_DESC); oprot.writeBinary(this.column); oprot.writeFieldEnd(); } - field.name = "timestamp"; - field.type = TType.I64; - field.id = 4; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("deleteAllTs_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); - sb.append(",column:"); - sb.append(this.column); - sb.append(",timestamp:"); + 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("timestamp:"); sb.append(this.timestamp); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class deleteAllTs_result implements TBase, java.io.Serializable { - public IOError io; + public static class deleteAllTs_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("deleteAllTs_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(deleteAllTs_result.class, metaDataMap); } public deleteAllTs_result() { @@ -9412,9 +16260,81 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public deleteAllTs_result(deleteAllTs_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public deleteAllTs_result clone() { + return new deleteAllTs_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -9427,8 +16347,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -9439,6 +16359,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -9454,11 +16375,10 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -9470,45 +16390,70 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("deleteAllTs_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("deleteAllTs_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class deleteAllRow_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] row; + public static class deleteAllRow_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("deleteAllRow_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] row; + public static final int ROW = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(deleteAllRow_args.class, metaDataMap); } public deleteAllRow_args() { @@ -9520,11 +16465,121 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; } + /** + * Performs a deep copy on other. + */ + public deleteAllRow_args(deleteAllRow_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + } + + @Override + public deleteAllRow_args clone() { + return new deleteAllRow_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -9537,8 +16592,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -9546,8 +16601,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -9558,6 +16613,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -9573,18 +16629,16 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -9596,25 +16650,23 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("deleteAllRow_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } @@ -9622,24 +16674,55 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("deleteAllRow_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); + 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; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class deleteAllRow_result implements TBase, java.io.Serializable { - public IOError io; + public static class deleteAllRow_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("deleteAllRow_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(deleteAllRow_result.class, metaDataMap); } public deleteAllRow_result() { @@ -9650,9 +16733,81 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public deleteAllRow_result(deleteAllRow_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public deleteAllRow_result clone() { + return new deleteAllRow_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -9665,8 +16820,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -9677,6 +16832,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -9692,11 +16848,10 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -9708,49 +16863,78 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("deleteAllRow_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("deleteAllRow_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class deleteAllRowTs_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] row; - public long timestamp; + public static class deleteAllRowTs_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("deleteAllRowTs_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)2); + private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)3); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean row = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] row; + public static final int ROW = 2; + public long timestamp; + public static final int TIMESTAMP = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean timestamp = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(deleteAllRowTs_args.class, metaDataMap); + } + public deleteAllRowTs_args() { } @@ -9761,13 +16945,160 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.row = row; - this.__isset.row = true; this.timestamp = timestamp; this.__isset.timestamp = true; } + /** + * Performs a deep copy on other. + */ + public deleteAllRowTs_args(deleteAllRowTs_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + __isset.timestamp = other.__isset.timestamp; + this.timestamp = other.timestamp; + } + + @Override + public deleteAllRowTs_args clone() { + return new deleteAllRowTs_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + this.__isset.timestamp = true; + } + + public void unsetTimestamp() { + this.__isset.timestamp = false; + } + + // Returns true if field timestamp is set (has been asigned a value) and false otherwise + public boolean isSetTimestamp() { + return this.__isset.timestamp; + } + + public void setTimestampIsSet(boolean value) { + this.__isset.timestamp = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case ROW: + return getRow(); + + case TIMESTAMP: + return new Long(getTimestamp()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case TIMESTAMP: + return isSetTimestamp(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -9780,8 +17111,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -9789,8 +17120,8 @@ public class Hbase { return false; } - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -9810,6 +17141,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -9825,23 +17157,21 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case TIMESTAMP: if (field.type == TType.I64) { this.timestamp = iprot.readI64(); this.__isset.timestamp = true; @@ -9856,58 +17186,86 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("deleteAllRowTs_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } - field.name = "timestamp"; - field.type = TType.I64; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("deleteAllRowTs_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",row:"); - sb.append(this.row); - sb.append(",timestamp:"); + 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("timestamp:"); sb.append(this.timestamp); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class deleteAllRowTs_result implements TBase, java.io.Serializable { - public IOError io; + public static class deleteAllRowTs_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("deleteAllRowTs_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(deleteAllRowTs_result.class, metaDataMap); } public deleteAllRowTs_result() { @@ -9918,9 +17276,81 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public deleteAllRowTs_result(deleteAllRowTs_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public deleteAllRowTs_result clone() { + return new deleteAllRowTs_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -9933,8 +17363,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -9945,6 +17375,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -9960,11 +17391,10 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -9976,47 +17406,76 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("deleteAllRowTs_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("deleteAllRowTs_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class scannerOpen_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] startRow; - public List columns; + public static class scannerOpen_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerOpen_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField START_ROW_FIELD_DESC = new TField("startRow", TType.STRING, (short)2); + private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.LIST, (short)3); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean startRow = false; - public boolean columns = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] startRow; + public static final int STARTROW = 2; + public List columns; + public static final int COLUMNS = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(STARTROW, new FieldMetaData("startRow", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerOpen_args.class, metaDataMap); } public scannerOpen_args() { @@ -10029,13 +17488,180 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.startRow = startRow; - this.__isset.startRow = true; this.columns = columns; - this.__isset.columns = true; } + /** + * Performs a deep copy on other. + */ + public scannerOpen_args(scannerOpen_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetStartRow()) { + this.startRow = other.startRow; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (byte[] other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + } + + @Override + public scannerOpen_args clone() { + return new scannerOpen_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getStartRow() { + return this.startRow; + } + + public void setStartRow(byte[] startRow) { + this.startRow = startRow; + } + + public void unsetStartRow() { + this.startRow = null; + } + + // Returns true if field startRow is set (has been asigned a value) and false otherwise + public boolean isSetStartRow() { + return this.startRow != null; + } + + public void setStartRowIsSet(boolean value) { + if (!value) { + this.startRow = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(byte[] elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + public List getColumns() { + return this.columns; + } + + public void setColumns(List columns) { + this.columns = columns; + } + + public void unsetColumns() { + this.columns = null; + } + + // Returns true if field columns is set (has been asigned a value) and false otherwise + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case STARTROW: + if (value == null) { + unsetStartRow(); + } else { + setStartRow((byte[])value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case STARTROW: + return getStartRow(); + + case COLUMNS: + return getColumns(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case STARTROW: + return isSetStartRow(); + case COLUMNS: + return isSetColumns(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -10048,8 +17674,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -10057,8 +17683,8 @@ public class Hbase { return false; } - boolean this_present_startRow = true && (this.startRow != null); - boolean that_present_startRow = true && (that.startRow != null); + boolean this_present_startRow = true && this.isSetStartRow(); + boolean that_present_startRow = true && that.isSetStartRow(); if (this_present_startRow || that_present_startRow) { if (!(this_present_startRow && that_present_startRow)) return false; @@ -10066,8 +17692,8 @@ public class Hbase { return false; } - boolean this_present_columns = true && (this.columns != null); - boolean that_present_columns = true && (that.columns != null); + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); if (this_present_columns || that_present_columns) { if (!(this_present_columns && that_present_columns)) return false; @@ -10078,6 +17704,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -10093,36 +17720,33 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case STARTROW: if (field.type == TType.STRING) { this.startRow = iprot.readBinary(); - this.__isset.startRow = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case COLUMNS: if (field.type == TType.LIST) { { - TList _list58 = iprot.readListBegin(); - this.columns = new ArrayList(_list58.size); - for (int _i59 = 0; _i59 < _list58.size; ++_i59) + TList _list78 = iprot.readListBegin(); + this.columns = new ArrayList(_list78.size); + for (int _i79 = 0; _i79 < _list78.size; ++_i79) { - byte[] _elem60 = null; - _elem60 = iprot.readBinary(); - this.columns.add(_elem60); + byte[] _elem80; + _elem80 = iprot.readBinary(); + this.columns.add(_elem80); } iprot.readListEnd(); } - this.__isset.columns = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -10134,37 +17758,32 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("scannerOpen_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.startRow != null) { - field.name = "startRow"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(START_ROW_FIELD_DESC); oprot.writeBinary(this.startRow); oprot.writeFieldEnd(); } if (this.columns != null) { - field.name = "columns"; - field.type = TType.LIST; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter61 : this.columns) { - oprot.writeBinary(_iter61); + for (byte[] _iter81 : this.columns) { + oprot.writeBinary(_iter81); } oprot.writeListEnd(); } @@ -10174,28 +17793,69 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("scannerOpen_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",startRow:"); - sb.append(this.startRow); - sb.append(",columns:"); - sb.append(this.columns); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("startRow:"); + if (this.startRow == null) { + sb.append("null"); + } else { + sb.append(this.startRow); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class scannerOpen_result implements TBase, java.io.Serializable { - public int success; - public IOError io; + public static class scannerOpen_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerOpen_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { + public int success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean success = false; - public boolean io = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerOpen_result.class, metaDataMap); } public scannerOpen_result() { @@ -10209,9 +17869,118 @@ public class Hbase { this.success = success; this.__isset.success = true; this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public scannerOpen_result(scannerOpen_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public scannerOpen_result clone() { + return new scannerOpen_result(this); + } + + public int getSuccess() { + return this.success; + } + + public void setSuccess(int success) { + this.success = success; + this.__isset.success = true; + } + + public void unsetSuccess() { + this.__isset.success = false; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; + } + + public void setSuccessIsSet(boolean value) { + this.__isset.success = value; + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return new Integer(getSuccess()); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -10233,8 +18002,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -10245,6 +18014,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -10260,7 +18030,7 @@ public class Hbase { } switch (field.id) { - case 0: + case SUCCESS: if (field.type == TType.I32) { this.success = iprot.readI32(); this.__isset.success = true; @@ -10268,11 +18038,10 @@ public class Hbase { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -10284,58 +18053,89 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("scannerOpen_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - field.name = "success"; - field.type = TType.I32; - field.id = 0; - oprot.writeFieldBegin(field); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(this.success); oprot.writeFieldEnd(); - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("scannerOpen_result("); + boolean first = true; + sb.append("success:"); sb.append(this.success); - sb.append(",io:"); - sb.append(this.io.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class scannerOpenWithStop_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] startRow; - public byte[] stopRow; - public List columns; + public static class scannerOpenWithStop_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerOpenWithStop_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField START_ROW_FIELD_DESC = new TField("startRow", TType.STRING, (short)2); + private static final TField STOP_ROW_FIELD_DESC = new TField("stopRow", TType.STRING, (short)3); + private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.LIST, (short)4); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean startRow = false; - public boolean stopRow = false; - public boolean columns = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] startRow; + public static final int STARTROW = 2; + public byte[] stopRow; + public static final int STOPROW = 3; + public List columns; + public static final int COLUMNS = 4; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(STARTROW, new FieldMetaData("startRow", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(STOPROW, new FieldMetaData("stopRow", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerOpenWithStop_args.class, metaDataMap); } public scannerOpenWithStop_args() { @@ -10349,15 +18149,220 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.startRow = startRow; - this.__isset.startRow = true; this.stopRow = stopRow; - this.__isset.stopRow = true; this.columns = columns; - this.__isset.columns = true; } + /** + * Performs a deep copy on other. + */ + public scannerOpenWithStop_args(scannerOpenWithStop_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetStartRow()) { + this.startRow = other.startRow; + } + if (other.isSetStopRow()) { + this.stopRow = other.stopRow; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (byte[] other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + } + + @Override + public scannerOpenWithStop_args clone() { + return new scannerOpenWithStop_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getStartRow() { + return this.startRow; + } + + public void setStartRow(byte[] startRow) { + this.startRow = startRow; + } + + public void unsetStartRow() { + this.startRow = null; + } + + // Returns true if field startRow is set (has been asigned a value) and false otherwise + public boolean isSetStartRow() { + return this.startRow != null; + } + + public void setStartRowIsSet(boolean value) { + if (!value) { + this.startRow = null; + } + } + + public byte[] getStopRow() { + return this.stopRow; + } + + public void setStopRow(byte[] stopRow) { + this.stopRow = stopRow; + } + + public void unsetStopRow() { + this.stopRow = null; + } + + // Returns true if field stopRow is set (has been asigned a value) and false otherwise + public boolean isSetStopRow() { + return this.stopRow != null; + } + + public void setStopRowIsSet(boolean value) { + if (!value) { + this.stopRow = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(byte[] elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + public List getColumns() { + return this.columns; + } + + public void setColumns(List columns) { + this.columns = columns; + } + + public void unsetColumns() { + this.columns = null; + } + + // Returns true if field columns is set (has been asigned a value) and false otherwise + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case STARTROW: + if (value == null) { + unsetStartRow(); + } else { + setStartRow((byte[])value); + } + break; + + case STOPROW: + if (value == null) { + unsetStopRow(); + } else { + setStopRow((byte[])value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case STARTROW: + return getStartRow(); + + case STOPROW: + return getStopRow(); + + case COLUMNS: + return getColumns(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case STARTROW: + return isSetStartRow(); + case STOPROW: + return isSetStopRow(); + case COLUMNS: + return isSetColumns(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -10370,8 +18375,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -10379,8 +18384,8 @@ public class Hbase { return false; } - boolean this_present_startRow = true && (this.startRow != null); - boolean that_present_startRow = true && (that.startRow != null); + boolean this_present_startRow = true && this.isSetStartRow(); + boolean that_present_startRow = true && that.isSetStartRow(); if (this_present_startRow || that_present_startRow) { if (!(this_present_startRow && that_present_startRow)) return false; @@ -10388,8 +18393,8 @@ public class Hbase { return false; } - boolean this_present_stopRow = true && (this.stopRow != null); - boolean that_present_stopRow = true && (that.stopRow != null); + boolean this_present_stopRow = true && this.isSetStopRow(); + boolean that_present_stopRow = true && that.isSetStopRow(); if (this_present_stopRow || that_present_stopRow) { if (!(this_present_stopRow && that_present_stopRow)) return false; @@ -10397,8 +18402,8 @@ public class Hbase { return false; } - boolean this_present_columns = true && (this.columns != null); - boolean that_present_columns = true && (that.columns != null); + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); if (this_present_columns || that_present_columns) { if (!(this_present_columns && that_present_columns)) return false; @@ -10409,6 +18414,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -10424,44 +18430,40 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case STARTROW: if (field.type == TType.STRING) { this.startRow = iprot.readBinary(); - this.__isset.startRow = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case STOPROW: if (field.type == TType.STRING) { this.stopRow = iprot.readBinary(); - this.__isset.stopRow = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: + case COLUMNS: if (field.type == TType.LIST) { { - TList _list62 = iprot.readListBegin(); - this.columns = new ArrayList(_list62.size); - for (int _i63 = 0; _i63 < _list62.size; ++_i63) + TList _list82 = iprot.readListBegin(); + this.columns = new ArrayList(_list82.size); + for (int _i83 = 0; _i83 < _list82.size; ++_i83) { - byte[] _elem64 = null; - _elem64 = iprot.readBinary(); - this.columns.add(_elem64); + byte[] _elem84; + _elem84 = iprot.readBinary(); + this.columns.add(_elem84); } iprot.readListEnd(); } - this.__isset.columns = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -10473,45 +18475,37 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("scannerOpenWithStop_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.startRow != null) { - field.name = "startRow"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(START_ROW_FIELD_DESC); oprot.writeBinary(this.startRow); oprot.writeFieldEnd(); } if (this.stopRow != null) { - field.name = "stopRow"; - field.type = TType.STRING; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(STOP_ROW_FIELD_DESC); oprot.writeBinary(this.stopRow); oprot.writeFieldEnd(); } if (this.columns != null) { - field.name = "columns"; - field.type = TType.LIST; - field.id = 4; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter65 : this.columns) { - oprot.writeBinary(_iter65); + for (byte[] _iter85 : this.columns) { + oprot.writeBinary(_iter85); } oprot.writeListEnd(); } @@ -10521,30 +18515,77 @@ public class Hbase { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("scannerOpenWithStop_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",startRow:"); - sb.append(this.startRow); - sb.append(",stopRow:"); - sb.append(this.stopRow); - sb.append(",columns:"); - sb.append(this.columns); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("startRow:"); + if (this.startRow == null) { + sb.append("null"); + } else { + sb.append(this.startRow); + } + first = false; + if (!first) sb.append(", "); + sb.append("stopRow:"); + if (this.stopRow == null) { + sb.append("null"); + } else { + sb.append(this.stopRow); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class scannerOpenWithStop_result implements TBase, java.io.Serializable { - public int success; - public IOError io; + public static class scannerOpenWithStop_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerOpenWithStop_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { + public int success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean success = false; - public boolean io = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerOpenWithStop_result.class, metaDataMap); } public scannerOpenWithStop_result() { @@ -10558,9 +18599,118 @@ public class Hbase { this.success = success; this.__isset.success = true; this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public scannerOpenWithStop_result(scannerOpenWithStop_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public scannerOpenWithStop_result clone() { + return new scannerOpenWithStop_result(this); + } + + public int getSuccess() { + return this.success; + } + + public void setSuccess(int success) { + this.success = success; + this.__isset.success = true; + } + + public void unsetSuccess() { + this.__isset.success = false; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; + } + + public void setSuccessIsSet(boolean value) { + this.__isset.success = value; + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return new Integer(getSuccess()); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -10582,8 +18732,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -10594,6 +18744,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -10609,7 +18760,7 @@ public class Hbase { } switch (field.id) { - case 0: + case SUCCESS: if (field.type == TType.I32) { this.success = iprot.readI32(); this.__isset.success = true; @@ -10617,11 +18768,10 @@ public class Hbase { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -10633,60 +18783,92 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("scannerOpenWithStop_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - field.name = "success"; - field.type = TType.I32; - field.id = 0; - oprot.writeFieldBegin(field); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(this.success); oprot.writeFieldEnd(); - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("scannerOpenWithStop_result("); + boolean first = true; + sb.append("success:"); sb.append(this.success); - sb.append(",io:"); - sb.append(this.io.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class scannerOpenTs_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] startRow; - public List columns; - public long timestamp; + public static class scannerOpenTs_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerOpenTs_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField START_ROW_FIELD_DESC = new TField("startRow", TType.STRING, (short)2); + private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.LIST, (short)3); + private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)4); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean startRow = false; - public boolean columns = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] startRow; + public static final int STARTROW = 2; + public List columns; + public static final int COLUMNS = 3; + public long timestamp; + public static final int TIMESTAMP = 4; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean timestamp = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(STARTROW, new FieldMetaData("startRow", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerOpenTs_args.class, metaDataMap); + } + public scannerOpenTs_args() { } @@ -10698,15 +18880,219 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.startRow = startRow; - this.__isset.startRow = true; this.columns = columns; - this.__isset.columns = true; this.timestamp = timestamp; this.__isset.timestamp = true; } + /** + * Performs a deep copy on other. + */ + public scannerOpenTs_args(scannerOpenTs_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetStartRow()) { + this.startRow = other.startRow; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (byte[] other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + __isset.timestamp = other.__isset.timestamp; + this.timestamp = other.timestamp; + } + + @Override + public scannerOpenTs_args clone() { + return new scannerOpenTs_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getStartRow() { + return this.startRow; + } + + public void setStartRow(byte[] startRow) { + this.startRow = startRow; + } + + public void unsetStartRow() { + this.startRow = null; + } + + // Returns true if field startRow is set (has been asigned a value) and false otherwise + public boolean isSetStartRow() { + return this.startRow != null; + } + + public void setStartRowIsSet(boolean value) { + if (!value) { + this.startRow = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(byte[] elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + public List getColumns() { + return this.columns; + } + + public void setColumns(List columns) { + this.columns = columns; + } + + public void unsetColumns() { + this.columns = null; + } + + // Returns true if field columns is set (has been asigned a value) and false otherwise + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + this.__isset.timestamp = true; + } + + public void unsetTimestamp() { + this.__isset.timestamp = false; + } + + // Returns true if field timestamp is set (has been asigned a value) and false otherwise + public boolean isSetTimestamp() { + return this.__isset.timestamp; + } + + public void setTimestampIsSet(boolean value) { + this.__isset.timestamp = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case STARTROW: + if (value == null) { + unsetStartRow(); + } else { + setStartRow((byte[])value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case STARTROW: + return getStartRow(); + + case COLUMNS: + return getColumns(); + + case TIMESTAMP: + return new Long(getTimestamp()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case STARTROW: + return isSetStartRow(); + case COLUMNS: + return isSetColumns(); + case TIMESTAMP: + return isSetTimestamp(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -10719,8 +19105,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -10728,8 +19114,8 @@ public class Hbase { return false; } - boolean this_present_startRow = true && (this.startRow != null); - boolean that_present_startRow = true && (that.startRow != null); + boolean this_present_startRow = true && this.isSetStartRow(); + boolean that_present_startRow = true && that.isSetStartRow(); if (this_present_startRow || that_present_startRow) { if (!(this_present_startRow && that_present_startRow)) return false; @@ -10737,8 +19123,8 @@ public class Hbase { return false; } - boolean this_present_columns = true && (this.columns != null); - boolean that_present_columns = true && (that.columns != null); + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); if (this_present_columns || that_present_columns) { if (!(this_present_columns && that_present_columns)) return false; @@ -10758,6 +19144,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -10773,41 +19160,38 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case STARTROW: if (field.type == TType.STRING) { this.startRow = iprot.readBinary(); - this.__isset.startRow = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case COLUMNS: if (field.type == TType.LIST) { { - TList _list66 = iprot.readListBegin(); - this.columns = new ArrayList(_list66.size); - for (int _i67 = 0; _i67 < _list66.size; ++_i67) + TList _list86 = iprot.readListBegin(); + this.columns = new ArrayList(_list86.size); + for (int _i87 = 0; _i87 < _list86.size; ++_i87) { - byte[] _elem68 = null; - _elem68 = iprot.readBinary(); - this.columns.add(_elem68); + byte[] _elem88; + _elem88 = iprot.readBinary(); + this.columns.add(_elem88); } iprot.readListEnd(); } - this.__isset.columns = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: + case TIMESTAMP: if (field.type == TType.I64) { this.timestamp = iprot.readI64(); this.__isset.timestamp = true; @@ -10822,76 +19206,111 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("scannerOpenTs_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.startRow != null) { - field.name = "startRow"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(START_ROW_FIELD_DESC); oprot.writeBinary(this.startRow); oprot.writeFieldEnd(); } if (this.columns != null) { - field.name = "columns"; - field.type = TType.LIST; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter69 : this.columns) { - oprot.writeBinary(_iter69); + for (byte[] _iter89 : this.columns) { + oprot.writeBinary(_iter89); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } - field.name = "timestamp"; - field.type = TType.I64; - field.id = 4; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("scannerOpenTs_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",startRow:"); - sb.append(this.startRow); - sb.append(",columns:"); - sb.append(this.columns); - sb.append(",timestamp:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("startRow:"); + if (this.startRow == null) { + sb.append("null"); + } else { + sb.append(this.startRow); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); sb.append(this.timestamp); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class scannerOpenTs_result implements TBase, java.io.Serializable { - public int success; - public IOError io; + public static class scannerOpenTs_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerOpenTs_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { + public int success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean success = false; - public boolean io = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerOpenTs_result.class, metaDataMap); } public scannerOpenTs_result() { @@ -10905,9 +19324,118 @@ public class Hbase { this.success = success; this.__isset.success = true; this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public scannerOpenTs_result(scannerOpenTs_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public scannerOpenTs_result clone() { + return new scannerOpenTs_result(this); + } + + public int getSuccess() { + return this.success; + } + + public void setSuccess(int success) { + this.success = success; + this.__isset.success = true; + } + + public void unsetSuccess() { + this.__isset.success = false; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; + } + + public void setSuccessIsSet(boolean value) { + this.__isset.success = value; + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return new Integer(getSuccess()); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -10929,8 +19457,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -10941,6 +19469,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -10956,7 +19485,7 @@ public class Hbase { } switch (field.id) { - case 0: + case SUCCESS: if (field.type == TType.I32) { this.success = iprot.readI32(); this.__isset.success = true; @@ -10964,11 +19493,10 @@ public class Hbase { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -10980,62 +19508,97 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("scannerOpenTs_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - field.name = "success"; - field.type = TType.I32; - field.id = 0; - oprot.writeFieldBegin(field); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(this.success); oprot.writeFieldEnd(); - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("scannerOpenTs_result("); + boolean first = true; + sb.append("success:"); sb.append(this.success); - sb.append(",io:"); - sb.append(this.io.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class scannerOpenWithStopTs_args implements TBase, java.io.Serializable { - public byte[] tableName; - public byte[] startRow; - public byte[] stopRow; - public List columns; - public long timestamp; + public static class scannerOpenWithStopTs_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerOpenWithStopTs_args"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); + private static final TField START_ROW_FIELD_DESC = new TField("startRow", TType.STRING, (short)2); + private static final TField STOP_ROW_FIELD_DESC = new TField("stopRow", TType.STRING, (short)3); + private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.LIST, (short)4); + private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)5); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean tableName = false; - public boolean startRow = false; - public boolean stopRow = false; - public boolean columns = false; + public byte[] tableName; + public static final int TABLENAME = 1; + public byte[] startRow; + public static final int STARTROW = 2; + public byte[] stopRow; + public static final int STOPROW = 3; + public List columns; + public static final int COLUMNS = 4; + public long timestamp; + public static final int TIMESTAMP = 5; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean timestamp = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(STARTROW, new FieldMetaData("startRow", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(STOPROW, new FieldMetaData("stopRow", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerOpenWithStopTs_args.class, metaDataMap); + } + public scannerOpenWithStopTs_args() { } @@ -11048,17 +19611,259 @@ public class Hbase { { this(); this.tableName = tableName; - this.__isset.tableName = true; this.startRow = startRow; - this.__isset.startRow = true; this.stopRow = stopRow; - this.__isset.stopRow = true; this.columns = columns; - this.__isset.columns = true; this.timestamp = timestamp; this.__isset.timestamp = true; } + /** + * Performs a deep copy on other. + */ + public scannerOpenWithStopTs_args(scannerOpenWithStopTs_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetStartRow()) { + this.startRow = other.startRow; + } + if (other.isSetStopRow()) { + this.stopRow = other.stopRow; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (byte[] other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + __isset.timestamp = other.__isset.timestamp; + this.timestamp = other.timestamp; + } + + @Override + public scannerOpenWithStopTs_args clone() { + return new scannerOpenWithStopTs_args(this); + } + + public byte[] getTableName() { + return this.tableName; + } + + public void setTableName(byte[] tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public byte[] getStartRow() { + return this.startRow; + } + + public void setStartRow(byte[] startRow) { + this.startRow = startRow; + } + + public void unsetStartRow() { + this.startRow = null; + } + + // Returns true if field startRow is set (has been asigned a value) and false otherwise + public boolean isSetStartRow() { + return this.startRow != null; + } + + public void setStartRowIsSet(boolean value) { + if (!value) { + this.startRow = null; + } + } + + public byte[] getStopRow() { + return this.stopRow; + } + + public void setStopRow(byte[] stopRow) { + this.stopRow = stopRow; + } + + public void unsetStopRow() { + this.stopRow = null; + } + + // Returns true if field stopRow is set (has been asigned a value) and false otherwise + public boolean isSetStopRow() { + return this.stopRow != null; + } + + public void setStopRowIsSet(boolean value) { + if (!value) { + this.stopRow = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(byte[] elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + public List getColumns() { + return this.columns; + } + + public void setColumns(List columns) { + this.columns = columns; + } + + public void unsetColumns() { + this.columns = null; + } + + // Returns true if field columns is set (has been asigned a value) and false otherwise + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + this.__isset.timestamp = true; + } + + public void unsetTimestamp() { + this.__isset.timestamp = false; + } + + // Returns true if field timestamp is set (has been asigned a value) and false otherwise + public boolean isSetTimestamp() { + return this.__isset.timestamp; + } + + public void setTimestampIsSet(boolean value) { + this.__isset.timestamp = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((byte[])value); + } + break; + + case STARTROW: + if (value == null) { + unsetStartRow(); + } else { + setStartRow((byte[])value); + } + break; + + case STOPROW: + if (value == null) { + unsetStopRow(); + } else { + setStopRow((byte[])value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TABLENAME: + return getTableName(); + + case STARTROW: + return getStartRow(); + + case STOPROW: + return getStopRow(); + + case COLUMNS: + return getColumns(); + + case TIMESTAMP: + return new Long(getTimestamp()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TABLENAME: + return isSetTableName(); + case STARTROW: + return isSetStartRow(); + case STOPROW: + return isSetStopRow(); + case COLUMNS: + return isSetColumns(); + case TIMESTAMP: + return isSetTimestamp(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -11071,8 +19876,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_tableName = true && (this.tableName != null); - boolean that_present_tableName = true && (that.tableName != null); + 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; @@ -11080,8 +19885,8 @@ public class Hbase { return false; } - boolean this_present_startRow = true && (this.startRow != null); - boolean that_present_startRow = true && (that.startRow != null); + boolean this_present_startRow = true && this.isSetStartRow(); + boolean that_present_startRow = true && that.isSetStartRow(); if (this_present_startRow || that_present_startRow) { if (!(this_present_startRow && that_present_startRow)) return false; @@ -11089,8 +19894,8 @@ public class Hbase { return false; } - boolean this_present_stopRow = true && (this.stopRow != null); - boolean that_present_stopRow = true && (that.stopRow != null); + boolean this_present_stopRow = true && this.isSetStopRow(); + boolean that_present_stopRow = true && that.isSetStopRow(); if (this_present_stopRow || that_present_stopRow) { if (!(this_present_stopRow && that_present_stopRow)) return false; @@ -11098,8 +19903,8 @@ public class Hbase { return false; } - boolean this_present_columns = true && (this.columns != null); - boolean that_present_columns = true && (that.columns != null); + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); if (this_present_columns || that_present_columns) { if (!(this_present_columns && that_present_columns)) return false; @@ -11119,6 +19924,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -11134,49 +19940,45 @@ public class Hbase { } switch (field.id) { - case 1: + case TABLENAME: if (field.type == TType.STRING) { this.tableName = iprot.readBinary(); - this.__isset.tableName = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case STARTROW: if (field.type == TType.STRING) { this.startRow = iprot.readBinary(); - this.__isset.startRow = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case STOPROW: if (field.type == TType.STRING) { this.stopRow = iprot.readBinary(); - this.__isset.stopRow = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: + case COLUMNS: if (field.type == TType.LIST) { { - TList _list70 = iprot.readListBegin(); - this.columns = new ArrayList(_list70.size); - for (int _i71 = 0; _i71 < _list70.size; ++_i71) + TList _list90 = iprot.readListBegin(); + this.columns = new ArrayList(_list90.size); + for (int _i91 = 0; _i91 < _list90.size; ++_i91) { - byte[] _elem72 = null; - _elem72 = iprot.readBinary(); - this.columns.add(_elem72); + byte[] _elem92; + _elem92 = iprot.readBinary(); + this.columns.add(_elem92); } iprot.readListEnd(); } - this.__isset.columns = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 5: + case TIMESTAMP: if (field.type == TType.I64) { this.timestamp = iprot.readI64(); this.__isset.timestamp = true; @@ -11191,86 +19993,124 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("scannerOpenWithStopTs_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.tableName != null) { - field.name = "tableName"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeBinary(this.tableName); oprot.writeFieldEnd(); } if (this.startRow != null) { - field.name = "startRow"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(START_ROW_FIELD_DESC); oprot.writeBinary(this.startRow); oprot.writeFieldEnd(); } if (this.stopRow != null) { - field.name = "stopRow"; - field.type = TType.STRING; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(STOP_ROW_FIELD_DESC); oprot.writeBinary(this.stopRow); oprot.writeFieldEnd(); } if (this.columns != null) { - field.name = "columns"; - field.type = TType.LIST; - field.id = 4; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter73 : this.columns) { - oprot.writeBinary(_iter73); + for (byte[] _iter93 : this.columns) { + oprot.writeBinary(_iter93); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } - field.name = "timestamp"; - field.type = TType.I64; - field.id = 5; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("scannerOpenWithStopTs_args("); + boolean first = true; + sb.append("tableName:"); - sb.append(this.tableName); - sb.append(",startRow:"); - sb.append(this.startRow); - sb.append(",stopRow:"); - sb.append(this.stopRow); - sb.append(",columns:"); - sb.append(this.columns); - sb.append(",timestamp:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("startRow:"); + if (this.startRow == null) { + sb.append("null"); + } else { + sb.append(this.startRow); + } + first = false; + if (!first) sb.append(", "); + sb.append("stopRow:"); + if (this.stopRow == null) { + sb.append("null"); + } else { + sb.append(this.stopRow); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); sb.append(this.timestamp); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class scannerOpenWithStopTs_result implements TBase, java.io.Serializable { - public int success; - public IOError io; + public static class scannerOpenWithStopTs_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerOpenWithStopTs_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { + public int success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean success = false; - public boolean io = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerOpenWithStopTs_result.class, metaDataMap); } public scannerOpenWithStopTs_result() { @@ -11284,9 +20124,118 @@ public class Hbase { this.success = success; this.__isset.success = true; this.io = io; - this.__isset.io = true; } + /** + * Performs a deep copy on other. + */ + public scannerOpenWithStopTs_result(scannerOpenWithStopTs_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + @Override + public scannerOpenWithStopTs_result clone() { + return new scannerOpenWithStopTs_result(this); + } + + public int getSuccess() { + return this.success; + } + + public void setSuccess(int success) { + this.success = success; + this.__isset.success = true; + } + + public void unsetSuccess() { + this.__isset.success = false; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; + } + + public void setSuccessIsSet(boolean value) { + this.__isset.success = value; + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned 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(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return new Integer(getSuccess()); + + case IO: + return getIo(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -11308,8 +20257,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -11320,6 +20269,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -11335,7 +20285,7 @@ public class Hbase { } switch (field.id) { - case 0: + case SUCCESS: if (field.type == TType.I32) { this.success = iprot.readI32(); this.__isset.success = true; @@ -11343,11 +20293,10 @@ public class Hbase { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -11359,54 +20308,76 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("scannerOpenWithStopTs_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - field.name = "success"; - field.type = TType.I32; - field.id = 0; - oprot.writeFieldBegin(field); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(this.success); oprot.writeFieldEnd(); - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("scannerOpenWithStopTs_result("); + boolean first = true; + sb.append("success:"); sb.append(this.success); - sb.append(",io:"); - sb.append(this.io.toString()); + 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 TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class scannerGet_args implements TBase, java.io.Serializable { - public int id; + public static class scannerGet_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerGet_args"); + private static final TField ID_FIELD_DESC = new TField("id", TType.I32, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { + public int id; + public static final int ID = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean id = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerGet_args.class, metaDataMap); + } + public scannerGet_args() { } @@ -11418,6 +20389,77 @@ public class Hbase { this.__isset.id = true; } + /** + * Performs a deep copy on other. + */ + public scannerGet_args(scannerGet_args other) { + __isset.id = other.__isset.id; + this.id = other.id; + } + + @Override + public scannerGet_args clone() { + return new scannerGet_args(this); + } + + public int getId() { + return this.id; + } + + public void setId(int id) { + this.id = id; + this.__isset.id = true; + } + + public void unsetId() { + this.__isset.id = false; + } + + // Returns true if field id is set (has been asigned a value) and false otherwise + public boolean isSetId() { + return this.__isset.id; + } + + public void setIdIsSet(boolean value) { + this.__isset.id = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case ID: + if (value == null) { + unsetId(); + } else { + setId((Integer)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case ID: + return new Integer(getId()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case ID: + return isSetId(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -11442,6 +20484,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -11457,7 +20500,7 @@ public class Hbase { } switch (field.id) { - case 1: + case ID: if (field.type == TType.I32) { this.id = iprot.readI32(); this.__isset.id = true; @@ -11472,66 +20515,257 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("scannerGet_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); - field.name = "id"; - field.type = TType.I32; - field.id = 1; - oprot.writeFieldBegin(field); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(ID_FIELD_DESC); oprot.writeI32(this.id); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("scannerGet_args("); + boolean first = true; + sb.append("id:"); sb.append(this.id); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class scannerGet_result implements TBase, java.io.Serializable { - public TRowResult success; - public IOError io; - public IllegalArgument ia; - public NotFound nf; + public static class scannerGet_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerGet_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); + private static final TField IA_FIELD_DESC = new TField("ia", TType.STRUCT, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean success = false; - public boolean io = false; - public boolean ia = false; - public boolean nf = false; + public List success; + public static final int SUCCESS = 0; + public IOError io; + public static final int IO = 1; + public IllegalArgument ia; + public static final int IA = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, TRowResult.class)))); + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerGet_result.class, metaDataMap); } public scannerGet_result() { } public scannerGet_result( - TRowResult success, + List success, IOError io, - IllegalArgument ia, - NotFound nf) + IllegalArgument ia) { this(); this.success = success; - this.__isset.success = true; this.io = io; - this.__isset.io = true; this.ia = ia; - this.__isset.ia = true; - this.nf = nf; - this.__isset.nf = true; } + /** + * Performs a deep copy on other. + */ + public scannerGet_result(scannerGet_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + @Override + public scannerGet_result clone() { + return new scannerGet_result(this); + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned 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 void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned a value) and false otherwise + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public void setIa(IllegalArgument ia) { + this.ia = ia; + } + + public void unsetIa() { + this.ia = null; + } + + // Returns true if field ia is set (has been asigned a value) and false otherwise + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + case IA: + return getIa(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + case IA: + return isSetIa(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -11544,8 +20778,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_success = true && (this.success != null); - boolean that_present_success = true && (that.success != null); + 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; @@ -11553,8 +20787,8 @@ public class Hbase { return false; } - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -11562,8 +20796,8 @@ public class Hbase { return false; } - boolean this_present_ia = true && (this.ia != null); - boolean that_present_ia = true && (that.ia != null); + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); if (this_present_ia || that_present_ia) { if (!(this_present_ia && that_present_ia)) return false; @@ -11571,18 +20805,10 @@ public class Hbase { return false; } - boolean this_present_nf = true && (this.nf != null); - boolean that_present_nf = true && (that.nf != null); - if (this_present_nf || that_present_nf) { - if (!(this_present_nf && that_present_nf)) - return false; - if (!this.nf.equals(that.nf)) - return false; - } - return true; } + @Override public int hashCode() { return 0; } @@ -11598,38 +20824,36 @@ public class Hbase { } switch (field.id) { - case 0: - if (field.type == TType.STRUCT) { - this.success = new TRowResult(); - this.success.read(iprot); - this.__isset.success = true; + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list94 = iprot.readListBegin(); + this.success = new ArrayList(_list94.size); + for (int _i95 = 0; _i95 < _list94.size; ++_i95) + { + TRowResult _elem96; + _elem96 = new TRowResult(); + _elem96.read(iprot); + this.success.add(_elem96); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case IA: if (field.type == TType.STRUCT) { this.ia = new IllegalArgument(); this.ia.read(iprot); - this.__isset.ia = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: - if (field.type == TType.STRUCT) { - this.nf = new NotFound(); - this.nf.read(iprot); - this.__isset.nf = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -11641,78 +20865,98 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("scannerGet_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.success) { - if (this.success != null) { - field.name = "success"; - field.type = TType.STRUCT; - field.id = 0; - oprot.writeFieldBegin(field); - this.success.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.ia) { - if (this.ia != null) { - field.name = "ia"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.ia.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.nf) { - if (this.nf != null) { - field.name = "nf"; - field.type = TType.STRUCT; - field.id = 3; - oprot.writeFieldBegin(field); - this.nf.write(oprot); - oprot.writeFieldEnd(); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (TRowResult _iter97 : this.success) { + _iter97.write(oprot); + } + oprot.writeListEnd(); } + oprot.writeFieldEnd(); + } else if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetIa()) { + oprot.writeFieldBegin(IA_FIELD_DESC); + this.ia.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("scannerGet_result("); + boolean first = true; + sb.append("success:"); - sb.append(this.success.toString()); - sb.append(",io:"); - sb.append(this.io.toString()); - sb.append(",ia:"); - sb.append(this.ia.toString()); - sb.append(",nf:"); - sb.append(this.nf.toString()); + 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; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public static class scannerClose_args implements TBase, java.io.Serializable { - public int id; + public static class scannerClose_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerClose_args"); + private static final TField ID_FIELD_DESC = new TField("id", TType.I32, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { + public int id; + public static final int ID = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean id = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerClose_args.class, metaDataMap); + } + public scannerClose_args() { } @@ -11724,6 +20968,77 @@ public class Hbase { this.__isset.id = true; } + /** + * Performs a deep copy on other. + */ + public scannerClose_args(scannerClose_args other) { + __isset.id = other.__isset.id; + this.id = other.id; + } + + @Override + public scannerClose_args clone() { + return new scannerClose_args(this); + } + + public int getId() { + return this.id; + } + + public void setId(int id) { + this.id = id; + this.__isset.id = true; + } + + public void unsetId() { + this.__isset.id = false; + } + + // Returns true if field id is set (has been asigned a value) and false otherwise + public boolean isSetId() { + return this.__isset.id; + } + + public void setIdIsSet(boolean value) { + this.__isset.id = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case ID: + if (value == null) { + unsetId(); + } else { + setId((Integer)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case ID: + return new Integer(getId()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case ID: + return isSetId(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -11748,6 +21063,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -11763,7 +21079,7 @@ public class Hbase { } switch (field.id) { - case 1: + case ID: if (field.type == TType.I32) { this.id = iprot.readI32(); this.__isset.id = true; @@ -11778,40 +21094,65 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("scannerClose_args"); - oprot.writeStructBegin(struct); - TField field = new TField(); - field.name = "id"; - field.type = TType.I32; - field.id = 1; - oprot.writeFieldBegin(field); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(ID_FIELD_DESC); oprot.writeI32(this.id); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("scannerClose_args("); + boolean first = true; + sb.append("id:"); sb.append(this.id); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } - public final static class scannerClose_result implements TBase, java.io.Serializable { - public IOError io; - public IllegalArgument ia; + public static class scannerClose_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("scannerClose_result"); + private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); + private static final TField IA_FIELD_DESC = new TField("ia", TType.STRUCT, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean io = false; - public boolean ia = false; + public IOError io; + public static final int IO = 1; + public IllegalArgument ia; + public static final int IA = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(scannerClose_result.class, metaDataMap); } public scannerClose_result() { @@ -11823,11 +21164,121 @@ public class Hbase { { this(); this.io = io; - this.__isset.io = true; this.ia = ia; - this.__isset.ia = true; } + /** + * Performs a deep copy on other. + */ + public scannerClose_result(scannerClose_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + @Override + public scannerClose_result clone() { + return new scannerClose_result(this); + } + + public IOError getIo() { + return this.io; + } + + public void setIo(IOError io) { + this.io = io; + } + + public void unsetIo() { + this.io = null; + } + + // Returns true if field io is set (has been asigned a value) and false otherwise + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public void setIa(IllegalArgument ia) { + this.ia = ia; + } + + public void unsetIa() { + this.ia = null; + } + + // Returns true if field ia is set (has been asigned a value) and false otherwise + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case IO: + return getIo(); + + case IA: + return getIa(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case IO: + return isSetIo(); + case IA: + return isSetIa(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -11840,8 +21291,8 @@ public class Hbase { if (that == null) return false; - boolean this_present_io = true && (this.io != null); - boolean that_present_io = true && (that.io != null); + 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; @@ -11849,8 +21300,8 @@ public class Hbase { return false; } - boolean this_present_ia = true && (this.ia != null); - boolean that_present_ia = true && (that.ia != null); + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); if (this_present_ia || that_present_ia) { if (!(this_present_ia && that_present_ia)) return false; @@ -11861,6 +21312,7 @@ public class Hbase { return true; } + @Override public int hashCode() { return 0; } @@ -11876,20 +21328,18 @@ public class Hbase { } switch (field.id) { - case 1: + case IO: if (field.type == TType.STRUCT) { this.io = new IOError(); this.io.read(iprot); - this.__isset.io = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case IA: if (field.type == TType.STRUCT) { this.ia = new IllegalArgument(); this.ia.read(iprot); - this.__isset.ia = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -11901,46 +21351,57 @@ public class Hbase { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("scannerClose_result"); - oprot.writeStructBegin(struct); - TField field = new TField(); + oprot.writeStructBegin(STRUCT_DESC); - if (this.__isset.io) { - if (this.io != null) { - field.name = "io"; - field.type = TType.STRUCT; - field.id = 1; - oprot.writeFieldBegin(field); - this.io.write(oprot); - oprot.writeFieldEnd(); - } - } else if (this.__isset.ia) { - if (this.ia != null) { - field.name = "ia"; - field.type = TType.STRUCT; - field.id = 2; - oprot.writeFieldBegin(field); - this.ia.write(oprot); - oprot.writeFieldEnd(); - } + if (this.isSetIo()) { + oprot.writeFieldBegin(IO_FIELD_DESC); + this.io.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetIa()) { + oprot.writeFieldBegin(IA_FIELD_DESC); + this.ia.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("scannerClose_result("); + boolean first = true; + sb.append("io:"); - sb.append(this.io.toString()); - sb.append(",ia:"); - sb.append(this.ia.toString()); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } } diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/IOError.java b/src/java/org/apache/hadoop/hbase/thrift/generated/IOError.java index e08bb3861b5..4280d0d0bd4 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/IOError.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/IOError.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * Autogenerated by Thrift * @@ -29,22 +28,35 @@ import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; -import com.facebook.thrift.*; +import java.util.Collections; -import com.facebook.thrift.protocol.*; -import com.facebook.thrift.transport.*; +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; /** * An IOError exception signals that an error occurred communicating * to the Hbase master or an Hbase region server. Also used to return * more general Hbase error conditions. */ -public class IOError extends Exception implements TBase, java.io.Serializable { - public String message; +public class IOError extends Exception implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("IOError"); + private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean message = false; + public String message; + public static final int MESSAGE = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(IOError.class, metaDataMap); } public IOError() { @@ -55,9 +67,81 @@ public class IOError extends Exception implements TBase, java.io.Serializable { { this(); this.message = message; - this.__isset.message = true; } + /** + * Performs a deep copy on other. + */ + public IOError(IOError other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + @Override + public IOError clone() { + return new IOError(this); + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + // Returns true if field message is set (has been asigned a value) and false otherwise + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case MESSAGE: + return getMessage(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case MESSAGE: + return isSetMessage(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -70,8 +154,8 @@ public class IOError extends Exception implements TBase, java.io.Serializable { if (that == null) return false; - boolean this_present_message = true && (this.message != null); - boolean that_present_message = true && (that.message != null); + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); if (this_present_message || that_present_message) { if (!(this_present_message && that_present_message)) return false; @@ -82,6 +166,7 @@ public class IOError extends Exception implements TBase, java.io.Serializable { return true; } + @Override public int hashCode() { return 0; } @@ -97,10 +182,9 @@ public class IOError extends Exception implements TBase, java.io.Serializable { } switch (field.id) { - case 1: + case MESSAGE: if (field.type == TType.STRING) { this.message = iprot.readString(); - this.__isset.message = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -112,17 +196,18 @@ public class IOError extends Exception implements TBase, java.io.Serializable { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("IOError"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.message != null) { - field.name = "message"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); oprot.writeString(this.message); oprot.writeFieldEnd(); } @@ -130,13 +215,26 @@ public class IOError extends Exception implements TBase, java.io.Serializable { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("IOError("); + boolean first = true; + sb.append("message:"); - sb.append(this.message); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java b/src/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java index cce3ec9fec9..b51ef619b35 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * Autogenerated by Thrift * @@ -29,21 +28,34 @@ import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; -import com.facebook.thrift.*; +import java.util.Collections; -import com.facebook.thrift.protocol.*; -import com.facebook.thrift.transport.*; +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; /** * An IllegalArgument exception indicates an illegal or invalid * argument was passed into a procedure. */ -public class IllegalArgument extends Exception implements TBase, java.io.Serializable { - public String message; +public class IllegalArgument extends Exception implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("IllegalArgument"); + private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean message = false; + public String message; + public static final int MESSAGE = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(IllegalArgument.class, metaDataMap); } public IllegalArgument() { @@ -54,9 +66,81 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali { this(); this.message = message; - this.__isset.message = true; } + /** + * Performs a deep copy on other. + */ + public IllegalArgument(IllegalArgument other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + @Override + public IllegalArgument clone() { + return new IllegalArgument(this); + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + // Returns true if field message is set (has been asigned a value) and false otherwise + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case MESSAGE: + return getMessage(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case MESSAGE: + return isSetMessage(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -69,8 +153,8 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali if (that == null) return false; - boolean this_present_message = true && (this.message != null); - boolean that_present_message = true && (that.message != null); + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); if (this_present_message || that_present_message) { if (!(this_present_message && that_present_message)) return false; @@ -81,6 +165,7 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali return true; } + @Override public int hashCode() { return 0; } @@ -96,10 +181,9 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali } switch (field.id) { - case 1: + case MESSAGE: if (field.type == TType.STRING) { this.message = iprot.readString(); - this.__isset.message = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -111,17 +195,18 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("IllegalArgument"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.message != null) { - field.name = "message"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); oprot.writeString(this.message); oprot.writeFieldEnd(); } @@ -129,13 +214,26 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("IllegalArgument("); + boolean first = true; + sb.append("message:"); - sb.append(this.message); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java b/src/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java index b02890486f8..921beaa0ed0 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * Autogenerated by Thrift * @@ -29,24 +28,44 @@ import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; -import com.facebook.thrift.*; +import java.util.Collections; -import com.facebook.thrift.protocol.*; -import com.facebook.thrift.transport.*; +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; /** * A Mutation object is used to either update or delete a column-value. */ -public class Mutation implements TBase, java.io.Serializable { - public boolean isDelete; - public byte[] column; - public byte[] value; +public class Mutation implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("Mutation"); + private static final TField IS_DELETE_FIELD_DESC = new TField("isDelete", TType.BOOL, (short)1); + private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRING, (short)2); + private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)3); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { + public boolean isDelete; + public static final int ISDELETE = 1; + public byte[] column; + public static final int COLUMN = 2; + public byte[] value; + public static final int VALUE = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean isDelete = false; - public boolean column = false; - public boolean value = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(ISDELETE, new FieldMetaData("isDelete", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(Mutation.class, metaDataMap); } public Mutation() { @@ -63,11 +82,158 @@ public class Mutation implements TBase, java.io.Serializable { this.isDelete = isDelete; this.__isset.isDelete = true; this.column = column; - this.__isset.column = true; this.value = value; - this.__isset.value = true; } + /** + * Performs a deep copy on other. + */ + public Mutation(Mutation other) { + __isset.isDelete = other.__isset.isDelete; + this.isDelete = other.isDelete; + if (other.isSetColumn()) { + this.column = other.column; + } + if (other.isSetValue()) { + this.value = other.value; + } + } + + @Override + public Mutation clone() { + return new Mutation(this); + } + + public boolean isIsDelete() { + return this.isDelete; + } + + public void setIsDelete(boolean isDelete) { + this.isDelete = isDelete; + this.__isset.isDelete = true; + } + + public void unsetIsDelete() { + this.__isset.isDelete = false; + } + + // Returns true if field isDelete is set (has been asigned a value) and false otherwise + public boolean isSetIsDelete() { + return this.__isset.isDelete; + } + + public void setIsDeleteIsSet(boolean value) { + this.__isset.isDelete = value; + } + + public byte[] getColumn() { + return this.column; + } + + public void setColumn(byte[] column) { + this.column = column; + } + + public void unsetColumn() { + this.column = null; + } + + // Returns true if field column is set (has been asigned a value) and false otherwise + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + public byte[] getValue() { + return this.value; + } + + public void setValue(byte[] value) { + this.value = value; + } + + public void unsetValue() { + this.value = null; + } + + // Returns true if field value is set (has been asigned a value) and false otherwise + public boolean isSetValue() { + return this.value != null; + } + + public void setValueIsSet(boolean value) { + if (!value) { + this.value = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case ISDELETE: + if (value == null) { + unsetIsDelete(); + } else { + setIsDelete((Boolean)value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((byte[])value); + } + break; + + case VALUE: + if (value == null) { + unsetValue(); + } else { + setValue((byte[])value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case ISDELETE: + return new Boolean(isIsDelete()); + + case COLUMN: + return getColumn(); + + case VALUE: + return getValue(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case ISDELETE: + return isSetIsDelete(); + case COLUMN: + return isSetColumn(); + case VALUE: + return isSetValue(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -89,8 +255,8 @@ public class Mutation implements TBase, java.io.Serializable { return false; } - boolean this_present_column = true && (this.column != null); - boolean that_present_column = true && (that.column != null); + 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; @@ -98,8 +264,8 @@ public class Mutation implements TBase, java.io.Serializable { return false; } - boolean this_present_value = true && (this.value != null); - boolean that_present_value = true && (that.value != null); + boolean this_present_value = true && this.isSetValue(); + boolean that_present_value = true && that.isSetValue(); if (this_present_value || that_present_value) { if (!(this_present_value && that_present_value)) return false; @@ -110,6 +276,7 @@ public class Mutation implements TBase, java.io.Serializable { return true; } + @Override public int hashCode() { return 0; } @@ -125,7 +292,7 @@ public class Mutation implements TBase, java.io.Serializable { } switch (field.id) { - case 1: + case ISDELETE: if (field.type == TType.BOOL) { this.isDelete = iprot.readBool(); this.__isset.isDelete = true; @@ -133,18 +300,16 @@ public class Mutation implements TBase, java.io.Serializable { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case COLUMN: if (field.type == TType.STRING) { this.column = iprot.readBinary(); - this.__isset.column = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case VALUE: if (field.type == TType.STRING) { this.value = iprot.readBinary(); - this.__isset.value = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -156,31 +321,26 @@ public class Mutation implements TBase, java.io.Serializable { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("Mutation"); - oprot.writeStructBegin(struct); - TField field = new TField(); - field.name = "isDelete"; - field.type = TType.BOOL; - field.id = 1; - oprot.writeFieldBegin(field); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(IS_DELETE_FIELD_DESC); oprot.writeBool(this.isDelete); oprot.writeFieldEnd(); if (this.column != null) { - field.name = "column"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMN_FIELD_DESC); oprot.writeBinary(this.column); oprot.writeFieldEnd(); } if (this.value != null) { - field.name = "value"; - field.type = TType.STRING; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(VALUE_FIELD_DESC); oprot.writeBinary(this.value); oprot.writeFieldEnd(); } @@ -188,17 +348,38 @@ public class Mutation implements TBase, java.io.Serializable { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("Mutation("); + boolean first = true; + sb.append("isDelete:"); sb.append(this.isDelete); - sb.append(",column:"); - sb.append(this.column); - sb.append(",value:"); - sb.append(this.value); + 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("value:"); + if (this.value == null) { + sb.append("null"); + } else { + sb.append(this.value); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/NotFound.java b/src/java/org/apache/hadoop/hbase/thrift/generated/NotFound.java deleted file mode 100644 index a8561a24126..00000000000 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/NotFound.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hbase.thrift.generated; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import com.facebook.thrift.*; - -import com.facebook.thrift.protocol.*; -import com.facebook.thrift.transport.*; - -/** - * A NotFound exception is used to indicate that no value was found - * for a query, or that a scanner has reached it's end. - */ -public class NotFound extends Exception implements TBase, java.io.Serializable { - public String message; - - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean message = false; - } - - public NotFound() { - } - - public NotFound( - String message) - { - this(); - this.message = message; - this.__isset.message = true; - } - - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof NotFound) - return this.equals((NotFound)that); - return false; - } - - public boolean equals(NotFound that) { - if (that == null) - return false; - - boolean this_present_message = true && (this.message != null); - boolean that_present_message = true && (that.message != null); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case 1: - if (field.type == TType.STRING) { - this.message = iprot.readString(); - this.__isset.message = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - } - - public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("NotFound"); - oprot.writeStructBegin(struct); - TField field = new TField(); - if (this.message != null) { - field.name = "message"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); - oprot.writeString(this.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - public String toString() { - StringBuilder sb = new StringBuilder("NotFound("); - sb.append("message:"); - sb.append(this.message); - sb.append(")"); - return sb.toString(); - } - -} - diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/RegionDescriptor.java b/src/java/org/apache/hadoop/hbase/thrift/generated/RegionDescriptor.java deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/ScanEntry.java b/src/java/org/apache/hadoop/hbase/thrift/generated/ScanEntry.java deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/TCell.java b/src/java/org/apache/hadoop/hbase/thrift/generated/TCell.java index c3b4aed5533..cc94058a193 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/TCell.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/TCell.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * Autogenerated by Thrift * @@ -29,10 +28,11 @@ import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; -import com.facebook.thrift.*; +import java.util.Collections; -import com.facebook.thrift.protocol.*; -import com.facebook.thrift.transport.*; +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; /** * TCell - Used to transport a cell value (byte[]) and the timestamp it was @@ -40,16 +40,32 @@ import com.facebook.thrift.transport.*; * the timestamp of a cell to a first-class value, making it easy to take * note of temporal data. Cell is used all the way from HStore up to HTable. */ -public class TCell implements TBase, java.io.Serializable { - public byte[] value; - public long timestamp; +public class TCell implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("TCell"); + private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)1); + private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean value = false; + public byte[] value; + public static final int VALUE = 1; + public long timestamp; + public static final int TIMESTAMP = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean timestamp = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(TCell.class, metaDataMap); + } + public TCell() { } @@ -59,11 +75,120 @@ public class TCell implements TBase, java.io.Serializable { { this(); this.value = value; - this.__isset.value = true; this.timestamp = timestamp; this.__isset.timestamp = true; } + /** + * Performs a deep copy on other. + */ + public TCell(TCell other) { + if (other.isSetValue()) { + this.value = other.value; + } + __isset.timestamp = other.__isset.timestamp; + this.timestamp = other.timestamp; + } + + @Override + public TCell clone() { + return new TCell(this); + } + + public byte[] getValue() { + return this.value; + } + + public void setValue(byte[] value) { + this.value = value; + } + + public void unsetValue() { + this.value = null; + } + + // Returns true if field value is set (has been asigned a value) and false otherwise + public boolean isSetValue() { + return this.value != null; + } + + public void setValueIsSet(boolean value) { + if (!value) { + this.value = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + this.__isset.timestamp = true; + } + + public void unsetTimestamp() { + this.__isset.timestamp = false; + } + + // Returns true if field timestamp is set (has been asigned a value) and false otherwise + public boolean isSetTimestamp() { + return this.__isset.timestamp; + } + + public void setTimestampIsSet(boolean value) { + this.__isset.timestamp = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case VALUE: + if (value == null) { + unsetValue(); + } else { + setValue((byte[])value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case VALUE: + return getValue(); + + case TIMESTAMP: + return new Long(getTimestamp()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case VALUE: + return isSetValue(); + case TIMESTAMP: + return isSetTimestamp(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -76,8 +201,8 @@ public class TCell implements TBase, java.io.Serializable { if (that == null) return false; - boolean this_present_value = true && (this.value != null); - boolean that_present_value = true && (that.value != null); + boolean this_present_value = true && this.isSetValue(); + boolean that_present_value = true && that.isSetValue(); if (this_present_value || that_present_value) { if (!(this_present_value && that_present_value)) return false; @@ -97,6 +222,7 @@ public class TCell implements TBase, java.io.Serializable { return true; } + @Override public int hashCode() { return 0; } @@ -112,15 +238,14 @@ public class TCell implements TBase, java.io.Serializable { } switch (field.id) { - case 1: + case VALUE: if (field.type == TType.STRING) { this.value = iprot.readBinary(); - this.__isset.value = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case TIMESTAMP: if (field.type == TType.I64) { this.timestamp = iprot.readI64(); this.__isset.timestamp = true; @@ -135,39 +260,52 @@ public class TCell implements TBase, java.io.Serializable { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("TCell"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.value != null) { - field.name = "value"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(VALUE_FIELD_DESC); oprot.writeBinary(this.value); oprot.writeFieldEnd(); } - field.name = "timestamp"; - field.type = TType.I64; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("TCell("); + boolean first = true; + sb.append("value:"); - sb.append(this.value); - sb.append(",timestamp:"); + if (this.value == null) { + sb.append("null"); + } else { + sb.append(this.value); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); sb.append(this.timestamp); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java b/src/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java index 4e0d150946e..4f369366731 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * Autogenerated by Thrift * @@ -29,30 +28,57 @@ import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; -import com.facebook.thrift.*; +import java.util.Collections; -import com.facebook.thrift.protocol.*; -import com.facebook.thrift.transport.*; +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; /** * A TRegionInfo contains information about an HTable region. */ -public class TRegionInfo implements TBase, java.io.Serializable { - public byte[] startKey; - public byte[] endKey; - public long id; - public byte[] name; - public byte version; +public class TRegionInfo implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("TRegionInfo"); + private static final TField START_KEY_FIELD_DESC = new TField("startKey", TType.STRING, (short)1); + private static final TField END_KEY_FIELD_DESC = new TField("endKey", TType.STRING, (short)2); + private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)3); + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)4); + private static final TField VERSION_FIELD_DESC = new TField("version", TType.BYTE, (short)5); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean startKey = false; - public boolean endKey = false; + public byte[] startKey; + public static final int STARTKEY = 1; + public byte[] endKey; + public static final int ENDKEY = 2; + public long id; + public static final int ID = 3; + public byte[] name; + public static final int NAME = 4; + public byte version; + public static final int VERSION = 5; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { public boolean id = false; - public boolean name = false; public boolean version = false; } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(STARTKEY, new FieldMetaData("startKey", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ENDKEY, new FieldMetaData("endKey", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(VERSION, new FieldMetaData("version", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BYTE))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(TRegionInfo.class, metaDataMap); + } + public TRegionInfo() { } @@ -65,17 +91,239 @@ public class TRegionInfo implements TBase, java.io.Serializable { { this(); this.startKey = startKey; - this.__isset.startKey = true; this.endKey = endKey; - this.__isset.endKey = true; this.id = id; this.__isset.id = true; this.name = name; - this.__isset.name = true; this.version = version; this.__isset.version = true; } + /** + * Performs a deep copy on other. + */ + public TRegionInfo(TRegionInfo other) { + if (other.isSetStartKey()) { + this.startKey = other.startKey; + } + if (other.isSetEndKey()) { + this.endKey = other.endKey; + } + __isset.id = other.__isset.id; + this.id = other.id; + if (other.isSetName()) { + this.name = other.name; + } + __isset.version = other.__isset.version; + this.version = other.version; + } + + @Override + public TRegionInfo clone() { + return new TRegionInfo(this); + } + + public byte[] getStartKey() { + return this.startKey; + } + + public void setStartKey(byte[] startKey) { + this.startKey = startKey; + } + + public void unsetStartKey() { + this.startKey = null; + } + + // Returns true if field startKey is set (has been asigned a value) and false otherwise + public boolean isSetStartKey() { + return this.startKey != null; + } + + public void setStartKeyIsSet(boolean value) { + if (!value) { + this.startKey = null; + } + } + + public byte[] getEndKey() { + return this.endKey; + } + + public void setEndKey(byte[] endKey) { + this.endKey = endKey; + } + + public void unsetEndKey() { + this.endKey = null; + } + + // Returns true if field endKey is set (has been asigned a value) and false otherwise + public boolean isSetEndKey() { + return this.endKey != null; + } + + public void setEndKeyIsSet(boolean value) { + if (!value) { + this.endKey = null; + } + } + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + this.__isset.id = true; + } + + public void unsetId() { + this.__isset.id = false; + } + + // Returns true if field id is set (has been asigned a value) and false otherwise + public boolean isSetId() { + return this.__isset.id; + } + + public void setIdIsSet(boolean value) { + this.__isset.id = value; + } + + public byte[] getName() { + return this.name; + } + + public void setName(byte[] name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + // Returns true if field name is set (has been asigned a value) and false otherwise + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public byte getVersion() { + return this.version; + } + + public void setVersion(byte version) { + this.version = version; + this.__isset.version = true; + } + + public void unsetVersion() { + this.__isset.version = false; + } + + // Returns true if field version is set (has been asigned a value) and false otherwise + public boolean isSetVersion() { + return this.__isset.version; + } + + public void setVersionIsSet(boolean value) { + this.__isset.version = value; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case STARTKEY: + if (value == null) { + unsetStartKey(); + } else { + setStartKey((byte[])value); + } + break; + + case ENDKEY: + if (value == null) { + unsetEndKey(); + } else { + setEndKey((byte[])value); + } + break; + + case ID: + if (value == null) { + unsetId(); + } else { + setId((Long)value); + } + break; + + case NAME: + if (value == null) { + unsetName(); + } else { + setName((byte[])value); + } + break; + + case VERSION: + if (value == null) { + unsetVersion(); + } else { + setVersion((Byte)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case STARTKEY: + return getStartKey(); + + case ENDKEY: + return getEndKey(); + + case ID: + return new Long(getId()); + + case NAME: + return getName(); + + case VERSION: + return new Byte(getVersion()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case STARTKEY: + return isSetStartKey(); + case ENDKEY: + return isSetEndKey(); + case ID: + return isSetId(); + case NAME: + return isSetName(); + case VERSION: + return isSetVersion(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -88,8 +336,8 @@ public class TRegionInfo implements TBase, java.io.Serializable { if (that == null) return false; - boolean this_present_startKey = true && (this.startKey != null); - boolean that_present_startKey = true && (that.startKey != null); + boolean this_present_startKey = true && this.isSetStartKey(); + boolean that_present_startKey = true && that.isSetStartKey(); if (this_present_startKey || that_present_startKey) { if (!(this_present_startKey && that_present_startKey)) return false; @@ -97,8 +345,8 @@ public class TRegionInfo implements TBase, java.io.Serializable { return false; } - boolean this_present_endKey = true && (this.endKey != null); - boolean that_present_endKey = true && (that.endKey != null); + boolean this_present_endKey = true && this.isSetEndKey(); + boolean that_present_endKey = true && that.isSetEndKey(); if (this_present_endKey || that_present_endKey) { if (!(this_present_endKey && that_present_endKey)) return false; @@ -115,8 +363,8 @@ public class TRegionInfo implements TBase, java.io.Serializable { return false; } - boolean this_present_name = true && (this.name != null); - boolean that_present_name = true && (that.name != null); + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; @@ -136,6 +384,7 @@ public class TRegionInfo implements TBase, java.io.Serializable { return true; } + @Override public int hashCode() { return 0; } @@ -151,23 +400,21 @@ public class TRegionInfo implements TBase, java.io.Serializable { } switch (field.id) { - case 1: + case STARTKEY: if (field.type == TType.STRING) { this.startKey = iprot.readBinary(); - this.__isset.startKey = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case ENDKEY: if (field.type == TType.STRING) { this.endKey = iprot.readBinary(); - this.__isset.endKey = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: + case ID: if (field.type == TType.I64) { this.id = iprot.readI64(); this.__isset.id = true; @@ -175,15 +422,14 @@ public class TRegionInfo implements TBase, java.io.Serializable { TProtocolUtil.skip(iprot, field.type); } break; - case 4: + case NAME: if (field.type == TType.STRING) { this.name = iprot.readBinary(); - this.__isset.name = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 5: + case VERSION: if (field.type == TType.BYTE) { this.version = iprot.readByte(); this.__isset.version = true; @@ -198,67 +444,85 @@ public class TRegionInfo implements TBase, java.io.Serializable { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("TRegionInfo"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.startKey != null) { - field.name = "startKey"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(START_KEY_FIELD_DESC); oprot.writeBinary(this.startKey); oprot.writeFieldEnd(); } if (this.endKey != null) { - field.name = "endKey"; - field.type = TType.STRING; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(END_KEY_FIELD_DESC); oprot.writeBinary(this.endKey); oprot.writeFieldEnd(); } - field.name = "id"; - field.type = TType.I64; - field.id = 3; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ID_FIELD_DESC); oprot.writeI64(this.id); oprot.writeFieldEnd(); if (this.name != null) { - field.name = "name"; - field.type = TType.STRING; - field.id = 4; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeBinary(this.name); oprot.writeFieldEnd(); } - field.name = "version"; - field.type = TType.BYTE; - field.id = 5; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(VERSION_FIELD_DESC); oprot.writeByte(this.version); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("TRegionInfo("); + boolean first = true; + sb.append("startKey:"); - sb.append(this.startKey); - sb.append(",endKey:"); - sb.append(this.endKey); - sb.append(",id:"); + if (this.startKey == null) { + sb.append("null"); + } else { + sb.append(this.startKey); + } + first = false; + if (!first) sb.append(", "); + sb.append("endKey:"); + if (this.endKey == null) { + sb.append("null"); + } else { + sb.append(this.endKey); + } + first = false; + if (!first) sb.append(", "); + sb.append("id:"); sb.append(this.id); - sb.append(",name:"); - sb.append(this.name); - sb.append(",version:"); + first = false; + if (!first) sb.append(", "); + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("version:"); sb.append(this.version); + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } diff --git a/src/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java b/src/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java index 5aa801f36e9..c00eb583d14 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java +++ b/src/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * Autogenerated by Thrift * @@ -29,22 +28,40 @@ import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; -import com.facebook.thrift.*; +import java.util.Collections; -import com.facebook.thrift.protocol.*; -import com.facebook.thrift.transport.*; +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; /** * Holds row name and then a map of columns to cells. */ -public class TRowResult implements TBase, java.io.Serializable { - public byte[] row; - public Map columns; +public class TRowResult implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("TRowResult"); + private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)1); + private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.MAP, (short)2); - public final Isset __isset = new Isset(); - public static final class Isset implements java.io.Serializable { - public boolean row = false; - public boolean columns = false; + public byte[] row; + public static final int ROW = 1; + public Map columns; + public static final int COLUMNS = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new StructMetaData(TType.STRUCT, TCell.class)))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(TRowResult.class, metaDataMap); } public TRowResult() { @@ -56,11 +73,144 @@ public class TRowResult implements TBase, java.io.Serializable { { this(); this.row = row; - this.__isset.row = true; this.columns = columns; - this.__isset.columns = true; } + /** + * Performs a deep copy on other. + */ + public TRowResult(TRowResult other) { + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumns()) { + Map __this__columns = new HashMap(); + for (Map.Entry other_element : other.columns.entrySet()) { + + byte[] other_element_key = other_element.getKey(); + TCell other_element_value = other_element.getValue(); + + byte[] __this__columns_copy_key = other_element_key; + + TCell __this__columns_copy_value = new TCell(other_element_value); + + __this__columns.put(__this__columns_copy_key, __this__columns_copy_value); + } + this.columns = __this__columns; + } + } + + @Override + public TRowResult clone() { + return new TRowResult(this); + } + + public byte[] getRow() { + return this.row; + } + + public void setRow(byte[] row) { + this.row = row; + } + + public void unsetRow() { + this.row = null; + } + + // Returns true if field row is set (has been asigned a value) and false otherwise + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public void putToColumns(byte[] key, TCell val) { + if (this.columns == null) { + this.columns = new HashMap(); + } + this.columns.put(key, val); + } + + public Map getColumns() { + return this.columns; + } + + public void setColumns(Map columns) { + this.columns = columns; + } + + public void unsetColumns() { + this.columns = null; + } + + // Returns true if field columns is set (has been asigned a value) and false otherwise + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((byte[])value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((Map)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case ROW: + return getRow(); + + case COLUMNS: + return getColumns(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case ROW: + return isSetRow(); + case COLUMNS: + return isSetColumns(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override public boolean equals(Object that) { if (that == null) return false; @@ -73,8 +223,8 @@ public class TRowResult implements TBase, java.io.Serializable { if (that == null) return false; - boolean this_present_row = true && (this.row != null); - boolean that_present_row = true && (that.row != null); + 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; @@ -82,8 +232,8 @@ public class TRowResult implements TBase, java.io.Serializable { return false; } - boolean this_present_columns = true && (this.columns != null); - boolean that_present_columns = true && (that.columns != null); + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); if (this_present_columns || that_present_columns) { if (!(this_present_columns && that_present_columns)) return false; @@ -94,6 +244,7 @@ public class TRowResult implements TBase, java.io.Serializable { return true; } + @Override public int hashCode() { return 0; } @@ -109,15 +260,14 @@ public class TRowResult implements TBase, java.io.Serializable { } switch (field.id) { - case 1: + case ROW: if (field.type == TType.STRING) { this.row = iprot.readBinary(); - this.__isset.row = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: + case COLUMNS: if (field.type == TType.MAP) { { TMap _map4 = iprot.readMapBegin(); @@ -133,7 +283,6 @@ public class TRowResult implements TBase, java.io.Serializable { } iprot.readMapEnd(); } - this.__isset.columns = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -145,30 +294,28 @@ public class TRowResult implements TBase, java.io.Serializable { iprot.readFieldEnd(); } iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); } public void write(TProtocol oprot) throws TException { - TStruct struct = new TStruct("TRowResult"); - oprot.writeStructBegin(struct); - TField field = new TField(); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); if (this.row != null) { - field.name = "row"; - field.type = TType.STRING; - field.id = 1; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(ROW_FIELD_DESC); oprot.writeBinary(this.row); oprot.writeFieldEnd(); } if (this.columns != null) { - field.name = "columns"; - field.type = TType.MAP; - field.id = 2; - oprot.writeFieldBegin(field); + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.columns.size())); - for (byte[] _iter8 : this.columns.keySet()) { - oprot.writeBinary(_iter8); - this.columns.get(_iter8).write(oprot); + for (Map.Entry _iter8 : this.columns.entrySet()) { + oprot.writeBinary(_iter8.getKey()); + _iter8.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -178,15 +325,34 @@ public class TRowResult implements TBase, java.io.Serializable { oprot.writeStructEnd(); } + @Override public String toString() { StringBuilder sb = new StringBuilder("TRowResult("); + boolean first = true; + sb.append("row:"); - sb.append(this.row); - sb.append(",columns:"); - sb.append(this.columns); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; sb.append(")"); return sb.toString(); } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + } diff --git a/src/java/org/apache/hadoop/hbase/thrift/package.html b/src/java/org/apache/hadoop/hbase/thrift/package.html index f1aad6c71b3..71d669db83c 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/package.html +++ b/src/java/org/apache/hadoop/hbase/thrift/package.html @@ -62,9 +62,6 @@ part of the Thrift package. A version of the Java runtime is checked into SVN under the hbase/lib directory.

-

The version of Thrift used to generate the Java files is release 20080411p1 from -the thrift homepage.

-

To start ThriftServer, use:

   ./bin/hbase-daemon.sh start thrift [--port=PORT]
diff --git a/src/test/org/apache/hadoop/hbase/thrift/DisabledTestThriftServer.java b/src/test/org/apache/hadoop/hbase/thrift/DisabledTestThriftServer.java
index f2a38ba42f0..6679f1142e6 100644
--- a/src/test/org/apache/hadoop/hbase/thrift/DisabledTestThriftServer.java
+++ b/src/test/org/apache/hadoop/hbase/thrift/DisabledTestThriftServer.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2008 The Apache Software Foundation
+ * Copyright 2008-2009 The Apache Software Foundation
  *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -27,7 +27,6 @@ import org.apache.hadoop.hbase.thrift.generated.BatchMutation;
 import org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor;
 import org.apache.hadoop.hbase.thrift.generated.IllegalArgument;
 import org.apache.hadoop.hbase.thrift.generated.Mutation;
-import org.apache.hadoop.hbase.thrift.generated.NotFound;
 import org.apache.hadoop.hbase.thrift.generated.TCell;
 import org.apache.hadoop.hbase.thrift.generated.TRowResult;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -127,8 +126,8 @@ public class DisabledTestThriftServer extends HBaseClusterTestCase {
     handler.mutateRow(tableAname, rowAname, getMutations());
 
     // Assert that the changes were made
-    assertTrue(Bytes.equals(valueAname, handler.get(tableAname, rowAname, columnAname).value));
-    TRowResult rowResult1 = handler.getRow(tableAname, rowAname);
+    assertTrue(Bytes.equals(valueAname, handler.get(tableAname, rowAname, columnAname).get(0).value));
+    TRowResult rowResult1 = handler.getRow(tableAname, rowAname).get(0);
     assertTrue(Bytes.equals(rowAname, rowResult1.row));
     assertTrue(Bytes.equals(valueBname, rowResult1.columns.get(columnBname).value));
 
@@ -136,20 +135,14 @@ public class DisabledTestThriftServer extends HBaseClusterTestCase {
     handler.mutateRows(tableAname, getBatchMutations());
 
     // Assert that changes were made to rowA
-    boolean failed1 = false;
-    try {
-      handler.get(tableAname, rowAname, columnAname);
-    } catch (NotFound nf) {
-      failed1 = true;
-    }
-    assertTrue(failed1);
-    assertTrue(Bytes.equals(valueCname, handler.get(tableAname, rowAname, columnBname).value));
+    assertFalse(handler.get(tableAname, rowAname, columnAname).size() > 0);
+    assertTrue(Bytes.equals(valueCname, handler.get(tableAname, rowAname, columnBname).get(0).value));
     List versions = handler.getVer(tableAname, rowAname, columnBname, MAXVERSIONS);
     assertTrue(Bytes.equals(valueCname, versions.get(0).value));
     assertTrue(Bytes.equals(valueBname, versions.get(1).value));
 
     // Assert that changes were made to rowB
-    TRowResult rowResult2 = handler.getRow(tableAname, rowBname);
+    TRowResult rowResult2 = handler.getRow(tableAname, rowBname).get(0);
     assertTrue(Bytes.equals(rowBname, rowResult2.row));
     assertTrue(Bytes.equals(valueCname, rowResult2.columns.get(columnAname).value));
 	  assertTrue(Bytes.equals(valueDname, rowResult2.columns.get(columnBname).value));
@@ -159,20 +152,8 @@ public class DisabledTestThriftServer extends HBaseClusterTestCase {
     handler.deleteAllRow(tableAname, rowBname);
 
     // Assert that the deletes were applied
-    boolean failed2 = false;
-    try {
-      handler.get(tableAname, rowAname, columnBname);
-    } catch (NotFound nf) {
-      failed2 = true;
-    }
-    assertTrue(failed2);
-    boolean failed3 = false;
-    try {
-      handler.getRow(tableAname, rowBname);
-    } catch (NotFound nf) {
-      failed3 = true;
-    }
-    assertTrue(failed3);
+    assertFalse(handler.get(tableAname, rowAname, columnBname).size() == 0);
+    assertFalse(handler.getRow(tableAname, rowBname).size() == 0);
 
     // Teardown
     handler.disableTable(tableAname);
@@ -210,8 +191,8 @@ public class DisabledTestThriftServer extends HBaseClusterTestCase {
     assertEquals(handler.getVerTs(tableAname, rowAname, columnBname, time2, MAXVERSIONS).size(), 2);
     assertEquals(handler.getVerTs(tableAname, rowAname, columnBname, time1, MAXVERSIONS).size(), 1);
 
-    TRowResult rowResult1 = handler.getRowTs(tableAname, rowAname, time1);
-    TRowResult rowResult2 = handler.getRowTs(tableAname, rowAname, time2);
+    TRowResult rowResult1 = handler.getRowTs(tableAname, rowAname, time1).get(0);
+    TRowResult rowResult2 = handler.getRowTs(tableAname, rowAname, time2).get(0);
     assertTrue(Bytes.equals(rowResult1.columns.get(columnAname).value, valueAname));
     assertTrue(Bytes.equals(rowResult1.columns.get(columnBname).value, valueBname));
     assertTrue(Bytes.equals(rowResult2.columns.get(columnBname).value, valueCname));
@@ -221,11 +202,11 @@ public class DisabledTestThriftServer extends HBaseClusterTestCase {
     List columns = new ArrayList();
     columns.add(columnBname);
 
-    rowResult1 = handler.getRowWithColumns(tableAname, rowAname, columns);
+    rowResult1 = handler.getRowWithColumns(tableAname, rowAname, columns).get(0);
     assertTrue(Bytes.equals(rowResult1.columns.get(columnBname).value, valueCname));
     assertFalse(rowResult1.columns.containsKey(columnAname));
 
-    rowResult1 = handler.getRowWithColumnsTs(tableAname, rowAname, columns, time1);
+    rowResult1 = handler.getRowWithColumnsTs(tableAname, rowAname, columns, time1).get(0);
     assertTrue(Bytes.equals(rowResult1.columns.get(columnBname).value, valueBname));
     assertFalse(rowResult1.columns.containsKey(columnAname));
     
@@ -234,21 +215,9 @@ public class DisabledTestThriftServer extends HBaseClusterTestCase {
     handler.deleteAllRowTs(tableAname, rowBname, time2);
 
     // Assert that the timestamp-related methods retrieve the correct data
-    boolean failed = false;
-    try {
-      handler.getVerTs(tableAname, rowAname, columnBname, time1, MAXVERSIONS);
-    } catch (NotFound nf) {
-      failed = true;
-    }
-    assertTrue(failed);
-    assertTrue(Bytes.equals(handler.get(tableAname, rowAname, columnBname).value, valueCname));
-    boolean failed2 = false;
-    try {
-      handler.getRow(tableAname, rowBname);
-    } catch (NotFound nf) {
-      failed2 = true;
-    }
-    assertTrue(failed2);
+    assertFalse(handler.getVerTs(tableAname, rowAname, columnBname, time1, MAXVERSIONS).size() > 0);
+    assertTrue(Bytes.equals(handler.get(tableAname, rowAname, columnBname).get(0).value, valueCname));
+    assertFalse(handler.getRow(tableAname, rowBname).size() > 0);
 
     // Teardown
     handler.disableTable(tableAname);
@@ -280,11 +249,11 @@ public class DisabledTestThriftServer extends HBaseClusterTestCase {
 
     // Test a scanner on all rows and all columns, no timestamp
     int scanner1 = handler.scannerOpen(tableAname, rowAname, getColumnList(true, true));
-    TRowResult rowResult1a = handler.scannerGet(scanner1);
+    TRowResult rowResult1a = handler.scannerGet(scanner1).get(0);
     assertTrue(Bytes.equals(rowResult1a.row, rowAname));
     assertEquals(rowResult1a.columns.size(), 1);
     assertTrue(Bytes.equals(rowResult1a.columns.get(columnBname).value, valueCname));
-    TRowResult rowResult1b = handler.scannerGet(scanner1);
+    TRowResult rowResult1b = handler.scannerGet(scanner1).get(0);
     assertTrue(Bytes.equals(rowResult1b.row, rowBname));
     assertEquals(rowResult1b.columns.size(), 2);
     assertTrue(Bytes.equals(rowResult1b.columns.get(columnAname).value, valueCname));
@@ -293,7 +262,7 @@ public class DisabledTestThriftServer extends HBaseClusterTestCase {
 
     // Test a scanner on all rows and all columns, with timestamp
     int scanner2 = handler.scannerOpenTs(tableAname, rowAname, getColumnList(true, true), time1);
-    TRowResult rowResult2a = handler.scannerGet(scanner2);
+    TRowResult rowResult2a = handler.scannerGet(scanner2).get(0);
     assertEquals(rowResult2a.columns.size(), 2);
     assertTrue(Bytes.equals(rowResult2a.columns.get(columnAname).value, valueAname));
     assertTrue(Bytes.equals(rowResult2a.columns.get(columnBname).value, valueBname));
@@ -307,7 +276,7 @@ public class DisabledTestThriftServer extends HBaseClusterTestCase {
     // Test a scanner on the first row and second column only, with timestamp
     int scanner4 = handler.scannerOpenWithStopTs(tableAname, rowAname, rowBname, 
         getColumnList(false, true), time1);
-    TRowResult rowResult4a = handler.scannerGet(scanner4);
+    TRowResult rowResult4a = handler.scannerGet(scanner4).get(0);
     assertEquals(rowResult4a.columns.size(), 1);
     assertTrue(Bytes.equals(rowResult4a.columns.get(columnBname).value, valueBname));
 
@@ -394,13 +363,7 @@ public class DisabledTestThriftServer extends HBaseClusterTestCase {
    * @throws Exception
    */
   private void closeScanner(int scannerId, ThriftServer.HBaseHandler handler) throws Exception {
-    boolean failed = false;
-    try {
-      handler.scannerGet(scannerId);
-    } catch (NotFound nf) {
-      failed = true;
-    }
-    assertTrue(failed);
+    handler.scannerGet(scannerId);
     handler.scannerClose(scannerId);
   }
 }