You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2009/05/05 09:26:51 UTC
svn commit: r771604 [2/3] - in /hadoop/hbase/trunk: ./ lib/
src/java/org/apache/hadoop/hbase/thrift/
src/java/org/apache/hadoop/hbase/thrift/generated/
src/test/org/apache/hadoop/hbase/thrift/
Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java?rev=771604&r1=771603&r2=771604&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java Tue May 5 07:26:49 2009
@@ -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.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 @@
/**
* 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 @@
* 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 @@
* List all the column families assoicated with a table.
* @param tableName table name
* @return list of column family descriptors
+ *
+ * @param tableName
*/
public Map<byte[],ColumnDescriptor> getColumnDescriptors(byte[] tableName) throws IOError, TException;
@@ -78,6 +86,8 @@
* List the regions associated with a table.
* @param tableName table name
* @return list of region descriptors
+ *
+ * @param tableName
*/
public List<TRegionInfo> getTableRegions(byte[] tableName) throws IOError, TException;
@@ -92,26 +102,36 @@
*
* @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<ColumnDescriptor> 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<TCell> get(byte[] tableName, byte[] row, byte[] column) throws IOError, TException;
/**
* Get the specified number of versions for the specified table,
@@ -122,8 +142,13 @@
* @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<TCell> getVer(byte[] tableName, byte[] row, byte[] column, int numVersions) throws IOError, NotFound, TException;
+ public List<TCell> 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 @@
* @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<TCell> getVerTs(byte[] tableName, byte[] row, byte[] column, long timestamp, int numVersions) throws IOError, NotFound, TException;
+ public List<TCell> 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<TRowResult> 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<byte[]> columns) throws IOError, NotFound, TException;
+ public List<TRowResult> getRowWithColumns(byte[] tableName, byte[] row, List<byte[]> 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<TRowResult> 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<byte[]> columns, long timestamp) throws IOError, NotFound, TException;
+ public List<TRowResult> getRowWithColumnsTs(byte[] tableName, byte[] row, List<byte[]> columns, long timestamp) throws IOError, TException;
/**
* Apply a series of mutations (updates/deletes) to a row in a
@@ -195,6 +238,10 @@
* @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<Mutation> mutations) throws IOError, IllegalArgument, TException;
@@ -208,6 +255,11 @@
* @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<Mutation> mutations, long timestamp) throws IOError, IllegalArgument, TException;
@@ -219,6 +271,9 @@
*
* @param tableName name of table
* @param rowBatches list of row batches
+ *
+ * @param tableName
+ * @param rowBatches
*/
public void mutateRows(byte[] tableName, List<BatchMutation> rowBatches) throws IOError, IllegalArgument, TException;
@@ -231,17 +286,37 @@
* @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<BatchMutation> 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 @@
* @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 @@
*
* @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 @@
* @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 @@
* 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<byte[]> columns) throws IOError, TException;
@@ -304,6 +395,11 @@
* 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<byte[]> columns) throws IOError, TException;
@@ -321,6 +417,11 @@
* @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<byte[]> columns, long timestamp) throws IOError, TException;
@@ -341,6 +442,12 @@
* @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<byte[]> columns, long timestamp) throws IOError, TException;
@@ -348,20 +455,24 @@
* 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<TRowResult> 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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<TCell> get(byte[] tableName, byte[] row, byte[] column) throws IOError, TException
{
send_get(tableName, row, column);
return recv_get();
@@ -763,7 +871,7 @@
oprot_.getTransport().flush();
}
- public TCell recv_get() throws IOError, NotFound, TException
+ public List<TCell> recv_get() throws IOError, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
@@ -774,19 +882,16 @@
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<TCell> getVer(byte[] tableName, byte[] row, byte[] column, int numVersions) throws IOError, NotFound, TException
+ public List<TCell> 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 @@
oprot_.getTransport().flush();
}
- public List<TCell> recv_getVer() throws IOError, NotFound, TException
+ public List<TCell> recv_getVer() throws IOError, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
@@ -816,19 +921,16 @@
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<TCell> getVerTs(byte[] tableName, byte[] row, byte[] column, long timestamp, int numVersions) throws IOError, NotFound, TException
+ public List<TCell> 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 @@
oprot_.getTransport().flush();
}
- public List<TCell> recv_getVerTs() throws IOError, NotFound, TException
+ public List<TCell> recv_getVerTs() throws IOError, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
@@ -859,19 +961,16 @@
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<TRowResult> getRow(byte[] tableName, byte[] row) throws IOError, TException
{
send_getRow(tableName, row);
return recv_getRow();
@@ -888,7 +987,7 @@
oprot_.getTransport().flush();
}
- public TRowResult recv_getRow() throws IOError, NotFound, TException
+ public List<TRowResult> recv_getRow() throws IOError, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
@@ -899,19 +998,16 @@
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<byte[]> columns) throws IOError, NotFound, TException
+ public List<TRowResult> getRowWithColumns(byte[] tableName, byte[] row, List<byte[]> columns) throws IOError, TException
{
send_getRowWithColumns(tableName, row, columns);
return recv_getRowWithColumns();
@@ -929,7 +1025,7 @@
oprot_.getTransport().flush();
}
- public TRowResult recv_getRowWithColumns() throws IOError, NotFound, TException
+ public List<TRowResult> recv_getRowWithColumns() throws IOError, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
@@ -940,19 +1036,16 @@
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<TRowResult> getRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, TException
{
send_getRowTs(tableName, row, timestamp);
return recv_getRowTs();
@@ -970,7 +1063,7 @@
oprot_.getTransport().flush();
}
- public TRowResult recv_getRowTs() throws IOError, NotFound, TException
+ public List<TRowResult> recv_getRowTs() throws IOError, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
@@ -981,19 +1074,16 @@
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<byte[]> columns, long timestamp) throws IOError, NotFound, TException
+ public List<TRowResult> getRowWithColumnsTs(byte[] tableName, byte[] row, List<byte[]> columns, long timestamp) throws IOError, TException
{
send_getRowWithColumnsTs(tableName, row, columns, timestamp);
return recv_getRowWithColumnsTs();
@@ -1012,7 +1102,7 @@
oprot_.getTransport().flush();
}
- public TRowResult recv_getRowWithColumnsTs() throws IOError, NotFound, TException
+ public List<TRowResult> recv_getRowWithColumnsTs() throws IOError, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
@@ -1023,15 +1113,12 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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<TRowResult> scannerGet(int id) throws IOError, IllegalArgument, TException
{
send_scannerGet(id);
return recv_scannerGet();
@@ -1542,7 +1628,7 @@
oprot_.getTransport().flush();
}
- public TRowResult recv_scannerGet() throws IOError, IllegalArgument, NotFound, TException
+ public List<TRowResult> recv_scannerGet() throws IOError, IllegalArgument, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
@@ -1553,18 +1639,15 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
}
-
private class deleteAll implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
@@ -2199,7 +2218,6 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 static class enableTable_args implements TBase, java.io.Serializable {
+ 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 byte[] tableName;
+ public static final int TABLENAME = 1;
- public final Isset __isset = new Isset();
- public static final class Isset implements java.io.Serializable {
- public boolean tableName = false;
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
+ }
+
+ public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ 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 @@
{
this();
this.tableName = tableName;
- this.__isset.tableName = true;
}
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ 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 @@
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 @@
return true;
}
+ @Override
public int hashCode() {
return 0;
}
@@ -2472,10 +2560,9 @@
}
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 @@
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 @@
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 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 IOError io;
+ public static final int IO = 1;
+
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
+ }
- public final Isset __isset = new Isset();
- public static final class Isset implements java.io.Serializable {
- public boolean io = false;
+ public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ 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 @@
{
this();
this.io = io;
- this.__isset.io = true;
}
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ 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 @@
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 @@
return true;
}
+ @Override
public int hashCode() {
return 0;
}
@@ -2573,11 +2759,10 @@
}
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 @@
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 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 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<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ }});
- public final Isset __isset = new Isset();
- public static final class Isset implements java.io.Serializable {
- public boolean tableName = false;
+ static {
+ FieldMetaData.addStructMetaDataMap(disableTable_args.class, metaDataMap);
}
public disableTable_args() {
@@ -2636,9 +2843,81 @@
{
this();
this.tableName = tableName;
- this.__isset.tableName = true;
}
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ 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 @@
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 @@
return true;
}
+ @Override
public int hashCode() {
return 0;
}
@@ -2678,10 +2958,9 @@
}
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 @@
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 @@
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 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 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<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ put(IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ }});
- public final Isset __isset = new Isset();
- public static final class Isset implements java.io.Serializable {
- public boolean io = false;
+ static {
+ FieldMetaData.addStructMetaDataMap(disableTable_result.class, metaDataMap);
}
public disableTable_result() {
@@ -2737,9 +3042,81 @@
{
this();
this.io = io;
- this.__isset.io = true;
}
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ 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 @@
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 @@
return true;
}
+ @Override
public int hashCode() {
return 0;
}
@@ -2779,11 +3157,10 @@
}
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 @@
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 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 byte[] tableName;
+ public static final int TABLENAME = 1;
+
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
+ }
- public final Isset __isset = new Isset();
- public static final class Isset implements java.io.Serializable {
- public boolean tableName = false;
+ public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(isTableEnabled_args.class, metaDataMap);
}
public isTableEnabled_args() {
@@ -2842,40 +3241,113 @@
{
this();
this.tableName = tableName;
- this.__isset.tableName = true;
}
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof isTableEnabled_args)
- return this.equals((isTableEnabled_args)that);
- return false;
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public isTableEnabled_args(isTableEnabled_args other) {
+ if (other.isSetTableName()) {
+ this.tableName = other.tableName;
+ }
}
- public boolean equals(isTableEnabled_args that) {
- if (that == null)
- return false;
+ @Override
+ public isTableEnabled_args clone() {
+ return new isTableEnabled_args(this);
+ }
- boolean this_present_tableName = true && (this.tableName != null);
- boolean that_present_tableName = true && (that.tableName != null);
- if (this_present_tableName || that_present_tableName) {
- if (!(this_present_tableName && that_present_tableName))
- return false;
- if (!java.util.Arrays.equals(this.tableName, that.tableName))
- return false;
- }
+ public byte[] getTableName() {
+ return this.tableName;
+ }
- return true;
+ public void setTableName(byte[] tableName) {
+ this.tableName = tableName;
}
- public int hashCode() {
- return 0;
+ public void unsetTableName() {
+ this.tableName = null;
}
- public void read(TProtocol iprot) throws TException {
- TField field;
- iprot.readStructBegin();
+ // 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;
+ if (that instanceof isTableEnabled_args)
+ return this.equals((isTableEnabled_args)that);
+ return false;
+ }
+
+ public boolean equals(isTableEnabled_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_tableName = true && this.isSetTableName();
+ boolean that_present_tableName = true && that.isSetTableName();
+ if (this_present_tableName || that_present_tableName) {
+ if (!(this_present_tableName && that_present_tableName))
+ return false;
+ if (!java.util.Arrays.equals(this.tableName, that.tableName))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
@@ -2884,10 +3356,9 @@
}
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 @@
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 @@
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 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 boolean success;
+ public static final int SUCCESS = 0;
public IOError io;
+ public static final int IO = 1;
- public final Isset __isset = new Isset();
- public static final class Isset implements java.io.Serializable {
+ 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<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ 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 @@
this.success = success;
this.__isset.success = true;
this.io = io;
- this.__isset.io = true;
}
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ 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 @@
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 @@
return true;
}
+ @Override
public int hashCode() {
return 0;
}
@@ -2999,7 +3610,7 @@
}
switch (field.id)
{
- case 0:
+ case SUCCESS:
if (field.type == TType.BOOL) {
this.success = iprot.readBool();
this.__isset.success = true;
@@ -3007,11 +3618,10 @@
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 @@
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 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 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<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ put(TABLENAMEORREGIONNAME, new FieldMetaData("tableNameOrRegionName", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ }});
- public final Isset __isset = new Isset();
- public static final class Isset implements java.io.Serializable {
- public boolean tableNameOrRegionName = false;
+ static {
+ FieldMetaData.addStructMetaDataMap(compact_args.class, metaDataMap);
}
public compact_args() {
@@ -3079,9 +3710,81 @@
{
this();
this.tableNameOrRegionName = tableNameOrRegionName;
- this.__isset.tableNameOrRegionName = true;
}
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ 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 @@
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 @@
return true;
}
+ @Override
public int hashCode() {
return 0;
}
@@ -3121,10 +3825,9 @@
}
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 @@
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 @@
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");
[... 18757 lines stripped ...]