diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java index 68361c114f..8ec3e32514 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java @@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory; * An AlreadyExists exceptions signals that a table with the specified * name already exists */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class AlreadyExists extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlreadyExists"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java index a2920eac02..0872223b2c 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java @@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory; /** * A BatchMutation object is used to apply a number of Mutations to a single row. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class BatchMutation implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BatchMutation"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java index 32523774a1..bccd48b6d4 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java @@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory; * such as the number of versions, compression settings, etc. It is * used as input when creating a table or adding a column. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class ColumnDescriptor implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnDescriptor"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java index f77ce143f2..dc4d8bcae8 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class Hbase { public interface Iface { diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java index 558f3e1cc1..a32b008810 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java @@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory; * to the Hbase master or an Hbase region server. Also used to return * more general Hbase error conditions. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class IOError extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IOError"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java index bd296cca3d..573c49682f 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java @@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory; * An IllegalArgument exception indicates an illegal or invalid * argument was passed into a procedure. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class IllegalArgument extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IllegalArgument"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java index 216df2d197..72925b748b 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java @@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory; /** * A Mutation object is used to either update or delete a column-value. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class Mutation implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Mutation"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TAppend.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TAppend.java index 439d71e31c..a21b5f7366 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TAppend.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TAppend.java @@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory; /** * An Append object is used to specify the parameters for performing the append operation. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TAppend implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAppend"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java index 37021c0ecc..afe0af15d5 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java @@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory; * 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. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TCell implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCell"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TColumn.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TColumn.java index 77e875da2d..0115bbd128 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TColumn.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TColumn.java @@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory; /** * Holds column name and the cell. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumn"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java index 22b5f79c6f..7c018f1ca4 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java @@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory; * For increments that are not incrementColumnValue * equivalents. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TIncrement implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIncrement"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java index a1dab6b01a..ec75247fe4 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java @@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory; /** * A TRegionInfo contains information about an HTable region. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TRegionInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRegionInfo"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java index 418f503451..b09a3684de 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java @@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory; /** * Holds row name and then a map of columns to cells. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TRowResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowResult"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java index 3faadd9ee5..97d59c729c 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java @@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory; /** * A Scan object is used to specify scanner parameters when opening a scanner. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TScan implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TScan"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java index 8e3ee964db..4fb3e4e6b3 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java @@ -19,18 +19,28 @@ package org.apache.hadoop.hbase.thrift2; import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.appendFromThrift; +import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.columnFamilyDescriptorFromThrift; import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.compareOpFromThrift; import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.deleteFromThrift; import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.deletesFromThrift; import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.getFromThrift; import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.getsFromThrift; import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.incrementFromThrift; +import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.namespaceDescriptorFromHBase; +import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.namespaceDescriptorFromThrift; +import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.namespaceDescriptorsFromHBase; import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.putFromThrift; import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.putsFromThrift; import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.resultFromHBase; import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.resultsFromHBase; import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.rowMutationsFromThrift; import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.scanFromThrift; +import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.splitKeyFromThrift; +import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.tableDescriptorFromHBase; +import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.tableDescriptorFromThrift; +import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.tableDescriptorsFromHBase; +import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.tableNameFromThrift; +import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.tableNamesFromHBase; import static org.apache.thrift.TBaseHelper.byteBufferToByteArray; import java.io.IOException; @@ -45,16 +55,22 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; +import java.util.regex.Pattern; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.HRegionLocation; +import org.apache.hadoop.hbase.NamespaceDescriptor; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; import org.apache.hadoop.hbase.client.RegionLocator; import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Table; +import org.apache.hadoop.hbase.client.TableDescriptor; import org.apache.hadoop.hbase.security.UserProvider; import org.apache.hadoop.hbase.thrift.ThriftMetrics; import org.apache.hadoop.hbase.thrift2.generated.TAppend; +import org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor; import org.apache.hadoop.hbase.thrift2.generated.TCompareOp; import org.apache.hadoop.hbase.thrift2.generated.TDelete; import org.apache.hadoop.hbase.thrift2.generated.TGet; @@ -63,10 +79,13 @@ import org.apache.hadoop.hbase.thrift2.generated.THRegionLocation; import org.apache.hadoop.hbase.thrift2.generated.TIOError; import org.apache.hadoop.hbase.thrift2.generated.TIllegalArgument; import org.apache.hadoop.hbase.thrift2.generated.TIncrement; +import org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor; import org.apache.hadoop.hbase.thrift2.generated.TPut; import org.apache.hadoop.hbase.thrift2.generated.TResult; import org.apache.hadoop.hbase.thrift2.generated.TRowMutations; import org.apache.hadoop.hbase.thrift2.generated.TScan; +import org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor; +import org.apache.hadoop.hbase.thrift2.generated.TTableName; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.ConnectionCache; import org.apache.thrift.TException; @@ -570,4 +589,301 @@ public class ThriftHBaseServiceHandler implements THBaseService.Iface { private boolean isReadOnly() { return isReadOnly; } + + @Override + public TTableDescriptor getTableDescriptor(TTableName table) throws TIOError, TException { + try { + TableName tableName = ThriftUtilities.tableNameFromThrift(table); + TableDescriptor tableDescriptor = connectionCache.getAdmin().getDescriptor(tableName); + return tableDescriptorFromHBase(tableDescriptor); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public List getTableDescriptors(List tables) throws TIOError, TException { + try { + List tableNames = ThriftUtilities.tableNamesFromThrift(tables); + List tableDescriptors = connectionCache.getAdmin().listTableDescriptors(tableNames); + return tableDescriptorsFromHBase(tableDescriptors); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public boolean tableExists(TTableName tTableName) throws TIOError, TException { + try { + TableName tableName = tableNameFromThrift(tTableName); + return connectionCache.getAdmin().tableExists(tableName); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public List getTableDescriptorsByPattern(String regex, boolean includeSysTables) + throws TIOError, TException { + try { + Pattern pattern = Pattern.compile(regex); + List tableDescriptors = connectionCache.getAdmin() + .listTableDescriptors(pattern, includeSysTables); + return tableDescriptorsFromHBase(tableDescriptors); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public List getTableDescriptorsByNamespace(String name) throws TIOError, TException { + try { + List descriptors = connectionCache.getAdmin() + .listTableDescriptorsByNamespace(Bytes.toBytes(name)); + return tableDescriptorsFromHBase(descriptors); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public List getTableNamesByPattern(String regex, boolean includeSysTables) + throws TIOError, TException { + try { + Pattern pattern = Pattern.compile(regex); + TableName[] tableNames = connectionCache.getAdmin() + .listTableNames(pattern, includeSysTables); + return tableNamesFromHBase(tableNames); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public List getTableNamesByNamespace(String name) throws TIOError, TException { + try { + TableName[] tableNames = connectionCache.getAdmin().listTableNamesByNamespace(name); + return tableNamesFromHBase(tableNames); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public void createTable(TTableDescriptor desc, List splitKeys) + throws TIOError, TException { + try { + TableDescriptor descriptor = tableDescriptorFromThrift(desc); + byte[][] split = splitKeyFromThrift(splitKeys); + connectionCache.getAdmin().createTable(descriptor, split); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public void deleteTable(TTableName tableName) throws TIOError, TException { + try { + TableName table = tableNameFromThrift(tableName); + connectionCache.getAdmin().deleteTable(table); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public List deleteTableByPattern(String regex) throws TIOError, TException { + try { + TableDescriptor[] tableDescriptors = connectionCache.getAdmin().deleteTables(regex); + return tableDescriptorsFromHBase(tableDescriptors); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public void truncateTable(TTableName tableName, boolean preserveSplits) throws TIOError, TException { + try { + TableName table = tableNameFromThrift(tableName); + connectionCache.getAdmin().truncateTable(table, preserveSplits); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public void enableTable(TTableName tableName) throws TIOError, TException { + try { + TableName table = tableNameFromThrift(tableName); + connectionCache.getAdmin().enableTable(table); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public List enableTableByPattern(String regex) throws TIOError, TException { + try { + TableDescriptor[] tableDescriptors = connectionCache.getAdmin().enableTables(regex); + return tableDescriptorsFromHBase(tableDescriptors); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public void disableTable(TTableName tableName) throws TIOError, TException { + try { + TableName table = tableNameFromThrift(tableName); + connectionCache.getAdmin().disableTable(table); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public List disableTableByPattern(String regex) throws TIOError, TException { + try { + TableDescriptor[] tableDescriptors = connectionCache.getAdmin().disableTables(regex); + return tableDescriptorsFromHBase(tableDescriptors); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public boolean isTableEnabled(TTableName tableName) throws TIOError, TException { + try { + TableName table = tableNameFromThrift(tableName); + return connectionCache.getAdmin().isTableEnabled(table); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public boolean isTableDisabled(TTableName tableName) throws TIOError, TException { + try { + TableName table = tableNameFromThrift(tableName); + return connectionCache.getAdmin().isTableDisabled(table); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public boolean isTableAvailable(TTableName tableName) throws TIOError, TException { + try { + TableName table = tableNameFromThrift(tableName); + return connectionCache.getAdmin().isTableAvailable(table); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public boolean isTableAvailableWithSplit(TTableName tableName, List splitKeys) + throws TIOError, TException { + try { + TableName table = tableNameFromThrift(tableName); + byte[][] split = splitKeyFromThrift(splitKeys); + return connectionCache.getAdmin().isTableAvailable(table, split); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public void addColumnFamily(TTableName tableName, TColumnFamilyDescriptor column) + throws TIOError, TException { + try { + TableName table = tableNameFromThrift(tableName); + ColumnFamilyDescriptor columnFamilyDescriptor = columnFamilyDescriptorFromThrift(column); + connectionCache.getAdmin().addColumnFamily(table, columnFamilyDescriptor); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public void deleteColumnFamily(TTableName tableName, ByteBuffer column) + throws TIOError, TException { + try { + TableName table = tableNameFromThrift(tableName); + connectionCache.getAdmin().deleteColumnFamily(table, column.array()); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public void modifyColumnFamily(TTableName tableName, TColumnFamilyDescriptor column) + throws TIOError, TException { + try { + TableName table = tableNameFromThrift(tableName); + ColumnFamilyDescriptor columnFamilyDescriptor = columnFamilyDescriptorFromThrift(column); + connectionCache.getAdmin().modifyColumnFamily(table, columnFamilyDescriptor); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public void modifyTable(TTableDescriptor desc) throws TIOError, TException { + try { + TableDescriptor descriptor = tableDescriptorFromThrift(desc); + connectionCache.getAdmin().modifyTable(descriptor); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public void createNamespace(TNamespaceDescriptor namespaceDesc) throws TIOError, TException { + try { + NamespaceDescriptor descriptor = namespaceDescriptorFromThrift(namespaceDesc); + connectionCache.getAdmin().createNamespace(descriptor); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public void modifyNamespace(TNamespaceDescriptor namespaceDesc) throws TIOError, TException { + try { + NamespaceDescriptor descriptor = namespaceDescriptorFromThrift(namespaceDesc); + connectionCache.getAdmin().modifyNamespace(descriptor); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public void deleteNamespace(String name) throws TIOError, TException { + try { + connectionCache.getAdmin().deleteNamespace(name); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public TNamespaceDescriptor getNamespaceDescriptor(String name) throws TIOError, TException { + try { + NamespaceDescriptor descriptor = connectionCache.getAdmin().getNamespaceDescriptor(name); + return namespaceDescriptorFromHBase(descriptor); + } catch (IOException e) { + throw getTIOError(e); + } + } + + @Override + public List listNamespaceDescriptors() throws TIOError, TException { + try { + NamespaceDescriptor[] descriptors = connectionCache.getAdmin().listNamespaceDescriptors(); + return namespaceDescriptorsFromHBase(descriptors); + } catch (IOException e) { + throw getTIOError(e); + } + } } diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java index 9b42bcead4..c15a396af5 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java @@ -25,51 +25,78 @@ import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.NavigableSet; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellBuilderFactory; import org.apache.hadoop.hbase.CellBuilderType; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.CompareOperator; +import org.apache.hadoop.hbase.ExtendedCellBuilder; +import org.apache.hadoop.hbase.ExtendedCellBuilderFactory; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.HRegionLocation; +import org.apache.hadoop.hbase.KeepDeletedCells; +import org.apache.hadoop.hbase.NamespaceDescriptor; import org.apache.hadoop.hbase.PrivateCellUtil; import org.apache.hadoop.hbase.ServerName; +import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Append; +import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; +import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder; import org.apache.hadoop.hbase.client.Consistency; import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.Durability; import org.apache.hadoop.hbase.client.Get; import org.apache.hadoop.hbase.client.Increment; +import org.apache.hadoop.hbase.client.Mutation; import org.apache.hadoop.hbase.client.OperationWithAttributes; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.RowMutations; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.client.Scan.ReadType; +import org.apache.hadoop.hbase.client.TableDescriptor; +import org.apache.hadoop.hbase.client.TableDescriptorBuilder; +import org.apache.hadoop.hbase.exceptions.DeserializationException; import org.apache.hadoop.hbase.filter.ParseFilter; +import org.apache.hadoop.hbase.io.compress.Compression; +import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding; +import org.apache.hadoop.hbase.regionserver.BloomType; import org.apache.hadoop.hbase.security.visibility.Authorizations; import org.apache.hadoop.hbase.security.visibility.CellVisibility; +import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; import org.apache.hadoop.hbase.thrift2.generated.TAppend; +import org.apache.hadoop.hbase.thrift2.generated.TAuthorization; +import org.apache.hadoop.hbase.thrift2.generated.TBloomFilterType; +import org.apache.hadoop.hbase.thrift2.generated.TCellVisibility; import org.apache.hadoop.hbase.thrift2.generated.TColumn; +import org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor; import org.apache.hadoop.hbase.thrift2.generated.TColumnIncrement; import org.apache.hadoop.hbase.thrift2.generated.TColumnValue; import org.apache.hadoop.hbase.thrift2.generated.TCompareOp; +import org.apache.hadoop.hbase.thrift2.generated.TCompressionAlgorithm; import org.apache.hadoop.hbase.thrift2.generated.TConsistency; +import org.apache.hadoop.hbase.thrift2.generated.TDataBlockEncoding; import org.apache.hadoop.hbase.thrift2.generated.TDelete; +import org.apache.hadoop.hbase.thrift2.generated.TDeleteType; import org.apache.hadoop.hbase.thrift2.generated.TDurability; import org.apache.hadoop.hbase.thrift2.generated.TGet; import org.apache.hadoop.hbase.thrift2.generated.THRegionInfo; import org.apache.hadoop.hbase.thrift2.generated.THRegionLocation; import org.apache.hadoop.hbase.thrift2.generated.TIncrement; +import org.apache.hadoop.hbase.thrift2.generated.TKeepDeletedCells; import org.apache.hadoop.hbase.thrift2.generated.TMutation; +import org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor; import org.apache.hadoop.hbase.thrift2.generated.TPut; import org.apache.hadoop.hbase.thrift2.generated.TReadType; import org.apache.hadoop.hbase.thrift2.generated.TResult; import org.apache.hadoop.hbase.thrift2.generated.TRowMutations; import org.apache.hadoop.hbase.thrift2.generated.TScan; import org.apache.hadoop.hbase.thrift2.generated.TServerName; +import org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor; +import org.apache.hadoop.hbase.thrift2.generated.TTableName; import org.apache.hadoop.hbase.thrift2.generated.TTimeRange; import org.apache.hadoop.hbase.util.Bytes; import org.apache.yetus.audience.InterfaceAudience; @@ -79,6 +106,12 @@ import org.apache.hbase.thirdparty.org.apache.commons.collections4.MapUtils; @InterfaceAudience.Private public final class ThriftUtilities { + private final static Cell[] EMPTY_CELL_ARRAY = new Cell[]{}; + private final static Result EMPTY_RESULT = Result.create(EMPTY_CELL_ARRAY); + private final static Result EMPTY_RESULT_STALE = Result.create(EMPTY_CELL_ARRAY, null, true); + + + private ThriftUtilities() { throw new UnsupportedOperationException("Can't initialize class"); } @@ -129,6 +162,20 @@ public final class ThriftUtilities { out.setReplicaId(in.getTargetReplicaId()); } + if (in.isSetCacheBlocks()) { + out.setCacheBlocks(in.isCacheBlocks()); + } + if (in.isSetStoreLimit()) { + out.setMaxResultsPerColumnFamily(in.getStoreLimit()); + } + if (in.isSetStoreOffset()) { + out.setRowOffsetPerColumnFamily(in.getStoreOffset()); + } + if (in.isSetExistence_only()) { + out.setCheckExistenceOnly(in.isExistence_only()); + } + + if (!in.isSetColumns()) { return out; } @@ -183,6 +230,7 @@ public final class ThriftUtilities { col.setQualifier(CellUtil.cloneQualifier(kv)); col.setTimestamp(kv.getTimestamp()); col.setValue(CellUtil.cloneValue(kv)); + col.setType(kv.getType().getCode()); if (kv.getTagsLength() > 0) { col.setTags(PrivateCellUtil.cloneTags(kv)); } @@ -191,6 +239,8 @@ public final class ThriftUtilities { out.setColumnValues(columnValues); out.setStale(in.isStale()); + + out.setPartial(in.mayHaveMoreCellsInRow()); return out; } @@ -373,6 +423,15 @@ public final class ThriftUtilities { return out; } + public static TDeleteType deleteTypeFromHBase(Cell.Type type) { + switch (type) { + case Delete: return TDeleteType.DELETE_COLUMN; + case DeleteColumn: return TDeleteType.DELETE_COLUMNS; + case DeleteFamily: return TDeleteType.DELETE_FAMILY; + case DeleteFamilyVersion: return TDeleteType.DELETE_FAMILY_VERSION; + default: throw new IllegalArgumentException("Unknow delete type " + type); + } } + public static TDelete deleteFromHBase(Delete in) { TDelete out = new TDelete(ByteBuffer.wrap(in.getRow())); @@ -382,17 +441,33 @@ public final class ThriftUtilities { out.setTimestamp(rowTimestamp); } - // Map> - for (Map.Entry> familyEntry: + for (Map.Entry attribute : in.getAttributesMap().entrySet()) { + out.putToAttributes(ByteBuffer.wrap(Bytes.toBytes(attribute.getKey())), + ByteBuffer.wrap(attribute.getValue())); + } + if (in.getDurability() != Durability.USE_DEFAULT) { + out.setDurability(durabilityFromHBase(in.getDurability())); + } + // Delete the whole row + if (in.getFamilyCellMap().size() == 0) { + return out; + } + TDeleteType type = null; + for (Map.Entry> familyEntry: in.getFamilyCellMap().entrySet()) { + byte[] family = familyEntry.getKey(); TColumn column = new TColumn(ByteBuffer.wrap(familyEntry.getKey())); - for (org.apache.hadoop.hbase.Cell cell: familyEntry.getValue()) { - byte[] family = CellUtil.cloneFamily(cell); + for (Cell cell: familyEntry.getValue()) { + TDeleteType cellDeleteType = deleteTypeFromHBase(cell.getType()); + if (type == null) { + type = cellDeleteType; + } else if (type != cellDeleteType){ + throw new RuntimeException("Only the same delete type is supported, but two delete type " + + "is founded, one is " + type + " the other one is " + cellDeleteType); + } byte[] qualifier = CellUtil.cloneQualifier(cell); long timestamp = cell.getTimestamp(); - if (family != null) { - column.setFamily(family); - } + column.setFamily(family); if (qualifier != null) { column.setQualifier(qualifier); } @@ -403,6 +478,7 @@ public final class ThriftUtilities { columns.add(column); } out.setColumns(columns); + out.setDeleteType(type); return out; } @@ -532,6 +608,10 @@ public final class ThriftUtilities { out.setCellVisibility(new CellVisibility(in.getCellVisibility().getExpression())); } + if (in.isSetReturnResults()) { + out.setReturnResults(in.isReturnResults()); + } + return out; } @@ -553,6 +633,10 @@ public final class ThriftUtilities { out.setCellVisibility(new CellVisibility(append.getCellVisibility().getExpression())); } + if (append.isSetReturnResults()) { + out.setReturnResults(append.isReturnResults()); + } + return out; } @@ -606,11 +690,12 @@ public final class ThriftUtilities { private static Durability durabilityFromThrift(TDurability tDurability) { switch (tDurability.getValue()) { + case 0: return Durability.USE_DEFAULT; case 1: return Durability.SKIP_WAL; case 2: return Durability.ASYNC_WAL; case 3: return Durability.SYNC_WAL; case 4: return Durability.FSYNC_WAL; - default: return null; + default: return Durability.USE_DEFAULT; } } @@ -643,4 +728,322 @@ public final class ThriftUtilities { default: return Consistency.STRONG; } } + + public static TableName tableNameFromThrift(TTableName tableName) { + return TableName.valueOf(tableName.getNs(), tableName.getQualifier()); + } + + public static List tableNamesFromThrift(List tableNames) { + List out = new ArrayList<>(tableNames.size()); + for (TTableName tableName : tableNames) { + out.add(tableNameFromThrift(tableName)); + } + return out; + } + + public static TTableName tableNameFromHBase(TableName table) { + TTableName tableName = new TTableName(); + tableName.setNs(table.getNamespace()); + tableName.setQualifier(table.getQualifier()); + return tableName; + } + + public static List tableNamesFromHBase(TableName[] in) { + List out = new ArrayList<>(in.length); + for (TableName tableName : in) { + out.add(tableNameFromHBase(tableName)); + } + return out; + } + + public static byte[][] splitKeyFromThrift(List in) { + if (in == null || in.size() == 0) { + return null; + } + byte[][] out = new byte[in.size()][]; + int index = 0; + for (ByteBuffer key : in) { + out[index++] = key.array(); + } + return out; + } + + public static BloomType bloomFilterFromThrift(TBloomFilterType in) { + switch (in.getValue()) { + case 0: return BloomType.NONE; + case 1: return BloomType.ROW; + case 2: return BloomType.ROWCOL; + case 3: return BloomType.ROWPREFIX_FIXED_LENGTH; + case 4: return BloomType.ROWPREFIX_DELIMITED; + default: return BloomType.ROW; + } + } + + public static Compression.Algorithm compressionAlgorithmFromThrift(TCompressionAlgorithm in) { + switch (in.getValue()) { + case 0: return Compression.Algorithm.LZO; + case 1: return Compression.Algorithm.GZ; + case 2: return Compression.Algorithm.NONE; + case 3: return Compression.Algorithm.SNAPPY; + case 4: return Compression.Algorithm.LZ4; + case 5: return Compression.Algorithm.BZIP2; + case 6: return Compression.Algorithm.ZSTD; + default: return Compression.Algorithm.NONE; + } + } + + public static DataBlockEncoding dataBlockEncodingFromThrift(TDataBlockEncoding in) { + switch (in.getValue()) { + case 0: return DataBlockEncoding.NONE; + case 2: return DataBlockEncoding.PREFIX; + case 3: return DataBlockEncoding.DIFF; + case 4: return DataBlockEncoding.FAST_DIFF; + case 7: return DataBlockEncoding.ROW_INDEX_V1; + default: return DataBlockEncoding.NONE; + } + } + + public static KeepDeletedCells keepDeletedCellsFromThrift(TKeepDeletedCells in) { + switch (in.getValue()) { + case 0: return KeepDeletedCells.FALSE; + case 1: return KeepDeletedCells.TRUE; + case 2: return KeepDeletedCells.TTL; + default: return KeepDeletedCells.FALSE; + } + } + + public static ColumnFamilyDescriptor columnFamilyDescriptorFromThrift( + TColumnFamilyDescriptor in) { + ColumnFamilyDescriptorBuilder builder = ColumnFamilyDescriptorBuilder + .newBuilder(in.getName()); + + if (in.isSetAttributes()) { + for (Map.Entry attribute : in.getAttributes().entrySet()) { + builder.setValue(attribute.getKey().array(), attribute.getValue().array()); + } + } + if (in.isSetConfiguration()) { + for (Map.Entry conf : in.getConfiguration().entrySet()) { + builder.setConfiguration(conf.getKey(), conf.getValue()); + } + } + if (in.isSetBlockSize()) { + builder.setBlocksize(in.getBlockSize()); + } + if (in.isSetBloomnFilterType()) { + builder.setBloomFilterType(bloomFilterFromThrift(in.getBloomnFilterType())); + } + if (in.isSetCompressionType()) { + builder.setCompressionType(compressionAlgorithmFromThrift(in.getCompressionType())); + } + if (in.isSetDfsReplication()) { + builder.setDFSReplication(in.getDfsReplication()); + } + if (in.isSetDataBlockEncoding()) { + builder.setDataBlockEncoding(dataBlockEncodingFromThrift(in.getDataBlockEncoding())); + } + if (in.isSetKeepDeletedCells()) { + builder.setKeepDeletedCells(keepDeletedCellsFromThrift(in.getKeepDeletedCells())); + } + if (in.isSetMaxVersions()) { + builder.setMaxVersions(in.getMaxVersions()); + } + if (in.isSetMinVersions()) { + builder.setMinVersions(in.getMinVersions()); + } + if (in.isSetScope()) { + builder.setScope(in.getScope()); + } + if (in.isSetTimeToLive()) { + builder.setTimeToLive(in.getTimeToLive()); + } + if (in.isSetBlockCacheEnabled()) { + builder.setBlockCacheEnabled(in.isBlockCacheEnabled()); + } + if (in.isSetCacheBloomsOnWrite()) { + builder.setCacheBloomsOnWrite(in.isCacheBloomsOnWrite()); + } + if (in.isSetCacheDataOnWrite()) { + builder.setCacheDataOnWrite(in.isCacheDataOnWrite()); + } + if (in.isSetCacheIndexesOnWrite()) { + builder.setCacheIndexesOnWrite(in.isCacheIndexesOnWrite()); + } + if (in.isSetCompressTags()) { + builder.setCompressTags(in.isCompressTags()); + } + if (in.isSetEvictBlocksOnClose()) { + builder.setEvictBlocksOnClose(in.isEvictBlocksOnClose()); + } + if (in.isSetInMemory()) { + builder.setInMemory(in.isInMemory()); + } + + + return builder.build(); + } + + public static NamespaceDescriptor namespaceDescriptorFromThrift(TNamespaceDescriptor in) { + NamespaceDescriptor.Builder builder = NamespaceDescriptor.create(in.getName()); + if (in.isSetConfiguration()) { + for (Map.Entry conf : in.getConfiguration().entrySet()) { + builder.addConfiguration(conf.getKey(), conf.getValue()); + } + } + return builder.build(); + } + + public static TNamespaceDescriptor namespaceDescriptorFromHBase(NamespaceDescriptor in) { + TNamespaceDescriptor out = new TNamespaceDescriptor(); + out.setName(in.getName()); + for (Map.Entry conf : in.getConfiguration().entrySet()) { + out.putToConfiguration(conf.getKey(), conf.getValue()); + } + return out; + } + + public static List namespaceDescriptorsFromHBase( + NamespaceDescriptor[] in) { + List out = new ArrayList<>(in.length); + for (NamespaceDescriptor descriptor : in) { + out.add(namespaceDescriptorFromHBase(descriptor)); + } + return out; + } + + public static TableDescriptor tableDescriptorFromThrift(TTableDescriptor in) { + TableDescriptorBuilder builder = TableDescriptorBuilder + .newBuilder(tableNameFromThrift(in.getTableName())); + for (TColumnFamilyDescriptor column : in.getColumns()) { + builder.setColumnFamily(columnFamilyDescriptorFromThrift(column)); + } + if (in.isSetAttributes()) { + for (Map.Entry attribute : in.getAttributes().entrySet()) { + builder.setValue(attribute.getKey().array(), attribute.getValue().array()); + } + } + if (in.isSetDurability()) { + builder.setDurability(durabilityFromThrift(in.getDurability())); + } + return builder.build(); + } + + private static TDurability durabilityFromHBase(Durability durability) { + switch (durability) { + case USE_DEFAULT: return TDurability.USE_DEFAULT; + case SKIP_WAL: return TDurability.SKIP_WAL; + case ASYNC_WAL: return TDurability.ASYNC_WAL; + case SYNC_WAL: return TDurability.SYNC_WAL; + case FSYNC_WAL: return TDurability.FSYNC_WAL; + default: return null; + } + } + + public static TTableDescriptor tableDescriptorFromHBase(TableDescriptor in) { + TTableDescriptor out = new TTableDescriptor(); + out.setTableName(tableNameFromHBase(in.getTableName())); + Map attributes = in.getValues(); + for (Map.Entry attribute : attributes.entrySet()) { + out.putToAttributes(ByteBuffer.wrap(attribute.getKey().get()), + ByteBuffer.wrap(attribute.getValue().get())); + } + for (ColumnFamilyDescriptor column : in.getColumnFamilies()) { + out.addToColumns(columnFamilyDescriptorFromHBase(column)); + } + out.setDurability(durabilityFromHBase(in.getDurability())); + return out; + } + + public static List tableDescriptorsFromHBase(List in) { + List out = new ArrayList<>(in.size()); + for (TableDescriptor descriptor : in) { + out.add(tableDescriptorFromHBase(descriptor)); + } + return out; + } + + public static List tableDescriptorsFromHBase(TableDescriptor[] in) { + List out = new ArrayList<>(in.length); + for (TableDescriptor descriptor : in) { + out.add(tableDescriptorFromHBase(descriptor)); + } + return out; + } + + + public static TBloomFilterType bloomFilterFromHBase(BloomType in) { + switch (in) { + case NONE: return TBloomFilterType.NONE; + case ROW: return TBloomFilterType.ROW; + case ROWCOL: return TBloomFilterType.ROWCOL; + case ROWPREFIX_FIXED_LENGTH: return TBloomFilterType.ROWPREFIX_FIXED_LENGTH; + case ROWPREFIX_DELIMITED: return TBloomFilterType.ROWPREFIX_DELIMITED; + default: return TBloomFilterType.ROW; + } + } + + public static TCompressionAlgorithm compressionAlgorithmFromHBase(Compression.Algorithm in) { + switch (in) { + case LZO: return TCompressionAlgorithm.LZO; + case GZ: return TCompressionAlgorithm.GZ; + case NONE: return TCompressionAlgorithm.NONE; + case SNAPPY: return TCompressionAlgorithm.SNAPPY; + case LZ4: return TCompressionAlgorithm.LZ4; + case BZIP2: return TCompressionAlgorithm.BZIP2; + case ZSTD: return TCompressionAlgorithm.ZSTD; + default: return TCompressionAlgorithm.NONE; + } + } + + public static TDataBlockEncoding dataBlockEncodingFromHBase(DataBlockEncoding in) { + switch (in) { + case NONE: return TDataBlockEncoding.NONE; + case PREFIX: return TDataBlockEncoding.PREFIX; + case DIFF: return TDataBlockEncoding.DIFF; + case FAST_DIFF: return TDataBlockEncoding.FAST_DIFF; + case ROW_INDEX_V1: return TDataBlockEncoding.ROW_INDEX_V1; + default: return TDataBlockEncoding.NONE; + } + } + + public static TKeepDeletedCells keepDeletedCellsFromHBase(KeepDeletedCells in) { + switch (in) { + case FALSE: return TKeepDeletedCells.FALSE; + case TRUE: return TKeepDeletedCells.TRUE; + case TTL: return TKeepDeletedCells.TTL; + default: return TKeepDeletedCells.FALSE; + } + } + + public static TColumnFamilyDescriptor columnFamilyDescriptorFromHBase( + ColumnFamilyDescriptor in) { + TColumnFamilyDescriptor out = new TColumnFamilyDescriptor(); + out.setName(in.getName()); + for (Map.Entry attribute : in.getValues().entrySet()) { + out.putToAttributes(ByteBuffer.wrap(attribute.getKey().get()), + ByteBuffer.wrap(attribute.getValue().get())); + } + for (Map.Entry conf : in.getConfiguration().entrySet()) { + out.putToConfiguration(conf.getKey(), conf.getValue()); + } + out.setBlockSize(in.getBlocksize()); + out.setBloomnFilterType(bloomFilterFromHBase(in.getBloomFilterType())); + out.setCompressionType(compressionAlgorithmFromHBase(in.getCompressionType())); + out.setDfsReplication(in.getDFSReplication()); + out.setDataBlockEncoding(dataBlockEncodingFromHBase(in.getDataBlockEncoding())); + out.setKeepDeletedCells(keepDeletedCellsFromHBase(in.getKeepDeletedCells())); + out.setMaxVersions(in.getMaxVersions()); + out.setMinVersions(in.getMinVersions()); + out.setScope(in.getScope()); + out.setTimeToLive(in.getTimeToLive()); + out.setBlockCacheEnabled(in.isBlockCacheEnabled()); + out.setCacheBloomsOnWrite(in.isCacheBloomsOnWrite()); + out.setCacheDataOnWrite(in.isCacheDataOnWrite()); + out.setCacheIndexesOnWrite(in.isCacheIndexesOnWrite()); + out.setCompressTags(in.isCompressTags()); + out.setEvictBlocksOnClose(in.isEvictBlocksOnClose()); + out.setInMemory(in.isInMemory()); + return out; + } + } diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/NamespaceDescriptor.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/NamespaceDescriptor.java new file mode 100644 index 0000000000..3f9f512424 --- /dev/null +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/NamespaceDescriptor.java @@ -0,0 +1,554 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift2.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-26") +public class NamespaceDescriptor implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NamespaceDescriptor"); + + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.MAP, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new NamespaceDescriptorStandardSchemeFactory()); + schemes.put(TupleScheme.class, new NamespaceDescriptorTupleSchemeFactory()); + } + + public String name; // required + public Map configuration; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)1, "name"), + CONFIGURATION((short)2, "configuration"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + case 2: // CONFIGURATION + return CONFIGURATION; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.CONFIGURATION}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CONFIGURATION, new org.apache.thrift.meta_data.FieldMetaData("configuration", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NamespaceDescriptor.class, metaDataMap); + } + + public NamespaceDescriptor() { + } + + public NamespaceDescriptor( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public NamespaceDescriptor(NamespaceDescriptor other) { + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetConfiguration()) { + Map __this__configuration = new HashMap(other.configuration); + this.configuration = __this__configuration; + } + } + + public NamespaceDescriptor deepCopy() { + return new NamespaceDescriptor(this); + } + + @Override + public void clear() { + this.name = null; + this.configuration = null; + } + + public String getName() { + return this.name; + } + + public NamespaceDescriptor setName(String name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public int getConfigurationSize() { + return (this.configuration == null) ? 0 : this.configuration.size(); + } + + public void putToConfiguration(String key, String val) { + if (this.configuration == null) { + this.configuration = new HashMap(); + } + this.configuration.put(key, val); + } + + public Map getConfiguration() { + return this.configuration; + } + + public NamespaceDescriptor setConfiguration(Map configuration) { + this.configuration = configuration; + return this; + } + + public void unsetConfiguration() { + this.configuration = null; + } + + /** Returns true if field configuration is set (has been assigned a value) and false otherwise */ + public boolean isSetConfiguration() { + return this.configuration != null; + } + + public void setConfigurationIsSet(boolean value) { + if (!value) { + this.configuration = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case CONFIGURATION: + if (value == null) { + unsetConfiguration(); + } else { + setConfiguration((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case CONFIGURATION: + return getConfiguration(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case CONFIGURATION: + return isSetConfiguration(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NamespaceDescriptor) + return this.equals((NamespaceDescriptor)that); + return false; + } + + public boolean equals(NamespaceDescriptor that) { + if (that == null) + return false; + + 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; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_configuration = true && this.isSetConfiguration(); + boolean that_present_configuration = true && that.isSetConfiguration(); + if (this_present_configuration || that_present_configuration) { + if (!(this_present_configuration && that_present_configuration)) + return false; + if (!this.configuration.equals(that.configuration)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + boolean present_configuration = true && (isSetConfiguration()); + list.add(present_configuration); + if (present_configuration) + list.add(configuration); + + return list.hashCode(); + } + + @Override + public int compareTo(NamespaceDescriptor other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetConfiguration()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("NamespaceDescriptor("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (isSetConfiguration()) { + if (!first) sb.append(", "); + sb.append("configuration:"); + if (this.configuration == null) { + sb.append("null"); + } else { + sb.append(this.configuration); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (name == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class NamespaceDescriptorStandardSchemeFactory implements SchemeFactory { + public NamespaceDescriptorStandardScheme getScheme() { + return new NamespaceDescriptorStandardScheme(); + } + } + + private static class NamespaceDescriptorStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, NamespaceDescriptor struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CONFIGURATION + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map180 = iprot.readMapBegin(); + struct.configuration = new HashMap(2*_map180.size); + String _key181; + String _val182; + for (int _i183 = 0; _i183 < _map180.size; ++_i183) + { + _key181 = iprot.readString(); + _val182 = iprot.readString(); + struct.configuration.put(_key181, _val182); + } + iprot.readMapEnd(); + } + struct.setConfigurationIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, NamespaceDescriptor struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.configuration != null) { + if (struct.isSetConfiguration()) { + oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.configuration.size())); + for (Map.Entry _iter184 : struct.configuration.entrySet()) + { + oprot.writeString(_iter184.getKey()); + oprot.writeString(_iter184.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class NamespaceDescriptorTupleSchemeFactory implements SchemeFactory { + public NamespaceDescriptorTupleScheme getScheme() { + return new NamespaceDescriptorTupleScheme(); + } + } + + private static class NamespaceDescriptorTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, NamespaceDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.name); + BitSet optionals = new BitSet(); + if (struct.isSetConfiguration()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetConfiguration()) { + { + oprot.writeI32(struct.configuration.size()); + for (Map.Entry _iter185 : struct.configuration.entrySet()) + { + oprot.writeString(_iter185.getKey()); + oprot.writeString(_iter185.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, NamespaceDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.name = iprot.readString(); + struct.setNameIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map186 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.configuration = new HashMap(2*_map186.size); + String _key187; + String _val188; + for (int _i189 = 0; _i189 < _map186.size; ++_i189) + { + _key187 = iprot.readString(); + _val188 = iprot.readString(); + struct.configuration.put(_key187, _val188); + } + } + struct.setConfigurationIsSet(true); + } + } + } + +} + diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java index e0e3074e28..c89f67b620 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TAppend implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAppend"); @@ -43,6 +43,7 @@ public class TAppend implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -59,6 +60,7 @@ public class TAppend implements org.apache.thrift.TBase byName = new HashMap(); @@ -95,6 +98,8 @@ public class TAppend implements org.apache.thrift.TBase metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -152,6 +159,8 @@ public class TAppend implements org.apache.thrift.TBaseother. */ public TAppend(TAppend other) { + __isset_bitfield = other.__isset_bitfield; if (other.isSetRow()) { this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); } @@ -192,6 +202,7 @@ public class TAppend implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAuthorization"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TBloomFilterType.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TBloomFilterType.java new file mode 100644 index 0000000000..601d6b4b53 --- /dev/null +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TBloomFilterType.java @@ -0,0 +1,69 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift2.generated; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum TBloomFilterType implements org.apache.thrift.TEnum { + /** + * Bloomfilters disabled + */ + NONE(0), + /** + * Bloom enabled with Table row as Key + */ + ROW(1), + /** + * Bloom enabled with Table row & column (family+qualifier) as Key + */ + ROWCOL(2), + /** + * Bloom enabled with Table row prefix as Key, specify the length of the prefix + */ + ROWPREFIX_FIXED_LENGTH(3), + /** + * Bloom enabled with Table row prefix as Key, specify the delimiter of the prefix + */ + ROWPREFIX_DELIMITED(4); + + private final int value; + + private TBloomFilterType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static TBloomFilterType findByValue(int value) { + switch (value) { + case 0: + return NONE; + case 1: + return ROW; + case 2: + return ROWCOL; + case 3: + return ROWPREFIX_FIXED_LENGTH; + case 4: + return ROWPREFIX_DELIMITED; + default: + return null; + } + } +} diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java index 7da4dda48b..464ac12d81 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TCellVisibility implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCellVisibility"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java index d0d336c063..24a78462f4 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java @@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory; * in a HBase table by column family and optionally * a column qualifier and timestamp */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumn"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnFamilyDescriptor.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnFamilyDescriptor.java new file mode 100644 index 0000000000..03cb2f64a4 --- /dev/null +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnFamilyDescriptor.java @@ -0,0 +1,2519 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift2.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") +public class TColumnFamilyDescriptor implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnFamilyDescriptor"); + + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)2); + private static final org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.MAP, (short)3); + private static final org.apache.thrift.protocol.TField BLOCK_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("blockSize", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField BLOOMN_FILTER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("bloomnFilterType", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField COMPRESSION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("compressionType", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField DFS_REPLICATION_FIELD_DESC = new org.apache.thrift.protocol.TField("dfsReplication", org.apache.thrift.protocol.TType.I16, (short)7); + private static final org.apache.thrift.protocol.TField DATA_BLOCK_ENCODING_FIELD_DESC = new org.apache.thrift.protocol.TField("dataBlockEncoding", org.apache.thrift.protocol.TType.I32, (short)8); + private static final org.apache.thrift.protocol.TField KEEP_DELETED_CELLS_FIELD_DESC = new org.apache.thrift.protocol.TField("keepDeletedCells", org.apache.thrift.protocol.TType.I32, (short)9); + private static final org.apache.thrift.protocol.TField MAX_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxVersions", org.apache.thrift.protocol.TType.I32, (short)10); + private static final org.apache.thrift.protocol.TField MIN_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("minVersions", org.apache.thrift.protocol.TType.I32, (short)11); + private static final org.apache.thrift.protocol.TField SCOPE_FIELD_DESC = new org.apache.thrift.protocol.TField("scope", org.apache.thrift.protocol.TType.I32, (short)12); + private static final org.apache.thrift.protocol.TField TIME_TO_LIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeToLive", org.apache.thrift.protocol.TType.I32, (short)13); + private static final org.apache.thrift.protocol.TField BLOCK_CACHE_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("blockCacheEnabled", org.apache.thrift.protocol.TType.BOOL, (short)14); + private static final org.apache.thrift.protocol.TField CACHE_BLOOMS_ON_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheBloomsOnWrite", org.apache.thrift.protocol.TType.BOOL, (short)15); + private static final org.apache.thrift.protocol.TField CACHE_DATA_ON_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheDataOnWrite", org.apache.thrift.protocol.TType.BOOL, (short)16); + private static final org.apache.thrift.protocol.TField CACHE_INDEXES_ON_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheIndexesOnWrite", org.apache.thrift.protocol.TType.BOOL, (short)17); + private static final org.apache.thrift.protocol.TField COMPRESS_TAGS_FIELD_DESC = new org.apache.thrift.protocol.TField("compressTags", org.apache.thrift.protocol.TType.BOOL, (short)18); + private static final org.apache.thrift.protocol.TField EVICT_BLOCKS_ON_CLOSE_FIELD_DESC = new org.apache.thrift.protocol.TField("evictBlocksOnClose", org.apache.thrift.protocol.TType.BOOL, (short)19); + private static final org.apache.thrift.protocol.TField IN_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("inMemory", org.apache.thrift.protocol.TType.BOOL, (short)20); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TColumnFamilyDescriptorStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TColumnFamilyDescriptorTupleSchemeFactory()); + } + + public ByteBuffer name; // required + public Map attributes; // optional + public Map configuration; // optional + public int blockSize; // optional + /** + * + * @see TBloomFilterType + */ + public TBloomFilterType bloomnFilterType; // optional + /** + * + * @see TCompressionAlgorithm + */ + public TCompressionAlgorithm compressionType; // optional + public short dfsReplication; // optional + /** + * + * @see TDataBlockEncoding + */ + public TDataBlockEncoding dataBlockEncoding; // optional + /** + * + * @see TKeepDeletedCells + */ + public TKeepDeletedCells keepDeletedCells; // optional + public int maxVersions; // optional + public int minVersions; // optional + public int scope; // optional + public int timeToLive; // optional + public boolean blockCacheEnabled; // optional + public boolean cacheBloomsOnWrite; // optional + public boolean cacheDataOnWrite; // optional + public boolean cacheIndexesOnWrite; // optional + public boolean compressTags; // optional + public boolean evictBlocksOnClose; // optional + public boolean inMemory; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)1, "name"), + ATTRIBUTES((short)2, "attributes"), + CONFIGURATION((short)3, "configuration"), + BLOCK_SIZE((short)4, "blockSize"), + /** + * + * @see TBloomFilterType + */ + BLOOMN_FILTER_TYPE((short)5, "bloomnFilterType"), + /** + * + * @see TCompressionAlgorithm + */ + COMPRESSION_TYPE((short)6, "compressionType"), + DFS_REPLICATION((short)7, "dfsReplication"), + /** + * + * @see TDataBlockEncoding + */ + DATA_BLOCK_ENCODING((short)8, "dataBlockEncoding"), + /** + * + * @see TKeepDeletedCells + */ + KEEP_DELETED_CELLS((short)9, "keepDeletedCells"), + MAX_VERSIONS((short)10, "maxVersions"), + MIN_VERSIONS((short)11, "minVersions"), + SCOPE((short)12, "scope"), + TIME_TO_LIVE((short)13, "timeToLive"), + BLOCK_CACHE_ENABLED((short)14, "blockCacheEnabled"), + CACHE_BLOOMS_ON_WRITE((short)15, "cacheBloomsOnWrite"), + CACHE_DATA_ON_WRITE((short)16, "cacheDataOnWrite"), + CACHE_INDEXES_ON_WRITE((short)17, "cacheIndexesOnWrite"), + COMPRESS_TAGS((short)18, "compressTags"), + EVICT_BLOCKS_ON_CLOSE((short)19, "evictBlocksOnClose"), + IN_MEMORY((short)20, "inMemory"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + case 2: // ATTRIBUTES + return ATTRIBUTES; + case 3: // CONFIGURATION + return CONFIGURATION; + case 4: // BLOCK_SIZE + return BLOCK_SIZE; + case 5: // BLOOMN_FILTER_TYPE + return BLOOMN_FILTER_TYPE; + case 6: // COMPRESSION_TYPE + return COMPRESSION_TYPE; + case 7: // DFS_REPLICATION + return DFS_REPLICATION; + case 8: // DATA_BLOCK_ENCODING + return DATA_BLOCK_ENCODING; + case 9: // KEEP_DELETED_CELLS + return KEEP_DELETED_CELLS; + case 10: // MAX_VERSIONS + return MAX_VERSIONS; + case 11: // MIN_VERSIONS + return MIN_VERSIONS; + case 12: // SCOPE + return SCOPE; + case 13: // TIME_TO_LIVE + return TIME_TO_LIVE; + case 14: // BLOCK_CACHE_ENABLED + return BLOCK_CACHE_ENABLED; + case 15: // CACHE_BLOOMS_ON_WRITE + return CACHE_BLOOMS_ON_WRITE; + case 16: // CACHE_DATA_ON_WRITE + return CACHE_DATA_ON_WRITE; + case 17: // CACHE_INDEXES_ON_WRITE + return CACHE_INDEXES_ON_WRITE; + case 18: // COMPRESS_TAGS + return COMPRESS_TAGS; + case 19: // EVICT_BLOCKS_ON_CLOSE + return EVICT_BLOCKS_ON_CLOSE; + case 20: // IN_MEMORY + return IN_MEMORY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __BLOCKSIZE_ISSET_ID = 0; + private static final int __DFSREPLICATION_ISSET_ID = 1; + private static final int __MAXVERSIONS_ISSET_ID = 2; + private static final int __MINVERSIONS_ISSET_ID = 3; + private static final int __SCOPE_ISSET_ID = 4; + private static final int __TIMETOLIVE_ISSET_ID = 5; + private static final int __BLOCKCACHEENABLED_ISSET_ID = 6; + private static final int __CACHEBLOOMSONWRITE_ISSET_ID = 7; + private static final int __CACHEDATAONWRITE_ISSET_ID = 8; + private static final int __CACHEINDEXESONWRITE_ISSET_ID = 9; + private static final int __COMPRESSTAGS_ISSET_ID = 10; + private static final int __EVICTBLOCKSONCLOSE_ISSET_ID = 11; + private static final int __INMEMORY_ISSET_ID = 12; + private short __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.ATTRIBUTES,_Fields.CONFIGURATION,_Fields.BLOCK_SIZE,_Fields.BLOOMN_FILTER_TYPE,_Fields.COMPRESSION_TYPE,_Fields.DFS_REPLICATION,_Fields.DATA_BLOCK_ENCODING,_Fields.KEEP_DELETED_CELLS,_Fields.MAX_VERSIONS,_Fields.MIN_VERSIONS,_Fields.SCOPE,_Fields.TIME_TO_LIVE,_Fields.BLOCK_CACHE_ENABLED,_Fields.CACHE_BLOOMS_ON_WRITE,_Fields.CACHE_DATA_ON_WRITE,_Fields.CACHE_INDEXES_ON_WRITE,_Fields.COMPRESS_TAGS,_Fields.EVICT_BLOCKS_ON_CLOSE,_Fields.IN_MEMORY}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.CONFIGURATION, new org.apache.thrift.meta_data.FieldMetaData("configuration", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.BLOCK_SIZE, new org.apache.thrift.meta_data.FieldMetaData("blockSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.BLOOMN_FILTER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("bloomnFilterType", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TBloomFilterType.class))); + tmpMap.put(_Fields.COMPRESSION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("compressionType", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TCompressionAlgorithm.class))); + tmpMap.put(_Fields.DFS_REPLICATION, new org.apache.thrift.meta_data.FieldMetaData("dfsReplication", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.DATA_BLOCK_ENCODING, new org.apache.thrift.meta_data.FieldMetaData("dataBlockEncoding", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDataBlockEncoding.class))); + tmpMap.put(_Fields.KEEP_DELETED_CELLS, new org.apache.thrift.meta_data.FieldMetaData("keepDeletedCells", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TKeepDeletedCells.class))); + tmpMap.put(_Fields.MAX_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("maxVersions", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.MIN_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("minVersions", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.SCOPE, new org.apache.thrift.meta_data.FieldMetaData("scope", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.TIME_TO_LIVE, new org.apache.thrift.meta_data.FieldMetaData("timeToLive", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.BLOCK_CACHE_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("blockCacheEnabled", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.CACHE_BLOOMS_ON_WRITE, new org.apache.thrift.meta_data.FieldMetaData("cacheBloomsOnWrite", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.CACHE_DATA_ON_WRITE, new org.apache.thrift.meta_data.FieldMetaData("cacheDataOnWrite", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.CACHE_INDEXES_ON_WRITE, new org.apache.thrift.meta_data.FieldMetaData("cacheIndexesOnWrite", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.COMPRESS_TAGS, new org.apache.thrift.meta_data.FieldMetaData("compressTags", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.EVICT_BLOCKS_ON_CLOSE, new org.apache.thrift.meta_data.FieldMetaData("evictBlocksOnClose", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IN_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("inMemory", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumnFamilyDescriptor.class, metaDataMap); + } + + public TColumnFamilyDescriptor() { + } + + public TColumnFamilyDescriptor( + ByteBuffer name) + { + this(); + this.name = org.apache.thrift.TBaseHelper.copyBinary(name); + } + + /** + * Performs a deep copy on other. + */ + public TColumnFamilyDescriptor(TColumnFamilyDescriptor other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetName()) { + this.name = org.apache.thrift.TBaseHelper.copyBinary(other.name); + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(other.attributes); + this.attributes = __this__attributes; + } + if (other.isSetConfiguration()) { + Map __this__configuration = new HashMap(other.configuration); + this.configuration = __this__configuration; + } + this.blockSize = other.blockSize; + if (other.isSetBloomnFilterType()) { + this.bloomnFilterType = other.bloomnFilterType; + } + if (other.isSetCompressionType()) { + this.compressionType = other.compressionType; + } + this.dfsReplication = other.dfsReplication; + if (other.isSetDataBlockEncoding()) { + this.dataBlockEncoding = other.dataBlockEncoding; + } + if (other.isSetKeepDeletedCells()) { + this.keepDeletedCells = other.keepDeletedCells; + } + this.maxVersions = other.maxVersions; + this.minVersions = other.minVersions; + this.scope = other.scope; + this.timeToLive = other.timeToLive; + this.blockCacheEnabled = other.blockCacheEnabled; + this.cacheBloomsOnWrite = other.cacheBloomsOnWrite; + this.cacheDataOnWrite = other.cacheDataOnWrite; + this.cacheIndexesOnWrite = other.cacheIndexesOnWrite; + this.compressTags = other.compressTags; + this.evictBlocksOnClose = other.evictBlocksOnClose; + this.inMemory = other.inMemory; + } + + public TColumnFamilyDescriptor deepCopy() { + return new TColumnFamilyDescriptor(this); + } + + @Override + public void clear() { + this.name = null; + this.attributes = null; + this.configuration = null; + setBlockSizeIsSet(false); + this.blockSize = 0; + this.bloomnFilterType = null; + this.compressionType = null; + setDfsReplicationIsSet(false); + this.dfsReplication = 0; + this.dataBlockEncoding = null; + this.keepDeletedCells = null; + setMaxVersionsIsSet(false); + this.maxVersions = 0; + setMinVersionsIsSet(false); + this.minVersions = 0; + setScopeIsSet(false); + this.scope = 0; + setTimeToLiveIsSet(false); + this.timeToLive = 0; + setBlockCacheEnabledIsSet(false); + this.blockCacheEnabled = false; + setCacheBloomsOnWriteIsSet(false); + this.cacheBloomsOnWrite = false; + setCacheDataOnWriteIsSet(false); + this.cacheDataOnWrite = false; + setCacheIndexesOnWriteIsSet(false); + this.cacheIndexesOnWrite = false; + setCompressTagsIsSet(false); + this.compressTags = false; + setEvictBlocksOnCloseIsSet(false); + this.evictBlocksOnClose = false; + setInMemoryIsSet(false); + this.inMemory = false; + } + + public byte[] getName() { + setName(org.apache.thrift.TBaseHelper.rightSize(name)); + return name == null ? null : name.array(); + } + + public ByteBuffer bufferForName() { + return org.apache.thrift.TBaseHelper.copyBinary(name); + } + + public TColumnFamilyDescriptor setName(byte[] name) { + this.name = name == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(name, name.length)); + return this; + } + + public TColumnFamilyDescriptor setName(ByteBuffer name) { + this.name = org.apache.thrift.TBaseHelper.copyBinary(name); + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + public Map getAttributes() { + return this.attributes; + } + + public TColumnFamilyDescriptor setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public int getConfigurationSize() { + return (this.configuration == null) ? 0 : this.configuration.size(); + } + + public void putToConfiguration(String key, String val) { + if (this.configuration == null) { + this.configuration = new HashMap(); + } + this.configuration.put(key, val); + } + + public Map getConfiguration() { + return this.configuration; + } + + public TColumnFamilyDescriptor setConfiguration(Map configuration) { + this.configuration = configuration; + return this; + } + + public void unsetConfiguration() { + this.configuration = null; + } + + /** Returns true if field configuration is set (has been assigned a value) and false otherwise */ + public boolean isSetConfiguration() { + return this.configuration != null; + } + + public void setConfigurationIsSet(boolean value) { + if (!value) { + this.configuration = null; + } + } + + public int getBlockSize() { + return this.blockSize; + } + + public TColumnFamilyDescriptor setBlockSize(int blockSize) { + this.blockSize = blockSize; + setBlockSizeIsSet(true); + return this; + } + + public void unsetBlockSize() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKSIZE_ISSET_ID); + } + + /** Returns true if field blockSize is set (has been assigned a value) and false otherwise */ + public boolean isSetBlockSize() { + return EncodingUtils.testBit(__isset_bitfield, __BLOCKSIZE_ISSET_ID); + } + + public void setBlockSizeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKSIZE_ISSET_ID, value); + } + + /** + * + * @see TBloomFilterType + */ + public TBloomFilterType getBloomnFilterType() { + return this.bloomnFilterType; + } + + /** + * + * @see TBloomFilterType + */ + public TColumnFamilyDescriptor setBloomnFilterType(TBloomFilterType bloomnFilterType) { + this.bloomnFilterType = bloomnFilterType; + return this; + } + + public void unsetBloomnFilterType() { + this.bloomnFilterType = null; + } + + /** Returns true if field bloomnFilterType is set (has been assigned a value) and false otherwise */ + public boolean isSetBloomnFilterType() { + return this.bloomnFilterType != null; + } + + public void setBloomnFilterTypeIsSet(boolean value) { + if (!value) { + this.bloomnFilterType = null; + } + } + + /** + * + * @see TCompressionAlgorithm + */ + public TCompressionAlgorithm getCompressionType() { + return this.compressionType; + } + + /** + * + * @see TCompressionAlgorithm + */ + public TColumnFamilyDescriptor setCompressionType(TCompressionAlgorithm compressionType) { + this.compressionType = compressionType; + return this; + } + + public void unsetCompressionType() { + this.compressionType = null; + } + + /** Returns true if field compressionType is set (has been assigned a value) and false otherwise */ + public boolean isSetCompressionType() { + return this.compressionType != null; + } + + public void setCompressionTypeIsSet(boolean value) { + if (!value) { + this.compressionType = null; + } + } + + public short getDfsReplication() { + return this.dfsReplication; + } + + public TColumnFamilyDescriptor setDfsReplication(short dfsReplication) { + this.dfsReplication = dfsReplication; + setDfsReplicationIsSet(true); + return this; + } + + public void unsetDfsReplication() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DFSREPLICATION_ISSET_ID); + } + + /** Returns true if field dfsReplication is set (has been assigned a value) and false otherwise */ + public boolean isSetDfsReplication() { + return EncodingUtils.testBit(__isset_bitfield, __DFSREPLICATION_ISSET_ID); + } + + public void setDfsReplicationIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DFSREPLICATION_ISSET_ID, value); + } + + /** + * + * @see TDataBlockEncoding + */ + public TDataBlockEncoding getDataBlockEncoding() { + return this.dataBlockEncoding; + } + + /** + * + * @see TDataBlockEncoding + */ + public TColumnFamilyDescriptor setDataBlockEncoding(TDataBlockEncoding dataBlockEncoding) { + this.dataBlockEncoding = dataBlockEncoding; + return this; + } + + public void unsetDataBlockEncoding() { + this.dataBlockEncoding = null; + } + + /** Returns true if field dataBlockEncoding is set (has been assigned a value) and false otherwise */ + public boolean isSetDataBlockEncoding() { + return this.dataBlockEncoding != null; + } + + public void setDataBlockEncodingIsSet(boolean value) { + if (!value) { + this.dataBlockEncoding = null; + } + } + + /** + * + * @see TKeepDeletedCells + */ + public TKeepDeletedCells getKeepDeletedCells() { + return this.keepDeletedCells; + } + + /** + * + * @see TKeepDeletedCells + */ + public TColumnFamilyDescriptor setKeepDeletedCells(TKeepDeletedCells keepDeletedCells) { + this.keepDeletedCells = keepDeletedCells; + return this; + } + + public void unsetKeepDeletedCells() { + this.keepDeletedCells = null; + } + + /** Returns true if field keepDeletedCells is set (has been assigned a value) and false otherwise */ + public boolean isSetKeepDeletedCells() { + return this.keepDeletedCells != null; + } + + public void setKeepDeletedCellsIsSet(boolean value) { + if (!value) { + this.keepDeletedCells = null; + } + } + + public int getMaxVersions() { + return this.maxVersions; + } + + public TColumnFamilyDescriptor setMaxVersions(int maxVersions) { + this.maxVersions = maxVersions; + setMaxVersionsIsSet(true); + return this; + } + + public void unsetMaxVersions() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXVERSIONS_ISSET_ID); + } + + /** Returns true if field maxVersions is set (has been assigned a value) and false otherwise */ + public boolean isSetMaxVersions() { + return EncodingUtils.testBit(__isset_bitfield, __MAXVERSIONS_ISSET_ID); + } + + public void setMaxVersionsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXVERSIONS_ISSET_ID, value); + } + + public int getMinVersions() { + return this.minVersions; + } + + public TColumnFamilyDescriptor setMinVersions(int minVersions) { + this.minVersions = minVersions; + setMinVersionsIsSet(true); + return this; + } + + public void unsetMinVersions() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MINVERSIONS_ISSET_ID); + } + + /** Returns true if field minVersions is set (has been assigned a value) and false otherwise */ + public boolean isSetMinVersions() { + return EncodingUtils.testBit(__isset_bitfield, __MINVERSIONS_ISSET_ID); + } + + public void setMinVersionsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MINVERSIONS_ISSET_ID, value); + } + + public int getScope() { + return this.scope; + } + + public TColumnFamilyDescriptor setScope(int scope) { + this.scope = scope; + setScopeIsSet(true); + return this; + } + + public void unsetScope() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCOPE_ISSET_ID); + } + + /** Returns true if field scope is set (has been assigned a value) and false otherwise */ + public boolean isSetScope() { + return EncodingUtils.testBit(__isset_bitfield, __SCOPE_ISSET_ID); + } + + public void setScopeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCOPE_ISSET_ID, value); + } + + public int getTimeToLive() { + return this.timeToLive; + } + + public TColumnFamilyDescriptor setTimeToLive(int timeToLive) { + this.timeToLive = timeToLive; + setTimeToLiveIsSet(true); + return this; + } + + public void unsetTimeToLive() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMETOLIVE_ISSET_ID); + } + + /** Returns true if field timeToLive is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeToLive() { + return EncodingUtils.testBit(__isset_bitfield, __TIMETOLIVE_ISSET_ID); + } + + public void setTimeToLiveIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMETOLIVE_ISSET_ID, value); + } + + public boolean isBlockCacheEnabled() { + return this.blockCacheEnabled; + } + + public TColumnFamilyDescriptor setBlockCacheEnabled(boolean blockCacheEnabled) { + this.blockCacheEnabled = blockCacheEnabled; + setBlockCacheEnabledIsSet(true); + return this; + } + + public void unsetBlockCacheEnabled() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKCACHEENABLED_ISSET_ID); + } + + /** Returns true if field blockCacheEnabled is set (has been assigned a value) and false otherwise */ + public boolean isSetBlockCacheEnabled() { + return EncodingUtils.testBit(__isset_bitfield, __BLOCKCACHEENABLED_ISSET_ID); + } + + public void setBlockCacheEnabledIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKCACHEENABLED_ISSET_ID, value); + } + + public boolean isCacheBloomsOnWrite() { + return this.cacheBloomsOnWrite; + } + + public TColumnFamilyDescriptor setCacheBloomsOnWrite(boolean cacheBloomsOnWrite) { + this.cacheBloomsOnWrite = cacheBloomsOnWrite; + setCacheBloomsOnWriteIsSet(true); + return this; + } + + public void unsetCacheBloomsOnWrite() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHEBLOOMSONWRITE_ISSET_ID); + } + + /** Returns true if field cacheBloomsOnWrite is set (has been assigned a value) and false otherwise */ + public boolean isSetCacheBloomsOnWrite() { + return EncodingUtils.testBit(__isset_bitfield, __CACHEBLOOMSONWRITE_ISSET_ID); + } + + public void setCacheBloomsOnWriteIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHEBLOOMSONWRITE_ISSET_ID, value); + } + + public boolean isCacheDataOnWrite() { + return this.cacheDataOnWrite; + } + + public TColumnFamilyDescriptor setCacheDataOnWrite(boolean cacheDataOnWrite) { + this.cacheDataOnWrite = cacheDataOnWrite; + setCacheDataOnWriteIsSet(true); + return this; + } + + public void unsetCacheDataOnWrite() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHEDATAONWRITE_ISSET_ID); + } + + /** Returns true if field cacheDataOnWrite is set (has been assigned a value) and false otherwise */ + public boolean isSetCacheDataOnWrite() { + return EncodingUtils.testBit(__isset_bitfield, __CACHEDATAONWRITE_ISSET_ID); + } + + public void setCacheDataOnWriteIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHEDATAONWRITE_ISSET_ID, value); + } + + public boolean isCacheIndexesOnWrite() { + return this.cacheIndexesOnWrite; + } + + public TColumnFamilyDescriptor setCacheIndexesOnWrite(boolean cacheIndexesOnWrite) { + this.cacheIndexesOnWrite = cacheIndexesOnWrite; + setCacheIndexesOnWriteIsSet(true); + return this; + } + + public void unsetCacheIndexesOnWrite() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHEINDEXESONWRITE_ISSET_ID); + } + + /** Returns true if field cacheIndexesOnWrite is set (has been assigned a value) and false otherwise */ + public boolean isSetCacheIndexesOnWrite() { + return EncodingUtils.testBit(__isset_bitfield, __CACHEINDEXESONWRITE_ISSET_ID); + } + + public void setCacheIndexesOnWriteIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHEINDEXESONWRITE_ISSET_ID, value); + } + + public boolean isCompressTags() { + return this.compressTags; + } + + public TColumnFamilyDescriptor setCompressTags(boolean compressTags) { + this.compressTags = compressTags; + setCompressTagsIsSet(true); + return this; + } + + public void unsetCompressTags() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COMPRESSTAGS_ISSET_ID); + } + + /** Returns true if field compressTags is set (has been assigned a value) and false otherwise */ + public boolean isSetCompressTags() { + return EncodingUtils.testBit(__isset_bitfield, __COMPRESSTAGS_ISSET_ID); + } + + public void setCompressTagsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COMPRESSTAGS_ISSET_ID, value); + } + + public boolean isEvictBlocksOnClose() { + return this.evictBlocksOnClose; + } + + public TColumnFamilyDescriptor setEvictBlocksOnClose(boolean evictBlocksOnClose) { + this.evictBlocksOnClose = evictBlocksOnClose; + setEvictBlocksOnCloseIsSet(true); + return this; + } + + public void unsetEvictBlocksOnClose() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EVICTBLOCKSONCLOSE_ISSET_ID); + } + + /** Returns true if field evictBlocksOnClose is set (has been assigned a value) and false otherwise */ + public boolean isSetEvictBlocksOnClose() { + return EncodingUtils.testBit(__isset_bitfield, __EVICTBLOCKSONCLOSE_ISSET_ID); + } + + public void setEvictBlocksOnCloseIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EVICTBLOCKSONCLOSE_ISSET_ID, value); + } + + public boolean isInMemory() { + return this.inMemory; + } + + public TColumnFamilyDescriptor setInMemory(boolean inMemory) { + this.inMemory = inMemory; + setInMemoryIsSet(true); + return this; + } + + public void unsetInMemory() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INMEMORY_ISSET_ID); + } + + /** Returns true if field inMemory is set (has been assigned a value) and false otherwise */ + public boolean isSetInMemory() { + return EncodingUtils.testBit(__isset_bitfield, __INMEMORY_ISSET_ID); + } + + public void setInMemoryIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INMEMORY_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((ByteBuffer)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + case CONFIGURATION: + if (value == null) { + unsetConfiguration(); + } else { + setConfiguration((Map)value); + } + break; + + case BLOCK_SIZE: + if (value == null) { + unsetBlockSize(); + } else { + setBlockSize((Integer)value); + } + break; + + case BLOOMN_FILTER_TYPE: + if (value == null) { + unsetBloomnFilterType(); + } else { + setBloomnFilterType((TBloomFilterType)value); + } + break; + + case COMPRESSION_TYPE: + if (value == null) { + unsetCompressionType(); + } else { + setCompressionType((TCompressionAlgorithm)value); + } + break; + + case DFS_REPLICATION: + if (value == null) { + unsetDfsReplication(); + } else { + setDfsReplication((Short)value); + } + break; + + case DATA_BLOCK_ENCODING: + if (value == null) { + unsetDataBlockEncoding(); + } else { + setDataBlockEncoding((TDataBlockEncoding)value); + } + break; + + case KEEP_DELETED_CELLS: + if (value == null) { + unsetKeepDeletedCells(); + } else { + setKeepDeletedCells((TKeepDeletedCells)value); + } + break; + + case MAX_VERSIONS: + if (value == null) { + unsetMaxVersions(); + } else { + setMaxVersions((Integer)value); + } + break; + + case MIN_VERSIONS: + if (value == null) { + unsetMinVersions(); + } else { + setMinVersions((Integer)value); + } + break; + + case SCOPE: + if (value == null) { + unsetScope(); + } else { + setScope((Integer)value); + } + break; + + case TIME_TO_LIVE: + if (value == null) { + unsetTimeToLive(); + } else { + setTimeToLive((Integer)value); + } + break; + + case BLOCK_CACHE_ENABLED: + if (value == null) { + unsetBlockCacheEnabled(); + } else { + setBlockCacheEnabled((Boolean)value); + } + break; + + case CACHE_BLOOMS_ON_WRITE: + if (value == null) { + unsetCacheBloomsOnWrite(); + } else { + setCacheBloomsOnWrite((Boolean)value); + } + break; + + case CACHE_DATA_ON_WRITE: + if (value == null) { + unsetCacheDataOnWrite(); + } else { + setCacheDataOnWrite((Boolean)value); + } + break; + + case CACHE_INDEXES_ON_WRITE: + if (value == null) { + unsetCacheIndexesOnWrite(); + } else { + setCacheIndexesOnWrite((Boolean)value); + } + break; + + case COMPRESS_TAGS: + if (value == null) { + unsetCompressTags(); + } else { + setCompressTags((Boolean)value); + } + break; + + case EVICT_BLOCKS_ON_CLOSE: + if (value == null) { + unsetEvictBlocksOnClose(); + } else { + setEvictBlocksOnClose((Boolean)value); + } + break; + + case IN_MEMORY: + if (value == null) { + unsetInMemory(); + } else { + setInMemory((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case ATTRIBUTES: + return getAttributes(); + + case CONFIGURATION: + return getConfiguration(); + + case BLOCK_SIZE: + return getBlockSize(); + + case BLOOMN_FILTER_TYPE: + return getBloomnFilterType(); + + case COMPRESSION_TYPE: + return getCompressionType(); + + case DFS_REPLICATION: + return getDfsReplication(); + + case DATA_BLOCK_ENCODING: + return getDataBlockEncoding(); + + case KEEP_DELETED_CELLS: + return getKeepDeletedCells(); + + case MAX_VERSIONS: + return getMaxVersions(); + + case MIN_VERSIONS: + return getMinVersions(); + + case SCOPE: + return getScope(); + + case TIME_TO_LIVE: + return getTimeToLive(); + + case BLOCK_CACHE_ENABLED: + return isBlockCacheEnabled(); + + case CACHE_BLOOMS_ON_WRITE: + return isCacheBloomsOnWrite(); + + case CACHE_DATA_ON_WRITE: + return isCacheDataOnWrite(); + + case CACHE_INDEXES_ON_WRITE: + return isCacheIndexesOnWrite(); + + case COMPRESS_TAGS: + return isCompressTags(); + + case EVICT_BLOCKS_ON_CLOSE: + return isEvictBlocksOnClose(); + + case IN_MEMORY: + return isInMemory(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case ATTRIBUTES: + return isSetAttributes(); + case CONFIGURATION: + return isSetConfiguration(); + case BLOCK_SIZE: + return isSetBlockSize(); + case BLOOMN_FILTER_TYPE: + return isSetBloomnFilterType(); + case COMPRESSION_TYPE: + return isSetCompressionType(); + case DFS_REPLICATION: + return isSetDfsReplication(); + case DATA_BLOCK_ENCODING: + return isSetDataBlockEncoding(); + case KEEP_DELETED_CELLS: + return isSetKeepDeletedCells(); + case MAX_VERSIONS: + return isSetMaxVersions(); + case MIN_VERSIONS: + return isSetMinVersions(); + case SCOPE: + return isSetScope(); + case TIME_TO_LIVE: + return isSetTimeToLive(); + case BLOCK_CACHE_ENABLED: + return isSetBlockCacheEnabled(); + case CACHE_BLOOMS_ON_WRITE: + return isSetCacheBloomsOnWrite(); + case CACHE_DATA_ON_WRITE: + return isSetCacheDataOnWrite(); + case CACHE_INDEXES_ON_WRITE: + return isSetCacheIndexesOnWrite(); + case COMPRESS_TAGS: + return isSetCompressTags(); + case EVICT_BLOCKS_ON_CLOSE: + return isSetEvictBlocksOnClose(); + case IN_MEMORY: + return isSetInMemory(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TColumnFamilyDescriptor) + return this.equals((TColumnFamilyDescriptor)that); + return false; + } + + public boolean equals(TColumnFamilyDescriptor that) { + if (that == null) + return false; + + 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; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + boolean this_present_configuration = true && this.isSetConfiguration(); + boolean that_present_configuration = true && that.isSetConfiguration(); + if (this_present_configuration || that_present_configuration) { + if (!(this_present_configuration && that_present_configuration)) + return false; + if (!this.configuration.equals(that.configuration)) + return false; + } + + boolean this_present_blockSize = true && this.isSetBlockSize(); + boolean that_present_blockSize = true && that.isSetBlockSize(); + if (this_present_blockSize || that_present_blockSize) { + if (!(this_present_blockSize && that_present_blockSize)) + return false; + if (this.blockSize != that.blockSize) + return false; + } + + boolean this_present_bloomnFilterType = true && this.isSetBloomnFilterType(); + boolean that_present_bloomnFilterType = true && that.isSetBloomnFilterType(); + if (this_present_bloomnFilterType || that_present_bloomnFilterType) { + if (!(this_present_bloomnFilterType && that_present_bloomnFilterType)) + return false; + if (!this.bloomnFilterType.equals(that.bloomnFilterType)) + return false; + } + + boolean this_present_compressionType = true && this.isSetCompressionType(); + boolean that_present_compressionType = true && that.isSetCompressionType(); + if (this_present_compressionType || that_present_compressionType) { + if (!(this_present_compressionType && that_present_compressionType)) + return false; + if (!this.compressionType.equals(that.compressionType)) + return false; + } + + boolean this_present_dfsReplication = true && this.isSetDfsReplication(); + boolean that_present_dfsReplication = true && that.isSetDfsReplication(); + if (this_present_dfsReplication || that_present_dfsReplication) { + if (!(this_present_dfsReplication && that_present_dfsReplication)) + return false; + if (this.dfsReplication != that.dfsReplication) + return false; + } + + boolean this_present_dataBlockEncoding = true && this.isSetDataBlockEncoding(); + boolean that_present_dataBlockEncoding = true && that.isSetDataBlockEncoding(); + if (this_present_dataBlockEncoding || that_present_dataBlockEncoding) { + if (!(this_present_dataBlockEncoding && that_present_dataBlockEncoding)) + return false; + if (!this.dataBlockEncoding.equals(that.dataBlockEncoding)) + return false; + } + + boolean this_present_keepDeletedCells = true && this.isSetKeepDeletedCells(); + boolean that_present_keepDeletedCells = true && that.isSetKeepDeletedCells(); + if (this_present_keepDeletedCells || that_present_keepDeletedCells) { + if (!(this_present_keepDeletedCells && that_present_keepDeletedCells)) + return false; + if (!this.keepDeletedCells.equals(that.keepDeletedCells)) + return false; + } + + boolean this_present_maxVersions = true && this.isSetMaxVersions(); + boolean that_present_maxVersions = true && that.isSetMaxVersions(); + if (this_present_maxVersions || that_present_maxVersions) { + if (!(this_present_maxVersions && that_present_maxVersions)) + return false; + if (this.maxVersions != that.maxVersions) + return false; + } + + boolean this_present_minVersions = true && this.isSetMinVersions(); + boolean that_present_minVersions = true && that.isSetMinVersions(); + if (this_present_minVersions || that_present_minVersions) { + if (!(this_present_minVersions && that_present_minVersions)) + return false; + if (this.minVersions != that.minVersions) + return false; + } + + boolean this_present_scope = true && this.isSetScope(); + boolean that_present_scope = true && that.isSetScope(); + if (this_present_scope || that_present_scope) { + if (!(this_present_scope && that_present_scope)) + return false; + if (this.scope != that.scope) + return false; + } + + boolean this_present_timeToLive = true && this.isSetTimeToLive(); + boolean that_present_timeToLive = true && that.isSetTimeToLive(); + if (this_present_timeToLive || that_present_timeToLive) { + if (!(this_present_timeToLive && that_present_timeToLive)) + return false; + if (this.timeToLive != that.timeToLive) + return false; + } + + boolean this_present_blockCacheEnabled = true && this.isSetBlockCacheEnabled(); + boolean that_present_blockCacheEnabled = true && that.isSetBlockCacheEnabled(); + if (this_present_blockCacheEnabled || that_present_blockCacheEnabled) { + if (!(this_present_blockCacheEnabled && that_present_blockCacheEnabled)) + return false; + if (this.blockCacheEnabled != that.blockCacheEnabled) + return false; + } + + boolean this_present_cacheBloomsOnWrite = true && this.isSetCacheBloomsOnWrite(); + boolean that_present_cacheBloomsOnWrite = true && that.isSetCacheBloomsOnWrite(); + if (this_present_cacheBloomsOnWrite || that_present_cacheBloomsOnWrite) { + if (!(this_present_cacheBloomsOnWrite && that_present_cacheBloomsOnWrite)) + return false; + if (this.cacheBloomsOnWrite != that.cacheBloomsOnWrite) + return false; + } + + boolean this_present_cacheDataOnWrite = true && this.isSetCacheDataOnWrite(); + boolean that_present_cacheDataOnWrite = true && that.isSetCacheDataOnWrite(); + if (this_present_cacheDataOnWrite || that_present_cacheDataOnWrite) { + if (!(this_present_cacheDataOnWrite && that_present_cacheDataOnWrite)) + return false; + if (this.cacheDataOnWrite != that.cacheDataOnWrite) + return false; + } + + boolean this_present_cacheIndexesOnWrite = true && this.isSetCacheIndexesOnWrite(); + boolean that_present_cacheIndexesOnWrite = true && that.isSetCacheIndexesOnWrite(); + if (this_present_cacheIndexesOnWrite || that_present_cacheIndexesOnWrite) { + if (!(this_present_cacheIndexesOnWrite && that_present_cacheIndexesOnWrite)) + return false; + if (this.cacheIndexesOnWrite != that.cacheIndexesOnWrite) + return false; + } + + boolean this_present_compressTags = true && this.isSetCompressTags(); + boolean that_present_compressTags = true && that.isSetCompressTags(); + if (this_present_compressTags || that_present_compressTags) { + if (!(this_present_compressTags && that_present_compressTags)) + return false; + if (this.compressTags != that.compressTags) + return false; + } + + boolean this_present_evictBlocksOnClose = true && this.isSetEvictBlocksOnClose(); + boolean that_present_evictBlocksOnClose = true && that.isSetEvictBlocksOnClose(); + if (this_present_evictBlocksOnClose || that_present_evictBlocksOnClose) { + if (!(this_present_evictBlocksOnClose && that_present_evictBlocksOnClose)) + return false; + if (this.evictBlocksOnClose != that.evictBlocksOnClose) + return false; + } + + boolean this_present_inMemory = true && this.isSetInMemory(); + boolean that_present_inMemory = true && that.isSetInMemory(); + if (this_present_inMemory || that_present_inMemory) { + if (!(this_present_inMemory && that_present_inMemory)) + return false; + if (this.inMemory != that.inMemory) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + boolean present_attributes = true && (isSetAttributes()); + list.add(present_attributes); + if (present_attributes) + list.add(attributes); + + boolean present_configuration = true && (isSetConfiguration()); + list.add(present_configuration); + if (present_configuration) + list.add(configuration); + + boolean present_blockSize = true && (isSetBlockSize()); + list.add(present_blockSize); + if (present_blockSize) + list.add(blockSize); + + boolean present_bloomnFilterType = true && (isSetBloomnFilterType()); + list.add(present_bloomnFilterType); + if (present_bloomnFilterType) + list.add(bloomnFilterType.getValue()); + + boolean present_compressionType = true && (isSetCompressionType()); + list.add(present_compressionType); + if (present_compressionType) + list.add(compressionType.getValue()); + + boolean present_dfsReplication = true && (isSetDfsReplication()); + list.add(present_dfsReplication); + if (present_dfsReplication) + list.add(dfsReplication); + + boolean present_dataBlockEncoding = true && (isSetDataBlockEncoding()); + list.add(present_dataBlockEncoding); + if (present_dataBlockEncoding) + list.add(dataBlockEncoding.getValue()); + + boolean present_keepDeletedCells = true && (isSetKeepDeletedCells()); + list.add(present_keepDeletedCells); + if (present_keepDeletedCells) + list.add(keepDeletedCells.getValue()); + + boolean present_maxVersions = true && (isSetMaxVersions()); + list.add(present_maxVersions); + if (present_maxVersions) + list.add(maxVersions); + + boolean present_minVersions = true && (isSetMinVersions()); + list.add(present_minVersions); + if (present_minVersions) + list.add(minVersions); + + boolean present_scope = true && (isSetScope()); + list.add(present_scope); + if (present_scope) + list.add(scope); + + boolean present_timeToLive = true && (isSetTimeToLive()); + list.add(present_timeToLive); + if (present_timeToLive) + list.add(timeToLive); + + boolean present_blockCacheEnabled = true && (isSetBlockCacheEnabled()); + list.add(present_blockCacheEnabled); + if (present_blockCacheEnabled) + list.add(blockCacheEnabled); + + boolean present_cacheBloomsOnWrite = true && (isSetCacheBloomsOnWrite()); + list.add(present_cacheBloomsOnWrite); + if (present_cacheBloomsOnWrite) + list.add(cacheBloomsOnWrite); + + boolean present_cacheDataOnWrite = true && (isSetCacheDataOnWrite()); + list.add(present_cacheDataOnWrite); + if (present_cacheDataOnWrite) + list.add(cacheDataOnWrite); + + boolean present_cacheIndexesOnWrite = true && (isSetCacheIndexesOnWrite()); + list.add(present_cacheIndexesOnWrite); + if (present_cacheIndexesOnWrite) + list.add(cacheIndexesOnWrite); + + boolean present_compressTags = true && (isSetCompressTags()); + list.add(present_compressTags); + if (present_compressTags) + list.add(compressTags); + + boolean present_evictBlocksOnClose = true && (isSetEvictBlocksOnClose()); + list.add(present_evictBlocksOnClose); + if (present_evictBlocksOnClose) + list.add(evictBlocksOnClose); + + boolean present_inMemory = true && (isSetInMemory()); + list.add(present_inMemory); + if (present_inMemory) + list.add(inMemory); + + return list.hashCode(); + } + + @Override + public int compareTo(TColumnFamilyDescriptor other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, other.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetConfiguration()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBlockSize()).compareTo(other.isSetBlockSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBlockSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockSize, other.blockSize); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBloomnFilterType()).compareTo(other.isSetBloomnFilterType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBloomnFilterType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomnFilterType, other.bloomnFilterType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCompressionType()).compareTo(other.isSetCompressionType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCompressionType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressionType, other.compressionType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDfsReplication()).compareTo(other.isSetDfsReplication()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDfsReplication()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dfsReplication, other.dfsReplication); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDataBlockEncoding()).compareTo(other.isSetDataBlockEncoding()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataBlockEncoding()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataBlockEncoding, other.dataBlockEncoding); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetKeepDeletedCells()).compareTo(other.isSetKeepDeletedCells()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetKeepDeletedCells()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keepDeletedCells, other.keepDeletedCells); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(other.isSetMaxVersions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxVersions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, other.maxVersions); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMinVersions()).compareTo(other.isSetMinVersions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMinVersions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minVersions, other.minVersions); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetScope()).compareTo(other.isSetScope()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetScope()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scope, other.scope); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimeToLive()).compareTo(other.isSetTimeToLive()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeToLive()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeToLive, other.timeToLive); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBlockCacheEnabled()).compareTo(other.isSetBlockCacheEnabled()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBlockCacheEnabled()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockCacheEnabled, other.blockCacheEnabled); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCacheBloomsOnWrite()).compareTo(other.isSetCacheBloomsOnWrite()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCacheBloomsOnWrite()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheBloomsOnWrite, other.cacheBloomsOnWrite); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCacheDataOnWrite()).compareTo(other.isSetCacheDataOnWrite()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCacheDataOnWrite()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheDataOnWrite, other.cacheDataOnWrite); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCacheIndexesOnWrite()).compareTo(other.isSetCacheIndexesOnWrite()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCacheIndexesOnWrite()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheIndexesOnWrite, other.cacheIndexesOnWrite); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCompressTags()).compareTo(other.isSetCompressTags()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCompressTags()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressTags, other.compressTags); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEvictBlocksOnClose()).compareTo(other.isSetEvictBlocksOnClose()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEvictBlocksOnClose()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.evictBlocksOnClose, other.evictBlocksOnClose); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetInMemory()).compareTo(other.isSetInMemory()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetInMemory()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inMemory, other.inMemory); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TColumnFamilyDescriptor("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.name, sb); + } + first = false; + if (isSetAttributes()) { + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + } + if (isSetConfiguration()) { + if (!first) sb.append(", "); + sb.append("configuration:"); + if (this.configuration == null) { + sb.append("null"); + } else { + sb.append(this.configuration); + } + first = false; + } + if (isSetBlockSize()) { + if (!first) sb.append(", "); + sb.append("blockSize:"); + sb.append(this.blockSize); + first = false; + } + if (isSetBloomnFilterType()) { + if (!first) sb.append(", "); + sb.append("bloomnFilterType:"); + if (this.bloomnFilterType == null) { + sb.append("null"); + } else { + sb.append(this.bloomnFilterType); + } + first = false; + } + if (isSetCompressionType()) { + if (!first) sb.append(", "); + sb.append("compressionType:"); + if (this.compressionType == null) { + sb.append("null"); + } else { + sb.append(this.compressionType); + } + first = false; + } + if (isSetDfsReplication()) { + if (!first) sb.append(", "); + sb.append("dfsReplication:"); + sb.append(this.dfsReplication); + first = false; + } + if (isSetDataBlockEncoding()) { + if (!first) sb.append(", "); + sb.append("dataBlockEncoding:"); + if (this.dataBlockEncoding == null) { + sb.append("null"); + } else { + sb.append(this.dataBlockEncoding); + } + first = false; + } + if (isSetKeepDeletedCells()) { + if (!first) sb.append(", "); + sb.append("keepDeletedCells:"); + if (this.keepDeletedCells == null) { + sb.append("null"); + } else { + sb.append(this.keepDeletedCells); + } + first = false; + } + if (isSetMaxVersions()) { + if (!first) sb.append(", "); + sb.append("maxVersions:"); + sb.append(this.maxVersions); + first = false; + } + if (isSetMinVersions()) { + if (!first) sb.append(", "); + sb.append("minVersions:"); + sb.append(this.minVersions); + first = false; + } + if (isSetScope()) { + if (!first) sb.append(", "); + sb.append("scope:"); + sb.append(this.scope); + first = false; + } + if (isSetTimeToLive()) { + if (!first) sb.append(", "); + sb.append("timeToLive:"); + sb.append(this.timeToLive); + first = false; + } + if (isSetBlockCacheEnabled()) { + if (!first) sb.append(", "); + sb.append("blockCacheEnabled:"); + sb.append(this.blockCacheEnabled); + first = false; + } + if (isSetCacheBloomsOnWrite()) { + if (!first) sb.append(", "); + sb.append("cacheBloomsOnWrite:"); + sb.append(this.cacheBloomsOnWrite); + first = false; + } + if (isSetCacheDataOnWrite()) { + if (!first) sb.append(", "); + sb.append("cacheDataOnWrite:"); + sb.append(this.cacheDataOnWrite); + first = false; + } + if (isSetCacheIndexesOnWrite()) { + if (!first) sb.append(", "); + sb.append("cacheIndexesOnWrite:"); + sb.append(this.cacheIndexesOnWrite); + first = false; + } + if (isSetCompressTags()) { + if (!first) sb.append(", "); + sb.append("compressTags:"); + sb.append(this.compressTags); + first = false; + } + if (isSetEvictBlocksOnClose()) { + if (!first) sb.append(", "); + sb.append("evictBlocksOnClose:"); + sb.append(this.evictBlocksOnClose); + first = false; + } + if (isSetInMemory()) { + if (!first) sb.append(", "); + sb.append("inMemory:"); + sb.append(this.inMemory); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (name == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TColumnFamilyDescriptorStandardSchemeFactory implements SchemeFactory { + public TColumnFamilyDescriptorStandardScheme getScheme() { + return new TColumnFamilyDescriptorStandardScheme(); + } + } + + private static class TColumnFamilyDescriptorStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TColumnFamilyDescriptor struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readBinary(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map142 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map142.size); + ByteBuffer _key143; + ByteBuffer _val144; + for (int _i145 = 0; _i145 < _map142.size; ++_i145) + { + _key143 = iprot.readBinary(); + _val144 = iprot.readBinary(); + struct.attributes.put(_key143, _val144); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // CONFIGURATION + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map146 = iprot.readMapBegin(); + struct.configuration = new HashMap(2*_map146.size); + String _key147; + String _val148; + for (int _i149 = 0; _i149 < _map146.size; ++_i149) + { + _key147 = iprot.readString(); + _val148 = iprot.readString(); + struct.configuration.put(_key147, _val148); + } + iprot.readMapEnd(); + } + struct.setConfigurationIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // BLOCK_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.blockSize = iprot.readI32(); + struct.setBlockSizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // BLOOMN_FILTER_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.bloomnFilterType = org.apache.hadoop.hbase.thrift2.generated.TBloomFilterType.findByValue(iprot.readI32()); + struct.setBloomnFilterTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // COMPRESSION_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.compressionType = org.apache.hadoop.hbase.thrift2.generated.TCompressionAlgorithm.findByValue(iprot.readI32()); + struct.setCompressionTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // DFS_REPLICATION + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.dfsReplication = iprot.readI16(); + struct.setDfsReplicationIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // DATA_BLOCK_ENCODING + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.dataBlockEncoding = org.apache.hadoop.hbase.thrift2.generated.TDataBlockEncoding.findByValue(iprot.readI32()); + struct.setDataBlockEncodingIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // KEEP_DELETED_CELLS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.keepDeletedCells = org.apache.hadoop.hbase.thrift2.generated.TKeepDeletedCells.findByValue(iprot.readI32()); + struct.setKeepDeletedCellsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // MAX_VERSIONS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.maxVersions = iprot.readI32(); + struct.setMaxVersionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // MIN_VERSIONS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.minVersions = iprot.readI32(); + struct.setMinVersionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // SCOPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.scope = iprot.readI32(); + struct.setScopeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // TIME_TO_LIVE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.timeToLive = iprot.readI32(); + struct.setTimeToLiveIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 14: // BLOCK_CACHE_ENABLED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.blockCacheEnabled = iprot.readBool(); + struct.setBlockCacheEnabledIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 15: // CACHE_BLOOMS_ON_WRITE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.cacheBloomsOnWrite = iprot.readBool(); + struct.setCacheBloomsOnWriteIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 16: // CACHE_DATA_ON_WRITE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.cacheDataOnWrite = iprot.readBool(); + struct.setCacheDataOnWriteIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 17: // CACHE_INDEXES_ON_WRITE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.cacheIndexesOnWrite = iprot.readBool(); + struct.setCacheIndexesOnWriteIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 18: // COMPRESS_TAGS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.compressTags = iprot.readBool(); + struct.setCompressTagsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 19: // EVICT_BLOCKS_ON_CLOSE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.evictBlocksOnClose = iprot.readBool(); + struct.setEvictBlocksOnCloseIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 20: // IN_MEMORY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.inMemory = iprot.readBool(); + struct.setInMemoryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TColumnFamilyDescriptor struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeBinary(struct.name); + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + if (struct.isSetAttributes()) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter150 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter150.getKey()); + oprot.writeBinary(_iter150.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.configuration != null) { + if (struct.isSetConfiguration()) { + oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.configuration.size())); + for (Map.Entry _iter151 : struct.configuration.entrySet()) + { + oprot.writeString(_iter151.getKey()); + oprot.writeString(_iter151.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.isSetBlockSize()) { + oprot.writeFieldBegin(BLOCK_SIZE_FIELD_DESC); + oprot.writeI32(struct.blockSize); + oprot.writeFieldEnd(); + } + if (struct.bloomnFilterType != null) { + if (struct.isSetBloomnFilterType()) { + oprot.writeFieldBegin(BLOOMN_FILTER_TYPE_FIELD_DESC); + oprot.writeI32(struct.bloomnFilterType.getValue()); + oprot.writeFieldEnd(); + } + } + if (struct.compressionType != null) { + if (struct.isSetCompressionType()) { + oprot.writeFieldBegin(COMPRESSION_TYPE_FIELD_DESC); + oprot.writeI32(struct.compressionType.getValue()); + oprot.writeFieldEnd(); + } + } + if (struct.isSetDfsReplication()) { + oprot.writeFieldBegin(DFS_REPLICATION_FIELD_DESC); + oprot.writeI16(struct.dfsReplication); + oprot.writeFieldEnd(); + } + if (struct.dataBlockEncoding != null) { + if (struct.isSetDataBlockEncoding()) { + oprot.writeFieldBegin(DATA_BLOCK_ENCODING_FIELD_DESC); + oprot.writeI32(struct.dataBlockEncoding.getValue()); + oprot.writeFieldEnd(); + } + } + if (struct.keepDeletedCells != null) { + if (struct.isSetKeepDeletedCells()) { + oprot.writeFieldBegin(KEEP_DELETED_CELLS_FIELD_DESC); + oprot.writeI32(struct.keepDeletedCells.getValue()); + oprot.writeFieldEnd(); + } + } + if (struct.isSetMaxVersions()) { + oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC); + oprot.writeI32(struct.maxVersions); + oprot.writeFieldEnd(); + } + if (struct.isSetMinVersions()) { + oprot.writeFieldBegin(MIN_VERSIONS_FIELD_DESC); + oprot.writeI32(struct.minVersions); + oprot.writeFieldEnd(); + } + if (struct.isSetScope()) { + oprot.writeFieldBegin(SCOPE_FIELD_DESC); + oprot.writeI32(struct.scope); + oprot.writeFieldEnd(); + } + if (struct.isSetTimeToLive()) { + oprot.writeFieldBegin(TIME_TO_LIVE_FIELD_DESC); + oprot.writeI32(struct.timeToLive); + oprot.writeFieldEnd(); + } + if (struct.isSetBlockCacheEnabled()) { + oprot.writeFieldBegin(BLOCK_CACHE_ENABLED_FIELD_DESC); + oprot.writeBool(struct.blockCacheEnabled); + oprot.writeFieldEnd(); + } + if (struct.isSetCacheBloomsOnWrite()) { + oprot.writeFieldBegin(CACHE_BLOOMS_ON_WRITE_FIELD_DESC); + oprot.writeBool(struct.cacheBloomsOnWrite); + oprot.writeFieldEnd(); + } + if (struct.isSetCacheDataOnWrite()) { + oprot.writeFieldBegin(CACHE_DATA_ON_WRITE_FIELD_DESC); + oprot.writeBool(struct.cacheDataOnWrite); + oprot.writeFieldEnd(); + } + if (struct.isSetCacheIndexesOnWrite()) { + oprot.writeFieldBegin(CACHE_INDEXES_ON_WRITE_FIELD_DESC); + oprot.writeBool(struct.cacheIndexesOnWrite); + oprot.writeFieldEnd(); + } + if (struct.isSetCompressTags()) { + oprot.writeFieldBegin(COMPRESS_TAGS_FIELD_DESC); + oprot.writeBool(struct.compressTags); + oprot.writeFieldEnd(); + } + if (struct.isSetEvictBlocksOnClose()) { + oprot.writeFieldBegin(EVICT_BLOCKS_ON_CLOSE_FIELD_DESC); + oprot.writeBool(struct.evictBlocksOnClose); + oprot.writeFieldEnd(); + } + if (struct.isSetInMemory()) { + oprot.writeFieldBegin(IN_MEMORY_FIELD_DESC); + oprot.writeBool(struct.inMemory); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TColumnFamilyDescriptorTupleSchemeFactory implements SchemeFactory { + public TColumnFamilyDescriptorTupleScheme getScheme() { + return new TColumnFamilyDescriptorTupleScheme(); + } + } + + private static class TColumnFamilyDescriptorTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TColumnFamilyDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.name); + BitSet optionals = new BitSet(); + if (struct.isSetAttributes()) { + optionals.set(0); + } + if (struct.isSetConfiguration()) { + optionals.set(1); + } + if (struct.isSetBlockSize()) { + optionals.set(2); + } + if (struct.isSetBloomnFilterType()) { + optionals.set(3); + } + if (struct.isSetCompressionType()) { + optionals.set(4); + } + if (struct.isSetDfsReplication()) { + optionals.set(5); + } + if (struct.isSetDataBlockEncoding()) { + optionals.set(6); + } + if (struct.isSetKeepDeletedCells()) { + optionals.set(7); + } + if (struct.isSetMaxVersions()) { + optionals.set(8); + } + if (struct.isSetMinVersions()) { + optionals.set(9); + } + if (struct.isSetScope()) { + optionals.set(10); + } + if (struct.isSetTimeToLive()) { + optionals.set(11); + } + if (struct.isSetBlockCacheEnabled()) { + optionals.set(12); + } + if (struct.isSetCacheBloomsOnWrite()) { + optionals.set(13); + } + if (struct.isSetCacheDataOnWrite()) { + optionals.set(14); + } + if (struct.isSetCacheIndexesOnWrite()) { + optionals.set(15); + } + if (struct.isSetCompressTags()) { + optionals.set(16); + } + if (struct.isSetEvictBlocksOnClose()) { + optionals.set(17); + } + if (struct.isSetInMemory()) { + optionals.set(18); + } + oprot.writeBitSet(optionals, 19); + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter152 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter152.getKey()); + oprot.writeBinary(_iter152.getValue()); + } + } + } + if (struct.isSetConfiguration()) { + { + oprot.writeI32(struct.configuration.size()); + for (Map.Entry _iter153 : struct.configuration.entrySet()) + { + oprot.writeString(_iter153.getKey()); + oprot.writeString(_iter153.getValue()); + } + } + } + if (struct.isSetBlockSize()) { + oprot.writeI32(struct.blockSize); + } + if (struct.isSetBloomnFilterType()) { + oprot.writeI32(struct.bloomnFilterType.getValue()); + } + if (struct.isSetCompressionType()) { + oprot.writeI32(struct.compressionType.getValue()); + } + if (struct.isSetDfsReplication()) { + oprot.writeI16(struct.dfsReplication); + } + if (struct.isSetDataBlockEncoding()) { + oprot.writeI32(struct.dataBlockEncoding.getValue()); + } + if (struct.isSetKeepDeletedCells()) { + oprot.writeI32(struct.keepDeletedCells.getValue()); + } + if (struct.isSetMaxVersions()) { + oprot.writeI32(struct.maxVersions); + } + if (struct.isSetMinVersions()) { + oprot.writeI32(struct.minVersions); + } + if (struct.isSetScope()) { + oprot.writeI32(struct.scope); + } + if (struct.isSetTimeToLive()) { + oprot.writeI32(struct.timeToLive); + } + if (struct.isSetBlockCacheEnabled()) { + oprot.writeBool(struct.blockCacheEnabled); + } + if (struct.isSetCacheBloomsOnWrite()) { + oprot.writeBool(struct.cacheBloomsOnWrite); + } + if (struct.isSetCacheDataOnWrite()) { + oprot.writeBool(struct.cacheDataOnWrite); + } + if (struct.isSetCacheIndexesOnWrite()) { + oprot.writeBool(struct.cacheIndexesOnWrite); + } + if (struct.isSetCompressTags()) { + oprot.writeBool(struct.compressTags); + } + if (struct.isSetEvictBlocksOnClose()) { + oprot.writeBool(struct.evictBlocksOnClose); + } + if (struct.isSetInMemory()) { + oprot.writeBool(struct.inMemory); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TColumnFamilyDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.name = iprot.readBinary(); + struct.setNameIsSet(true); + BitSet incoming = iprot.readBitSet(19); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map154 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map154.size); + ByteBuffer _key155; + ByteBuffer _val156; + for (int _i157 = 0; _i157 < _map154.size; ++_i157) + { + _key155 = iprot.readBinary(); + _val156 = iprot.readBinary(); + struct.attributes.put(_key155, _val156); + } + } + struct.setAttributesIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TMap _map158 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.configuration = new HashMap(2*_map158.size); + String _key159; + String _val160; + for (int _i161 = 0; _i161 < _map158.size; ++_i161) + { + _key159 = iprot.readString(); + _val160 = iprot.readString(); + struct.configuration.put(_key159, _val160); + } + } + struct.setConfigurationIsSet(true); + } + if (incoming.get(2)) { + struct.blockSize = iprot.readI32(); + struct.setBlockSizeIsSet(true); + } + if (incoming.get(3)) { + struct.bloomnFilterType = org.apache.hadoop.hbase.thrift2.generated.TBloomFilterType.findByValue(iprot.readI32()); + struct.setBloomnFilterTypeIsSet(true); + } + if (incoming.get(4)) { + struct.compressionType = org.apache.hadoop.hbase.thrift2.generated.TCompressionAlgorithm.findByValue(iprot.readI32()); + struct.setCompressionTypeIsSet(true); + } + if (incoming.get(5)) { + struct.dfsReplication = iprot.readI16(); + struct.setDfsReplicationIsSet(true); + } + if (incoming.get(6)) { + struct.dataBlockEncoding = org.apache.hadoop.hbase.thrift2.generated.TDataBlockEncoding.findByValue(iprot.readI32()); + struct.setDataBlockEncodingIsSet(true); + } + if (incoming.get(7)) { + struct.keepDeletedCells = org.apache.hadoop.hbase.thrift2.generated.TKeepDeletedCells.findByValue(iprot.readI32()); + struct.setKeepDeletedCellsIsSet(true); + } + if (incoming.get(8)) { + struct.maxVersions = iprot.readI32(); + struct.setMaxVersionsIsSet(true); + } + if (incoming.get(9)) { + struct.minVersions = iprot.readI32(); + struct.setMinVersionsIsSet(true); + } + if (incoming.get(10)) { + struct.scope = iprot.readI32(); + struct.setScopeIsSet(true); + } + if (incoming.get(11)) { + struct.timeToLive = iprot.readI32(); + struct.setTimeToLiveIsSet(true); + } + if (incoming.get(12)) { + struct.blockCacheEnabled = iprot.readBool(); + struct.setBlockCacheEnabledIsSet(true); + } + if (incoming.get(13)) { + struct.cacheBloomsOnWrite = iprot.readBool(); + struct.setCacheBloomsOnWriteIsSet(true); + } + if (incoming.get(14)) { + struct.cacheDataOnWrite = iprot.readBool(); + struct.setCacheDataOnWriteIsSet(true); + } + if (incoming.get(15)) { + struct.cacheIndexesOnWrite = iprot.readBool(); + struct.setCacheIndexesOnWriteIsSet(true); + } + if (incoming.get(16)) { + struct.compressTags = iprot.readBool(); + struct.setCompressTagsIsSet(true); + } + if (incoming.get(17)) { + struct.evictBlocksOnClose = iprot.readBool(); + struct.setEvictBlocksOnCloseIsSet(true); + } + if (incoming.get(18)) { + struct.inMemory = iprot.readBool(); + struct.setInMemoryIsSet(true); + } + } + } + +} + diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java index 2fb3f762a7..0f27519247 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java @@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory; /** * Represents a single cell and the amount to increment it by */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TColumnIncrement implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnIncrement"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java index 3ceb4c019e..6cded1b54c 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java @@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory; /** * Represents a single cell and its value. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TColumnValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnValue"); @@ -46,6 +46,7 @@ public class TColumnValue implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -58,6 +59,7 @@ public class TColumnValue implements org.apache.thrift.TBase byName = new HashMap(); @@ -90,6 +93,8 @@ public class TColumnValue implements org.apache.thrift.TBase metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -146,6 +152,8 @@ public class TColumnValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDelete"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDurability.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDurability.java index c1144f307a..dbe739322a 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDurability.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDurability.java @@ -19,6 +19,7 @@ import org.apache.thrift.TEnum; * - FSYNC_WAL means Write the Mutation to the WAL synchronously and force the entries to disk. */ public enum TDurability implements org.apache.thrift.TEnum { + USE_DEFAULT(0), SKIP_WAL(1), ASYNC_WAL(2), SYNC_WAL(3), @@ -43,6 +44,8 @@ public enum TDurability implements org.apache.thrift.TEnum { */ public static TDurability findByValue(int value) { switch (value) { + case 0: + return USE_DEFAULT; case 1: return SKIP_WAL; case 2: diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java index cfb1d6c165..1b01ef5d49 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java @@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory; * If you specify a time range and a timestamp the range is ignored. * Timestamps on TColumns are ignored. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-07-03") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TGet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGet"); @@ -61,6 +61,10 @@ public class TGet implements org.apache.thrift.TBase, java.i private static final org.apache.thrift.protocol.TField AUTHORIZATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("authorizations", org.apache.thrift.protocol.TType.STRUCT, (short)8); private static final org.apache.thrift.protocol.TField CONSISTENCY_FIELD_DESC = new org.apache.thrift.protocol.TField("consistency", org.apache.thrift.protocol.TType.I32, (short)9); private static final org.apache.thrift.protocol.TField TARGET_REPLICA_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("targetReplicaId", org.apache.thrift.protocol.TType.I32, (short)10); + private static final org.apache.thrift.protocol.TField CACHE_BLOCKS_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheBlocks", org.apache.thrift.protocol.TType.BOOL, (short)11); + private static final org.apache.thrift.protocol.TField STORE_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("storeLimit", org.apache.thrift.protocol.TType.I32, (short)12); + private static final org.apache.thrift.protocol.TField STORE_OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("storeOffset", org.apache.thrift.protocol.TType.I32, (short)13); + private static final org.apache.thrift.protocol.TField EXISTENCE_ONLY_FIELD_DESC = new org.apache.thrift.protocol.TField("existence_only", org.apache.thrift.protocol.TType.BOOL, (short)14); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -82,6 +86,10 @@ public class TGet implements org.apache.thrift.TBase, java.i */ public TConsistency consistency; // optional public int targetReplicaId; // optional + public boolean cacheBlocks; // optional + public int storeLimit; // optional + public int storeOffset; // optional + public boolean existence_only; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -98,7 +106,11 @@ public class TGet implements org.apache.thrift.TBase, java.i * @see TConsistency */ CONSISTENCY((short)9, "consistency"), - TARGET_REPLICA_ID((short)10, "targetReplicaId"); + TARGET_REPLICA_ID((short)10, "targetReplicaId"), + CACHE_BLOCKS((short)11, "cacheBlocks"), + STORE_LIMIT((short)12, "storeLimit"), + STORE_OFFSET((short)13, "storeOffset"), + EXISTENCE_ONLY((short)14, "existence_only"); private static final Map byName = new HashMap(); @@ -133,6 +145,14 @@ public class TGet implements org.apache.thrift.TBase, java.i return CONSISTENCY; case 10: // TARGET_REPLICA_ID return TARGET_REPLICA_ID; + case 11: // CACHE_BLOCKS + return CACHE_BLOCKS; + case 12: // STORE_LIMIT + return STORE_LIMIT; + case 13: // STORE_OFFSET + return STORE_OFFSET; + case 14: // EXISTENCE_ONLY + return EXISTENCE_ONLY; default: return null; } @@ -176,8 +196,12 @@ public class TGet implements org.apache.thrift.TBase, java.i private static final int __TIMESTAMP_ISSET_ID = 0; private static final int __MAXVERSIONS_ISSET_ID = 1; private static final int __TARGETREPLICAID_ISSET_ID = 2; + private static final int __CACHEBLOCKS_ISSET_ID = 3; + private static final int __STORELIMIT_ISSET_ID = 4; + private static final int __STOREOFFSET_ISSET_ID = 5; + private static final int __EXISTENCE_ONLY_ISSET_ID = 6; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.TIME_RANGE,_Fields.MAX_VERSIONS,_Fields.FILTER_STRING,_Fields.ATTRIBUTES,_Fields.AUTHORIZATIONS,_Fields.CONSISTENCY,_Fields.TARGET_REPLICA_ID}; + private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.TIME_RANGE,_Fields.MAX_VERSIONS,_Fields.FILTER_STRING,_Fields.ATTRIBUTES,_Fields.AUTHORIZATIONS,_Fields.CONSISTENCY,_Fields.TARGET_REPLICA_ID,_Fields.CACHE_BLOCKS,_Fields.STORE_LIMIT,_Fields.STORE_OFFSET,_Fields.EXISTENCE_ONLY}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -204,6 +228,14 @@ public class TGet implements org.apache.thrift.TBase, java.i new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TConsistency.class))); tmpMap.put(_Fields.TARGET_REPLICA_ID, new org.apache.thrift.meta_data.FieldMetaData("targetReplicaId", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.CACHE_BLOCKS, new org.apache.thrift.meta_data.FieldMetaData("cacheBlocks", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.STORE_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("storeLimit", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.STORE_OFFSET, new org.apache.thrift.meta_data.FieldMetaData("storeOffset", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.EXISTENCE_ONLY, new org.apache.thrift.meta_data.FieldMetaData("existence_only", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGet.class, metaDataMap); } @@ -252,6 +284,10 @@ public class TGet implements org.apache.thrift.TBase, java.i this.consistency = other.consistency; } this.targetReplicaId = other.targetReplicaId; + this.cacheBlocks = other.cacheBlocks; + this.storeLimit = other.storeLimit; + this.storeOffset = other.storeOffset; + this.existence_only = other.existence_only; } public TGet deepCopy() { @@ -273,6 +309,14 @@ public class TGet implements org.apache.thrift.TBase, java.i this.consistency = null; setTargetReplicaIdIsSet(false); this.targetReplicaId = 0; + setCacheBlocksIsSet(false); + this.cacheBlocks = false; + setStoreLimitIsSet(false); + this.storeLimit = 0; + setStoreOffsetIsSet(false); + this.storeOffset = 0; + setExistence_onlyIsSet(false); + this.existence_only = false; } public byte[] getRow() { @@ -566,6 +610,98 @@ public class TGet implements org.apache.thrift.TBase, java.i __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TARGETREPLICAID_ISSET_ID, value); } + public boolean isCacheBlocks() { + return this.cacheBlocks; + } + + public TGet setCacheBlocks(boolean cacheBlocks) { + this.cacheBlocks = cacheBlocks; + setCacheBlocksIsSet(true); + return this; + } + + public void unsetCacheBlocks() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHEBLOCKS_ISSET_ID); + } + + /** Returns true if field cacheBlocks is set (has been assigned a value) and false otherwise */ + public boolean isSetCacheBlocks() { + return EncodingUtils.testBit(__isset_bitfield, __CACHEBLOCKS_ISSET_ID); + } + + public void setCacheBlocksIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHEBLOCKS_ISSET_ID, value); + } + + public int getStoreLimit() { + return this.storeLimit; + } + + public TGet setStoreLimit(int storeLimit) { + this.storeLimit = storeLimit; + setStoreLimitIsSet(true); + return this; + } + + public void unsetStoreLimit() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STORELIMIT_ISSET_ID); + } + + /** Returns true if field storeLimit is set (has been assigned a value) and false otherwise */ + public boolean isSetStoreLimit() { + return EncodingUtils.testBit(__isset_bitfield, __STORELIMIT_ISSET_ID); + } + + public void setStoreLimitIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STORELIMIT_ISSET_ID, value); + } + + public int getStoreOffset() { + return this.storeOffset; + } + + public TGet setStoreOffset(int storeOffset) { + this.storeOffset = storeOffset; + setStoreOffsetIsSet(true); + return this; + } + + public void unsetStoreOffset() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STOREOFFSET_ISSET_ID); + } + + /** Returns true if field storeOffset is set (has been assigned a value) and false otherwise */ + public boolean isSetStoreOffset() { + return EncodingUtils.testBit(__isset_bitfield, __STOREOFFSET_ISSET_ID); + } + + public void setStoreOffsetIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STOREOFFSET_ISSET_ID, value); + } + + public boolean isExistence_only() { + return this.existence_only; + } + + public TGet setExistence_only(boolean existence_only) { + this.existence_only = existence_only; + setExistence_onlyIsSet(true); + return this; + } + + public void unsetExistence_only() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXISTENCE_ONLY_ISSET_ID); + } + + /** Returns true if field existence_only is set (has been assigned a value) and false otherwise */ + public boolean isSetExistence_only() { + return EncodingUtils.testBit(__isset_bitfield, __EXISTENCE_ONLY_ISSET_ID); + } + + public void setExistence_onlyIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXISTENCE_ONLY_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case ROW: @@ -648,6 +784,38 @@ public class TGet implements org.apache.thrift.TBase, java.i } break; + case CACHE_BLOCKS: + if (value == null) { + unsetCacheBlocks(); + } else { + setCacheBlocks((Boolean)value); + } + break; + + case STORE_LIMIT: + if (value == null) { + unsetStoreLimit(); + } else { + setStoreLimit((Integer)value); + } + break; + + case STORE_OFFSET: + if (value == null) { + unsetStoreOffset(); + } else { + setStoreOffset((Integer)value); + } + break; + + case EXISTENCE_ONLY: + if (value == null) { + unsetExistence_only(); + } else { + setExistence_only((Boolean)value); + } + break; + } } @@ -683,6 +851,18 @@ public class TGet implements org.apache.thrift.TBase, java.i case TARGET_REPLICA_ID: return getTargetReplicaId(); + case CACHE_BLOCKS: + return isCacheBlocks(); + + case STORE_LIMIT: + return getStoreLimit(); + + case STORE_OFFSET: + return getStoreOffset(); + + case EXISTENCE_ONLY: + return isExistence_only(); + } throw new IllegalStateException(); } @@ -714,6 +894,14 @@ public class TGet implements org.apache.thrift.TBase, java.i return isSetConsistency(); case TARGET_REPLICA_ID: return isSetTargetReplicaId(); + case CACHE_BLOCKS: + return isSetCacheBlocks(); + case STORE_LIMIT: + return isSetStoreLimit(); + case STORE_OFFSET: + return isSetStoreOffset(); + case EXISTENCE_ONLY: + return isSetExistence_only(); } throw new IllegalStateException(); } @@ -821,6 +1009,42 @@ public class TGet implements org.apache.thrift.TBase, java.i return false; } + boolean this_present_cacheBlocks = true && this.isSetCacheBlocks(); + boolean that_present_cacheBlocks = true && that.isSetCacheBlocks(); + if (this_present_cacheBlocks || that_present_cacheBlocks) { + if (!(this_present_cacheBlocks && that_present_cacheBlocks)) + return false; + if (this.cacheBlocks != that.cacheBlocks) + return false; + } + + boolean this_present_storeLimit = true && this.isSetStoreLimit(); + boolean that_present_storeLimit = true && that.isSetStoreLimit(); + if (this_present_storeLimit || that_present_storeLimit) { + if (!(this_present_storeLimit && that_present_storeLimit)) + return false; + if (this.storeLimit != that.storeLimit) + return false; + } + + boolean this_present_storeOffset = true && this.isSetStoreOffset(); + boolean that_present_storeOffset = true && that.isSetStoreOffset(); + if (this_present_storeOffset || that_present_storeOffset) { + if (!(this_present_storeOffset && that_present_storeOffset)) + return false; + if (this.storeOffset != that.storeOffset) + return false; + } + + boolean this_present_existence_only = true && this.isSetExistence_only(); + boolean that_present_existence_only = true && that.isSetExistence_only(); + if (this_present_existence_only || that_present_existence_only) { + if (!(this_present_existence_only && that_present_existence_only)) + return false; + if (this.existence_only != that.existence_only) + return false; + } + return true; } @@ -878,6 +1102,26 @@ public class TGet implements org.apache.thrift.TBase, java.i if (present_targetReplicaId) list.add(targetReplicaId); + boolean present_cacheBlocks = true && (isSetCacheBlocks()); + list.add(present_cacheBlocks); + if (present_cacheBlocks) + list.add(cacheBlocks); + + boolean present_storeLimit = true && (isSetStoreLimit()); + list.add(present_storeLimit); + if (present_storeLimit) + list.add(storeLimit); + + boolean present_storeOffset = true && (isSetStoreOffset()); + list.add(present_storeOffset); + if (present_storeOffset) + list.add(storeOffset); + + boolean present_existence_only = true && (isSetExistence_only()); + list.add(present_existence_only); + if (present_existence_only) + list.add(existence_only); + return list.hashCode(); } @@ -989,6 +1233,46 @@ public class TGet implements org.apache.thrift.TBase, java.i return lastComparison; } } + lastComparison = Boolean.valueOf(isSetCacheBlocks()).compareTo(other.isSetCacheBlocks()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCacheBlocks()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheBlocks, other.cacheBlocks); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStoreLimit()).compareTo(other.isSetStoreLimit()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStoreLimit()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storeLimit, other.storeLimit); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStoreOffset()).compareTo(other.isSetStoreOffset()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStoreOffset()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storeOffset, other.storeOffset); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExistence_only()).compareTo(other.isSetExistence_only()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExistence_only()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.existence_only, other.existence_only); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1094,6 +1378,30 @@ public class TGet implements org.apache.thrift.TBase, java.i sb.append(this.targetReplicaId); first = false; } + if (isSetCacheBlocks()) { + if (!first) sb.append(", "); + sb.append("cacheBlocks:"); + sb.append(this.cacheBlocks); + first = false; + } + if (isSetStoreLimit()) { + if (!first) sb.append(", "); + sb.append("storeLimit:"); + sb.append(this.storeLimit); + first = false; + } + if (isSetStoreOffset()) { + if (!first) sb.append(", "); + sb.append("storeOffset:"); + sb.append(this.storeOffset); + first = false; + } + if (isSetExistence_only()) { + if (!first) sb.append(", "); + sb.append("existence_only:"); + sb.append(this.existence_only); + first = false; + } sb.append(")"); return sb.toString(); } @@ -1253,6 +1561,38 @@ public class TGet implements org.apache.thrift.TBase, java.i org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 11: // CACHE_BLOCKS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.cacheBlocks = iprot.readBool(); + struct.setCacheBlocksIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // STORE_LIMIT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.storeLimit = iprot.readI32(); + struct.setStoreLimitIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // STORE_OFFSET + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.storeOffset = iprot.readI32(); + struct.setStoreOffsetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 14: // EXISTENCE_ONLY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.existence_only = iprot.readBool(); + struct.setExistence_onlyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1345,6 +1685,26 @@ public class TGet implements org.apache.thrift.TBase, java.i oprot.writeI32(struct.targetReplicaId); oprot.writeFieldEnd(); } + if (struct.isSetCacheBlocks()) { + oprot.writeFieldBegin(CACHE_BLOCKS_FIELD_DESC); + oprot.writeBool(struct.cacheBlocks); + oprot.writeFieldEnd(); + } + if (struct.isSetStoreLimit()) { + oprot.writeFieldBegin(STORE_LIMIT_FIELD_DESC); + oprot.writeI32(struct.storeLimit); + oprot.writeFieldEnd(); + } + if (struct.isSetStoreOffset()) { + oprot.writeFieldBegin(STORE_OFFSET_FIELD_DESC); + oprot.writeI32(struct.storeOffset); + oprot.writeFieldEnd(); + } + if (struct.isSetExistence_only()) { + oprot.writeFieldBegin(EXISTENCE_ONLY_FIELD_DESC); + oprot.writeBool(struct.existence_only); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1391,7 +1751,19 @@ public class TGet implements org.apache.thrift.TBase, java.i if (struct.isSetTargetReplicaId()) { optionals.set(8); } - oprot.writeBitSet(optionals, 9); + if (struct.isSetCacheBlocks()) { + optionals.set(9); + } + if (struct.isSetStoreLimit()) { + optionals.set(10); + } + if (struct.isSetStoreOffset()) { + optionals.set(11); + } + if (struct.isSetExistence_only()) { + optionals.set(12); + } + oprot.writeBitSet(optionals, 13); if (struct.isSetColumns()) { { oprot.writeI32(struct.columns.size()); @@ -1432,6 +1804,18 @@ public class TGet implements org.apache.thrift.TBase, java.i if (struct.isSetTargetReplicaId()) { oprot.writeI32(struct.targetReplicaId); } + if (struct.isSetCacheBlocks()) { + oprot.writeBool(struct.cacheBlocks); + } + if (struct.isSetStoreLimit()) { + oprot.writeI32(struct.storeLimit); + } + if (struct.isSetStoreOffset()) { + oprot.writeI32(struct.storeOffset); + } + if (struct.isSetExistence_only()) { + oprot.writeBool(struct.existence_only); + } } @Override @@ -1439,7 +1823,7 @@ public class TGet implements org.apache.thrift.TBase, java.i TTupleProtocol iprot = (TTupleProtocol) prot; struct.row = iprot.readBinary(); struct.setRowIsSet(true); - BitSet incoming = iprot.readBitSet(9); + BitSet incoming = iprot.readBitSet(13); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list27 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); @@ -1499,6 +1883,22 @@ public class TGet implements org.apache.thrift.TBase, java.i struct.targetReplicaId = iprot.readI32(); struct.setTargetReplicaIdIsSet(true); } + if (incoming.get(9)) { + struct.cacheBlocks = iprot.readBool(); + struct.setCacheBlocksIsSet(true); + } + if (incoming.get(10)) { + struct.storeLimit = iprot.readI32(); + struct.setStoreLimitIsSet(true); + } + if (incoming.get(11)) { + struct.storeOffset = iprot.readI32(); + struct.setStoreOffsetIsSet(true); + } + if (incoming.get(12)) { + struct.existence_only = iprot.readBool(); + struct.setExistence_onlyIsSet(true); + } } } diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java index e8f36a004c..72572a2044 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-07-04") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class THBaseService { public interface Iface { @@ -282,6 +282,62 @@ public class THBaseService { */ public boolean checkAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, TCompareOp compareOp, ByteBuffer value, TRowMutations rowMutations) throws TIOError, org.apache.thrift.TException; + public TTableDescriptor getTableDescriptor(TTableName table) throws TIOError, org.apache.thrift.TException; + + public List getTableDescriptors(List tables) throws TIOError, org.apache.thrift.TException; + + public boolean tableExists(TTableName tableName) throws TIOError, org.apache.thrift.TException; + + public List getTableDescriptorsByPattern(String regex, boolean includeSysTables) throws TIOError, org.apache.thrift.TException; + + public List getTableDescriptorsByNamespace(String name) throws TIOError, org.apache.thrift.TException; + + public List getTableNamesByPattern(String regex, boolean includeSysTables) throws TIOError, org.apache.thrift.TException; + + public List getTableNamesByNamespace(String name) throws TIOError, org.apache.thrift.TException; + + public void createTable(TTableDescriptor desc, List splitKeys) throws TIOError, org.apache.thrift.TException; + + public void deleteTable(TTableName tableName) throws TIOError, org.apache.thrift.TException; + + public List deleteTableByPattern(String regex) throws TIOError, org.apache.thrift.TException; + + public void truncateTable(TTableName tableName, boolean preserveSplits) throws TIOError, org.apache.thrift.TException; + + public void enableTable(TTableName tableName) throws TIOError, org.apache.thrift.TException; + + public List enableTableByPattern(String regex) throws TIOError, org.apache.thrift.TException; + + public void disableTable(TTableName tableName) throws TIOError, org.apache.thrift.TException; + + public List disableTableByPattern(String regex) throws TIOError, org.apache.thrift.TException; + + public boolean isTableEnabled(TTableName tableName) throws TIOError, org.apache.thrift.TException; + + public boolean isTableDisabled(TTableName tableName) throws TIOError, org.apache.thrift.TException; + + public boolean isTableAvailable(TTableName tableName) throws TIOError, org.apache.thrift.TException; + + public boolean isTableAvailableWithSplit(TTableName tableName, List splitKeys) throws TIOError, org.apache.thrift.TException; + + public void addColumnFamily(TTableName tableName, TColumnFamilyDescriptor column) throws TIOError, org.apache.thrift.TException; + + public void deleteColumnFamily(TTableName tableName, ByteBuffer column) throws TIOError, org.apache.thrift.TException; + + public void modifyColumnFamily(TTableName tableName, TColumnFamilyDescriptor column) throws TIOError, org.apache.thrift.TException; + + public void modifyTable(TTableDescriptor desc) throws TIOError, org.apache.thrift.TException; + + public void createNamespace(TNamespaceDescriptor namespaceDesc) throws TIOError, org.apache.thrift.TException; + + public void modifyNamespace(TNamespaceDescriptor namespaceDesc) throws TIOError, org.apache.thrift.TException; + + public void deleteNamespace(String name) throws TIOError, org.apache.thrift.TException; + + public TNamespaceDescriptor getNamespaceDescriptor(String name) throws TIOError, org.apache.thrift.TException; + + public List listNamespaceDescriptors() throws TIOError, org.apache.thrift.TException; + } public interface AsyncIface { @@ -326,6 +382,62 @@ public class THBaseService { public void checkAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, TCompareOp compareOp, ByteBuffer value, TRowMutations rowMutations, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getTableDescriptor(TTableName table, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getTableDescriptors(List tables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void tableExists(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getTableDescriptorsByPattern(String regex, boolean includeSysTables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getTableDescriptorsByNamespace(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getTableNamesByPattern(String regex, boolean includeSysTables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getTableNamesByNamespace(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void createTable(TTableDescriptor desc, List splitKeys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteTable(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteTableByPattern(String regex, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void truncateTable(TTableName tableName, boolean preserveSplits, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void enableTable(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void enableTableByPattern(String regex, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void disableTable(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void disableTableByPattern(String regex, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void isTableEnabled(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void isTableDisabled(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void isTableAvailable(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void isTableAvailableWithSplit(TTableName tableName, List splitKeys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void addColumnFamily(TTableName tableName, TColumnFamilyDescriptor column, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteColumnFamily(TTableName tableName, ByteBuffer column, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void modifyColumnFamily(TTableName tableName, TColumnFamilyDescriptor column, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void modifyTable(TTableDescriptor desc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void createNamespace(TNamespaceDescriptor namespaceDesc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void modifyNamespace(TNamespaceDescriptor namespaceDesc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteNamespace(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getNamespaceDescriptor(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void listNamespaceDescriptors(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -892,6 +1004,705 @@ public class THBaseService { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "checkAndMutate failed: unknown result"); } + public TTableDescriptor getTableDescriptor(TTableName table) throws TIOError, org.apache.thrift.TException + { + send_getTableDescriptor(table); + return recv_getTableDescriptor(); + } + + public void send_getTableDescriptor(TTableName table) throws org.apache.thrift.TException + { + getTableDescriptor_args args = new getTableDescriptor_args(); + args.setTable(table); + sendBase("getTableDescriptor", args); + } + + public TTableDescriptor recv_getTableDescriptor() throws TIOError, org.apache.thrift.TException + { + getTableDescriptor_result result = new getTableDescriptor_result(); + receiveBase(result, "getTableDescriptor"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTableDescriptor failed: unknown result"); + } + + public List getTableDescriptors(List tables) throws TIOError, org.apache.thrift.TException + { + send_getTableDescriptors(tables); + return recv_getTableDescriptors(); + } + + public void send_getTableDescriptors(List tables) throws org.apache.thrift.TException + { + getTableDescriptors_args args = new getTableDescriptors_args(); + args.setTables(tables); + sendBase("getTableDescriptors", args); + } + + public List recv_getTableDescriptors() throws TIOError, org.apache.thrift.TException + { + getTableDescriptors_result result = new getTableDescriptors_result(); + receiveBase(result, "getTableDescriptors"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTableDescriptors failed: unknown result"); + } + + public boolean tableExists(TTableName tableName) throws TIOError, org.apache.thrift.TException + { + send_tableExists(tableName); + return recv_tableExists(); + } + + public void send_tableExists(TTableName tableName) throws org.apache.thrift.TException + { + tableExists_args args = new tableExists_args(); + args.setTableName(tableName); + sendBase("tableExists", args); + } + + public boolean recv_tableExists() throws TIOError, org.apache.thrift.TException + { + tableExists_result result = new tableExists_result(); + receiveBase(result, "tableExists"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "tableExists failed: unknown result"); + } + + public List getTableDescriptorsByPattern(String regex, boolean includeSysTables) throws TIOError, org.apache.thrift.TException + { + send_getTableDescriptorsByPattern(regex, includeSysTables); + return recv_getTableDescriptorsByPattern(); + } + + public void send_getTableDescriptorsByPattern(String regex, boolean includeSysTables) throws org.apache.thrift.TException + { + getTableDescriptorsByPattern_args args = new getTableDescriptorsByPattern_args(); + args.setRegex(regex); + args.setIncludeSysTables(includeSysTables); + sendBase("getTableDescriptorsByPattern", args); + } + + public List recv_getTableDescriptorsByPattern() throws TIOError, org.apache.thrift.TException + { + getTableDescriptorsByPattern_result result = new getTableDescriptorsByPattern_result(); + receiveBase(result, "getTableDescriptorsByPattern"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTableDescriptorsByPattern failed: unknown result"); + } + + public List getTableDescriptorsByNamespace(String name) throws TIOError, org.apache.thrift.TException + { + send_getTableDescriptorsByNamespace(name); + return recv_getTableDescriptorsByNamespace(); + } + + public void send_getTableDescriptorsByNamespace(String name) throws org.apache.thrift.TException + { + getTableDescriptorsByNamespace_args args = new getTableDescriptorsByNamespace_args(); + args.setName(name); + sendBase("getTableDescriptorsByNamespace", args); + } + + public List recv_getTableDescriptorsByNamespace() throws TIOError, org.apache.thrift.TException + { + getTableDescriptorsByNamespace_result result = new getTableDescriptorsByNamespace_result(); + receiveBase(result, "getTableDescriptorsByNamespace"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTableDescriptorsByNamespace failed: unknown result"); + } + + public List getTableNamesByPattern(String regex, boolean includeSysTables) throws TIOError, org.apache.thrift.TException + { + send_getTableNamesByPattern(regex, includeSysTables); + return recv_getTableNamesByPattern(); + } + + public void send_getTableNamesByPattern(String regex, boolean includeSysTables) throws org.apache.thrift.TException + { + getTableNamesByPattern_args args = new getTableNamesByPattern_args(); + args.setRegex(regex); + args.setIncludeSysTables(includeSysTables); + sendBase("getTableNamesByPattern", args); + } + + public List recv_getTableNamesByPattern() throws TIOError, org.apache.thrift.TException + { + getTableNamesByPattern_result result = new getTableNamesByPattern_result(); + receiveBase(result, "getTableNamesByPattern"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTableNamesByPattern failed: unknown result"); + } + + public List getTableNamesByNamespace(String name) throws TIOError, org.apache.thrift.TException + { + send_getTableNamesByNamespace(name); + return recv_getTableNamesByNamespace(); + } + + public void send_getTableNamesByNamespace(String name) throws org.apache.thrift.TException + { + getTableNamesByNamespace_args args = new getTableNamesByNamespace_args(); + args.setName(name); + sendBase("getTableNamesByNamespace", args); + } + + public List recv_getTableNamesByNamespace() throws TIOError, org.apache.thrift.TException + { + getTableNamesByNamespace_result result = new getTableNamesByNamespace_result(); + receiveBase(result, "getTableNamesByNamespace"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTableNamesByNamespace failed: unknown result"); + } + + public void createTable(TTableDescriptor desc, List splitKeys) throws TIOError, org.apache.thrift.TException + { + send_createTable(desc, splitKeys); + recv_createTable(); + } + + public void send_createTable(TTableDescriptor desc, List splitKeys) throws org.apache.thrift.TException + { + createTable_args args = new createTable_args(); + args.setDesc(desc); + args.setSplitKeys(splitKeys); + sendBase("createTable", args); + } + + public void recv_createTable() throws TIOError, org.apache.thrift.TException + { + createTable_result result = new createTable_result(); + receiveBase(result, "createTable"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void deleteTable(TTableName tableName) throws TIOError, org.apache.thrift.TException + { + send_deleteTable(tableName); + recv_deleteTable(); + } + + public void send_deleteTable(TTableName tableName) throws org.apache.thrift.TException + { + deleteTable_args args = new deleteTable_args(); + args.setTableName(tableName); + sendBase("deleteTable", args); + } + + public void recv_deleteTable() throws TIOError, org.apache.thrift.TException + { + deleteTable_result result = new deleteTable_result(); + receiveBase(result, "deleteTable"); + if (result.io != null) { + throw result.io; + } + return; + } + + public List deleteTableByPattern(String regex) throws TIOError, org.apache.thrift.TException + { + send_deleteTableByPattern(regex); + return recv_deleteTableByPattern(); + } + + public void send_deleteTableByPattern(String regex) throws org.apache.thrift.TException + { + deleteTableByPattern_args args = new deleteTableByPattern_args(); + args.setRegex(regex); + sendBase("deleteTableByPattern", args); + } + + public List recv_deleteTableByPattern() throws TIOError, org.apache.thrift.TException + { + deleteTableByPattern_result result = new deleteTableByPattern_result(); + receiveBase(result, "deleteTableByPattern"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteTableByPattern failed: unknown result"); + } + + public void truncateTable(TTableName tableName, boolean preserveSplits) throws TIOError, org.apache.thrift.TException + { + send_truncateTable(tableName, preserveSplits); + recv_truncateTable(); + } + + public void send_truncateTable(TTableName tableName, boolean preserveSplits) throws org.apache.thrift.TException + { + truncateTable_args args = new truncateTable_args(); + args.setTableName(tableName); + args.setPreserveSplits(preserveSplits); + sendBase("truncateTable", args); + } + + public void recv_truncateTable() throws TIOError, org.apache.thrift.TException + { + truncateTable_result result = new truncateTable_result(); + receiveBase(result, "truncateTable"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void enableTable(TTableName tableName) throws TIOError, org.apache.thrift.TException + { + send_enableTable(tableName); + recv_enableTable(); + } + + public void send_enableTable(TTableName tableName) throws org.apache.thrift.TException + { + enableTable_args args = new enableTable_args(); + args.setTableName(tableName); + sendBase("enableTable", args); + } + + public void recv_enableTable() throws TIOError, org.apache.thrift.TException + { + enableTable_result result = new enableTable_result(); + receiveBase(result, "enableTable"); + if (result.io != null) { + throw result.io; + } + return; + } + + public List enableTableByPattern(String regex) throws TIOError, org.apache.thrift.TException + { + send_enableTableByPattern(regex); + return recv_enableTableByPattern(); + } + + public void send_enableTableByPattern(String regex) throws org.apache.thrift.TException + { + enableTableByPattern_args args = new enableTableByPattern_args(); + args.setRegex(regex); + sendBase("enableTableByPattern", args); + } + + public List recv_enableTableByPattern() throws TIOError, org.apache.thrift.TException + { + enableTableByPattern_result result = new enableTableByPattern_result(); + receiveBase(result, "enableTableByPattern"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "enableTableByPattern failed: unknown result"); + } + + public void disableTable(TTableName tableName) throws TIOError, org.apache.thrift.TException + { + send_disableTable(tableName); + recv_disableTable(); + } + + public void send_disableTable(TTableName tableName) throws org.apache.thrift.TException + { + disableTable_args args = new disableTable_args(); + args.setTableName(tableName); + sendBase("disableTable", args); + } + + public void recv_disableTable() throws TIOError, org.apache.thrift.TException + { + disableTable_result result = new disableTable_result(); + receiveBase(result, "disableTable"); + if (result.io != null) { + throw result.io; + } + return; + } + + public List disableTableByPattern(String regex) throws TIOError, org.apache.thrift.TException + { + send_disableTableByPattern(regex); + return recv_disableTableByPattern(); + } + + public void send_disableTableByPattern(String regex) throws org.apache.thrift.TException + { + disableTableByPattern_args args = new disableTableByPattern_args(); + args.setRegex(regex); + sendBase("disableTableByPattern", args); + } + + public List recv_disableTableByPattern() throws TIOError, org.apache.thrift.TException + { + disableTableByPattern_result result = new disableTableByPattern_result(); + receiveBase(result, "disableTableByPattern"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "disableTableByPattern failed: unknown result"); + } + + public boolean isTableEnabled(TTableName tableName) throws TIOError, org.apache.thrift.TException + { + send_isTableEnabled(tableName); + return recv_isTableEnabled(); + } + + public void send_isTableEnabled(TTableName tableName) throws org.apache.thrift.TException + { + isTableEnabled_args args = new isTableEnabled_args(); + args.setTableName(tableName); + sendBase("isTableEnabled", args); + } + + public boolean recv_isTableEnabled() throws TIOError, org.apache.thrift.TException + { + isTableEnabled_result result = new isTableEnabled_result(); + receiveBase(result, "isTableEnabled"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isTableEnabled failed: unknown result"); + } + + public boolean isTableDisabled(TTableName tableName) throws TIOError, org.apache.thrift.TException + { + send_isTableDisabled(tableName); + return recv_isTableDisabled(); + } + + public void send_isTableDisabled(TTableName tableName) throws org.apache.thrift.TException + { + isTableDisabled_args args = new isTableDisabled_args(); + args.setTableName(tableName); + sendBase("isTableDisabled", args); + } + + public boolean recv_isTableDisabled() throws TIOError, org.apache.thrift.TException + { + isTableDisabled_result result = new isTableDisabled_result(); + receiveBase(result, "isTableDisabled"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isTableDisabled failed: unknown result"); + } + + public boolean isTableAvailable(TTableName tableName) throws TIOError, org.apache.thrift.TException + { + send_isTableAvailable(tableName); + return recv_isTableAvailable(); + } + + public void send_isTableAvailable(TTableName tableName) throws org.apache.thrift.TException + { + isTableAvailable_args args = new isTableAvailable_args(); + args.setTableName(tableName); + sendBase("isTableAvailable", args); + } + + public boolean recv_isTableAvailable() throws TIOError, org.apache.thrift.TException + { + isTableAvailable_result result = new isTableAvailable_result(); + receiveBase(result, "isTableAvailable"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isTableAvailable failed: unknown result"); + } + + public boolean isTableAvailableWithSplit(TTableName tableName, List splitKeys) throws TIOError, org.apache.thrift.TException + { + send_isTableAvailableWithSplit(tableName, splitKeys); + return recv_isTableAvailableWithSplit(); + } + + public void send_isTableAvailableWithSplit(TTableName tableName, List splitKeys) throws org.apache.thrift.TException + { + isTableAvailableWithSplit_args args = new isTableAvailableWithSplit_args(); + args.setTableName(tableName); + args.setSplitKeys(splitKeys); + sendBase("isTableAvailableWithSplit", args); + } + + public boolean recv_isTableAvailableWithSplit() throws TIOError, org.apache.thrift.TException + { + isTableAvailableWithSplit_result result = new isTableAvailableWithSplit_result(); + receiveBase(result, "isTableAvailableWithSplit"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isTableAvailableWithSplit failed: unknown result"); + } + + public void addColumnFamily(TTableName tableName, TColumnFamilyDescriptor column) throws TIOError, org.apache.thrift.TException + { + send_addColumnFamily(tableName, column); + recv_addColumnFamily(); + } + + public void send_addColumnFamily(TTableName tableName, TColumnFamilyDescriptor column) throws org.apache.thrift.TException + { + addColumnFamily_args args = new addColumnFamily_args(); + args.setTableName(tableName); + args.setColumn(column); + sendBase("addColumnFamily", args); + } + + public void recv_addColumnFamily() throws TIOError, org.apache.thrift.TException + { + addColumnFamily_result result = new addColumnFamily_result(); + receiveBase(result, "addColumnFamily"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void deleteColumnFamily(TTableName tableName, ByteBuffer column) throws TIOError, org.apache.thrift.TException + { + send_deleteColumnFamily(tableName, column); + recv_deleteColumnFamily(); + } + + public void send_deleteColumnFamily(TTableName tableName, ByteBuffer column) throws org.apache.thrift.TException + { + deleteColumnFamily_args args = new deleteColumnFamily_args(); + args.setTableName(tableName); + args.setColumn(column); + sendBase("deleteColumnFamily", args); + } + + public void recv_deleteColumnFamily() throws TIOError, org.apache.thrift.TException + { + deleteColumnFamily_result result = new deleteColumnFamily_result(); + receiveBase(result, "deleteColumnFamily"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void modifyColumnFamily(TTableName tableName, TColumnFamilyDescriptor column) throws TIOError, org.apache.thrift.TException + { + send_modifyColumnFamily(tableName, column); + recv_modifyColumnFamily(); + } + + public void send_modifyColumnFamily(TTableName tableName, TColumnFamilyDescriptor column) throws org.apache.thrift.TException + { + modifyColumnFamily_args args = new modifyColumnFamily_args(); + args.setTableName(tableName); + args.setColumn(column); + sendBase("modifyColumnFamily", args); + } + + public void recv_modifyColumnFamily() throws TIOError, org.apache.thrift.TException + { + modifyColumnFamily_result result = new modifyColumnFamily_result(); + receiveBase(result, "modifyColumnFamily"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void modifyTable(TTableDescriptor desc) throws TIOError, org.apache.thrift.TException + { + send_modifyTable(desc); + recv_modifyTable(); + } + + public void send_modifyTable(TTableDescriptor desc) throws org.apache.thrift.TException + { + modifyTable_args args = new modifyTable_args(); + args.setDesc(desc); + sendBase("modifyTable", args); + } + + public void recv_modifyTable() throws TIOError, org.apache.thrift.TException + { + modifyTable_result result = new modifyTable_result(); + receiveBase(result, "modifyTable"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void createNamespace(TNamespaceDescriptor namespaceDesc) throws TIOError, org.apache.thrift.TException + { + send_createNamespace(namespaceDesc); + recv_createNamespace(); + } + + public void send_createNamespace(TNamespaceDescriptor namespaceDesc) throws org.apache.thrift.TException + { + createNamespace_args args = new createNamespace_args(); + args.setNamespaceDesc(namespaceDesc); + sendBase("createNamespace", args); + } + + public void recv_createNamespace() throws TIOError, org.apache.thrift.TException + { + createNamespace_result result = new createNamespace_result(); + receiveBase(result, "createNamespace"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void modifyNamespace(TNamespaceDescriptor namespaceDesc) throws TIOError, org.apache.thrift.TException + { + send_modifyNamespace(namespaceDesc); + recv_modifyNamespace(); + } + + public void send_modifyNamespace(TNamespaceDescriptor namespaceDesc) throws org.apache.thrift.TException + { + modifyNamespace_args args = new modifyNamespace_args(); + args.setNamespaceDesc(namespaceDesc); + sendBase("modifyNamespace", args); + } + + public void recv_modifyNamespace() throws TIOError, org.apache.thrift.TException + { + modifyNamespace_result result = new modifyNamespace_result(); + receiveBase(result, "modifyNamespace"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void deleteNamespace(String name) throws TIOError, org.apache.thrift.TException + { + send_deleteNamespace(name); + recv_deleteNamespace(); + } + + public void send_deleteNamespace(String name) throws org.apache.thrift.TException + { + deleteNamespace_args args = new deleteNamespace_args(); + args.setName(name); + sendBase("deleteNamespace", args); + } + + public void recv_deleteNamespace() throws TIOError, org.apache.thrift.TException + { + deleteNamespace_result result = new deleteNamespace_result(); + receiveBase(result, "deleteNamespace"); + if (result.io != null) { + throw result.io; + } + return; + } + + public TNamespaceDescriptor getNamespaceDescriptor(String name) throws TIOError, org.apache.thrift.TException + { + send_getNamespaceDescriptor(name); + return recv_getNamespaceDescriptor(); + } + + public void send_getNamespaceDescriptor(String name) throws org.apache.thrift.TException + { + getNamespaceDescriptor_args args = new getNamespaceDescriptor_args(); + args.setName(name); + sendBase("getNamespaceDescriptor", args); + } + + public TNamespaceDescriptor recv_getNamespaceDescriptor() throws TIOError, org.apache.thrift.TException + { + getNamespaceDescriptor_result result = new getNamespaceDescriptor_result(); + receiveBase(result, "getNamespaceDescriptor"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNamespaceDescriptor failed: unknown result"); + } + + public List listNamespaceDescriptors() throws TIOError, org.apache.thrift.TException + { + send_listNamespaceDescriptors(); + return recv_listNamespaceDescriptors(); + } + + public void send_listNamespaceDescriptors() throws org.apache.thrift.TException + { + listNamespaceDescriptors_args args = new listNamespaceDescriptors_args(); + sendBase("listNamespaceDescriptors", args); + } + + public List recv_listNamespaceDescriptors() throws TIOError, org.apache.thrift.TException + { + listNamespaceDescriptors_result result = new listNamespaceDescriptors_result(); + receiveBase(result, "listNamespaceDescriptors"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listNamespaceDescriptors failed: unknown result"); + } + } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { @@ -1649,544 +2460,936 @@ public class THBaseService { } } - } - - public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); - public Processor(I iface) { - super(iface, getProcessMap(new HashMap>())); - } - - protected Processor(I iface, Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static Map> getProcessMap(Map> processMap) { - processMap.put("exists", new exists()); - processMap.put("existsAll", new existsAll()); - processMap.put("get", new get()); - processMap.put("getMultiple", new getMultiple()); - processMap.put("put", new put()); - processMap.put("checkAndPut", new checkAndPut()); - processMap.put("putMultiple", new putMultiple()); - processMap.put("deleteSingle", new deleteSingle()); - processMap.put("deleteMultiple", new deleteMultiple()); - processMap.put("checkAndDelete", new checkAndDelete()); - processMap.put("increment", new increment()); - processMap.put("append", new append()); - processMap.put("openScanner", new openScanner()); - processMap.put("getScannerRows", new getScannerRows()); - processMap.put("closeScanner", new closeScanner()); - processMap.put("mutateRow", new mutateRow()); - processMap.put("getScannerResults", new getScannerResults()); - processMap.put("getRegionLocation", new getRegionLocation()); - processMap.put("getAllRegionLocations", new getAllRegionLocations()); - processMap.put("checkAndMutate", new checkAndMutate()); - return processMap; + public void getTableDescriptor(TTableName table, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getTableDescriptor_call method_call = new getTableDescriptor_call(table, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class exists extends org.apache.thrift.ProcessFunction { - public exists() { - super("exists"); - } - - public exists_args getEmptyArgsInstance() { - return new exists_args(); + public static class getTableDescriptor_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableName table; + public getTableDescriptor_call(TTableName table, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.table = table; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTableDescriptor", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getTableDescriptor_args args = new getTableDescriptor_args(); + args.setTable(table); + args.write(prot); + prot.writeMessageEnd(); } - public exists_result getResult(I iface, exists_args args) throws org.apache.thrift.TException { - exists_result result = new exists_result(); - try { - result.success = iface.exists(args.table, args.tget); - result.setSuccessIsSet(true); - } catch (TIOError io) { - result.io = io; + public TTableDescriptor getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getTableDescriptor(); } } - public static class existsAll extends org.apache.thrift.ProcessFunction { - public existsAll() { - super("existsAll"); - } + public void getTableDescriptors(List tables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getTableDescriptors_call method_call = new getTableDescriptors_call(tables, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public existsAll_args getEmptyArgsInstance() { - return new existsAll_args(); + public static class getTableDescriptors_call extends org.apache.thrift.async.TAsyncMethodCall { + private List tables; + public getTableDescriptors_call(List tables, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tables = tables; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTableDescriptors", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getTableDescriptors_args args = new getTableDescriptors_args(); + args.setTables(tables); + args.write(prot); + prot.writeMessageEnd(); } - public existsAll_result getResult(I iface, existsAll_args args) throws org.apache.thrift.TException { - existsAll_result result = new existsAll_result(); - try { - result.success = iface.existsAll(args.table, args.tgets); - } catch (TIOError io) { - result.io = io; + public List getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getTableDescriptors(); } } - public static class get extends org.apache.thrift.ProcessFunction { - public get() { - super("get"); - } + public void tableExists(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + tableExists_call method_call = new tableExists_call(tableName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public get_args getEmptyArgsInstance() { - return new get_args(); + public static class tableExists_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableName tableName; + public tableExists_call(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("tableExists", org.apache.thrift.protocol.TMessageType.CALL, 0)); + tableExists_args args = new tableExists_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); } - public get_result getResult(I iface, get_args args) throws org.apache.thrift.TException { - get_result result = new get_result(); - try { - result.success = iface.get(args.table, args.tget); - } catch (TIOError io) { - result.io = io; + public boolean getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_tableExists(); } } - public static class getMultiple extends org.apache.thrift.ProcessFunction { - public getMultiple() { - super("getMultiple"); - } + public void getTableDescriptorsByPattern(String regex, boolean includeSysTables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getTableDescriptorsByPattern_call method_call = new getTableDescriptorsByPattern_call(regex, includeSysTables, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public getMultiple_args getEmptyArgsInstance() { - return new getMultiple_args(); + public static class getTableDescriptorsByPattern_call extends org.apache.thrift.async.TAsyncMethodCall { + private String regex; + private boolean includeSysTables; + public getTableDescriptorsByPattern_call(String regex, boolean includeSysTables, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.regex = regex; + this.includeSysTables = includeSysTables; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTableDescriptorsByPattern", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getTableDescriptorsByPattern_args args = new getTableDescriptorsByPattern_args(); + args.setRegex(regex); + args.setIncludeSysTables(includeSysTables); + args.write(prot); + prot.writeMessageEnd(); } - public getMultiple_result getResult(I iface, getMultiple_args args) throws org.apache.thrift.TException { - getMultiple_result result = new getMultiple_result(); - try { - result.success = iface.getMultiple(args.table, args.tgets); - } catch (TIOError io) { - result.io = io; + public List getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getTableDescriptorsByPattern(); } } - public static class put extends org.apache.thrift.ProcessFunction { - public put() { - super("put"); - } + public void getTableDescriptorsByNamespace(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getTableDescriptorsByNamespace_call method_call = new getTableDescriptorsByNamespace_call(name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public put_args getEmptyArgsInstance() { - return new put_args(); + public static class getTableDescriptorsByNamespace_call extends org.apache.thrift.async.TAsyncMethodCall { + private String name; + public getTableDescriptorsByNamespace_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTableDescriptorsByNamespace", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getTableDescriptorsByNamespace_args args = new getTableDescriptorsByNamespace_args(); + args.setName(name); + args.write(prot); + prot.writeMessageEnd(); } - public put_result getResult(I iface, put_args args) throws org.apache.thrift.TException { - put_result result = new put_result(); - try { - iface.put(args.table, args.tput); - } catch (TIOError io) { - result.io = io; + public List getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getTableDescriptorsByNamespace(); } } - public static class checkAndPut extends org.apache.thrift.ProcessFunction { - public checkAndPut() { - super("checkAndPut"); - } + public void getTableNamesByPattern(String regex, boolean includeSysTables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getTableNamesByPattern_call method_call = new getTableNamesByPattern_call(regex, includeSysTables, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public checkAndPut_args getEmptyArgsInstance() { - return new checkAndPut_args(); + public static class getTableNamesByPattern_call extends org.apache.thrift.async.TAsyncMethodCall { + private String regex; + private boolean includeSysTables; + public getTableNamesByPattern_call(String regex, boolean includeSysTables, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.regex = regex; + this.includeSysTables = includeSysTables; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTableNamesByPattern", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getTableNamesByPattern_args args = new getTableNamesByPattern_args(); + args.setRegex(regex); + args.setIncludeSysTables(includeSysTables); + args.write(prot); + prot.writeMessageEnd(); } - public checkAndPut_result getResult(I iface, checkAndPut_args args) throws org.apache.thrift.TException { - checkAndPut_result result = new checkAndPut_result(); - try { - result.success = iface.checkAndPut(args.table, args.row, args.family, args.qualifier, args.value, args.tput); - result.setSuccessIsSet(true); - } catch (TIOError io) { - result.io = io; + public List getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getTableNamesByPattern(); } } - public static class putMultiple extends org.apache.thrift.ProcessFunction { - public putMultiple() { - super("putMultiple"); - } + public void getTableNamesByNamespace(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getTableNamesByNamespace_call method_call = new getTableNamesByNamespace_call(name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public putMultiple_args getEmptyArgsInstance() { - return new putMultiple_args(); + public static class getTableNamesByNamespace_call extends org.apache.thrift.async.TAsyncMethodCall { + private String name; + public getTableNamesByNamespace_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTableNamesByNamespace", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getTableNamesByNamespace_args args = new getTableNamesByNamespace_args(); + args.setName(name); + args.write(prot); + prot.writeMessageEnd(); } - public putMultiple_result getResult(I iface, putMultiple_args args) throws org.apache.thrift.TException { - putMultiple_result result = new putMultiple_result(); - try { - iface.putMultiple(args.table, args.tputs); - } catch (TIOError io) { - result.io = io; + public List getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getTableNamesByNamespace(); } } - public static class deleteSingle extends org.apache.thrift.ProcessFunction { - public deleteSingle() { - super("deleteSingle"); - } + public void createTable(TTableDescriptor desc, List splitKeys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + createTable_call method_call = new createTable_call(desc, splitKeys, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public deleteSingle_args getEmptyArgsInstance() { - return new deleteSingle_args(); + public static class createTable_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableDescriptor desc; + private List splitKeys; + public createTable_call(TTableDescriptor desc, List splitKeys, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.desc = desc; + this.splitKeys = splitKeys; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createTable", org.apache.thrift.protocol.TMessageType.CALL, 0)); + createTable_args args = new createTable_args(); + args.setDesc(desc); + args.setSplitKeys(splitKeys); + args.write(prot); + prot.writeMessageEnd(); } - public deleteSingle_result getResult(I iface, deleteSingle_args args) throws org.apache.thrift.TException { - deleteSingle_result result = new deleteSingle_result(); - try { - iface.deleteSingle(args.table, args.tdelete); - } catch (TIOError io) { - result.io = io; + public void getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_createTable(); } } - public static class deleteMultiple extends org.apache.thrift.ProcessFunction { - public deleteMultiple() { - super("deleteMultiple"); - } + public void deleteTable(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteTable_call method_call = new deleteTable_call(tableName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public deleteMultiple_args getEmptyArgsInstance() { - return new deleteMultiple_args(); + public static class deleteTable_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableName tableName; + public deleteTable_call(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteTable", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteTable_args args = new deleteTable_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); } - public deleteMultiple_result getResult(I iface, deleteMultiple_args args) throws org.apache.thrift.TException { - deleteMultiple_result result = new deleteMultiple_result(); - try { - result.success = iface.deleteMultiple(args.table, args.tdeletes); - } catch (TIOError io) { - result.io = io; + public void getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_deleteTable(); } } - public static class checkAndDelete extends org.apache.thrift.ProcessFunction { - public checkAndDelete() { - super("checkAndDelete"); - } + public void deleteTableByPattern(String regex, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteTableByPattern_call method_call = new deleteTableByPattern_call(regex, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public checkAndDelete_args getEmptyArgsInstance() { - return new checkAndDelete_args(); + public static class deleteTableByPattern_call extends org.apache.thrift.async.TAsyncMethodCall { + private String regex; + public deleteTableByPattern_call(String regex, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.regex = regex; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteTableByPattern", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteTableByPattern_args args = new deleteTableByPattern_args(); + args.setRegex(regex); + args.write(prot); + prot.writeMessageEnd(); } - public checkAndDelete_result getResult(I iface, checkAndDelete_args args) throws org.apache.thrift.TException { - checkAndDelete_result result = new checkAndDelete_result(); - try { - result.success = iface.checkAndDelete(args.table, args.row, args.family, args.qualifier, args.value, args.tdelete); - result.setSuccessIsSet(true); - } catch (TIOError io) { - result.io = io; + public List getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_deleteTableByPattern(); } } - public static class increment extends org.apache.thrift.ProcessFunction { - public increment() { - super("increment"); - } + public void truncateTable(TTableName tableName, boolean preserveSplits, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + truncateTable_call method_call = new truncateTable_call(tableName, preserveSplits, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public increment_args getEmptyArgsInstance() { - return new increment_args(); + public static class truncateTable_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableName tableName; + private boolean preserveSplits; + public truncateTable_call(TTableName tableName, boolean preserveSplits, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.preserveSplits = preserveSplits; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("truncateTable", org.apache.thrift.protocol.TMessageType.CALL, 0)); + truncateTable_args args = new truncateTable_args(); + args.setTableName(tableName); + args.setPreserveSplits(preserveSplits); + args.write(prot); + prot.writeMessageEnd(); } - public increment_result getResult(I iface, increment_args args) throws org.apache.thrift.TException { - increment_result result = new increment_result(); - try { - result.success = iface.increment(args.table, args.tincrement); - } catch (TIOError io) { - result.io = io; + public void getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_truncateTable(); } } - public static class append extends org.apache.thrift.ProcessFunction { - public append() { - super("append"); - } + public void enableTable(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + enableTable_call method_call = new enableTable_call(tableName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public append_args getEmptyArgsInstance() { - return new append_args(); + public static class enableTable_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableName tableName; + public enableTable_call(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("enableTable", org.apache.thrift.protocol.TMessageType.CALL, 0)); + enableTable_args args = new enableTable_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); } - public append_result getResult(I iface, append_args args) throws org.apache.thrift.TException { - append_result result = new append_result(); - try { - result.success = iface.append(args.table, args.tappend); - } catch (TIOError io) { - result.io = io; + public void getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_enableTable(); } } - public static class openScanner extends org.apache.thrift.ProcessFunction { - public openScanner() { - super("openScanner"); - } + public void enableTableByPattern(String regex, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + enableTableByPattern_call method_call = new enableTableByPattern_call(regex, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public openScanner_args getEmptyArgsInstance() { - return new openScanner_args(); + public static class enableTableByPattern_call extends org.apache.thrift.async.TAsyncMethodCall { + private String regex; + public enableTableByPattern_call(String regex, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.regex = regex; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("enableTableByPattern", org.apache.thrift.protocol.TMessageType.CALL, 0)); + enableTableByPattern_args args = new enableTableByPattern_args(); + args.setRegex(regex); + args.write(prot); + prot.writeMessageEnd(); } - public openScanner_result getResult(I iface, openScanner_args args) throws org.apache.thrift.TException { - openScanner_result result = new openScanner_result(); - try { - result.success = iface.openScanner(args.table, args.tscan); - result.setSuccessIsSet(true); - } catch (TIOError io) { - result.io = io; + public List getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_enableTableByPattern(); } } - public static class getScannerRows extends org.apache.thrift.ProcessFunction { - public getScannerRows() { - super("getScannerRows"); - } + public void disableTable(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + disableTable_call method_call = new disableTable_call(tableName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public getScannerRows_args getEmptyArgsInstance() { - return new getScannerRows_args(); + public static class disableTable_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableName tableName; + public disableTable_call(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("disableTable", org.apache.thrift.protocol.TMessageType.CALL, 0)); + disableTable_args args = new disableTable_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); } - public getScannerRows_result getResult(I iface, getScannerRows_args args) throws org.apache.thrift.TException { - getScannerRows_result result = new getScannerRows_result(); - try { - result.success = iface.getScannerRows(args.scannerId, args.numRows); - } catch (TIOError io) { - result.io = io; - } catch (TIllegalArgument ia) { - result.ia = ia; + public void getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_disableTable(); } } - public static class closeScanner extends org.apache.thrift.ProcessFunction { - public closeScanner() { - super("closeScanner"); - } + public void disableTableByPattern(String regex, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + disableTableByPattern_call method_call = new disableTableByPattern_call(regex, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public closeScanner_args getEmptyArgsInstance() { - return new closeScanner_args(); + public static class disableTableByPattern_call extends org.apache.thrift.async.TAsyncMethodCall { + private String regex; + public disableTableByPattern_call(String regex, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.regex = regex; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("disableTableByPattern", org.apache.thrift.protocol.TMessageType.CALL, 0)); + disableTableByPattern_args args = new disableTableByPattern_args(); + args.setRegex(regex); + args.write(prot); + prot.writeMessageEnd(); } - public closeScanner_result getResult(I iface, closeScanner_args args) throws org.apache.thrift.TException { - closeScanner_result result = new closeScanner_result(); - try { - iface.closeScanner(args.scannerId); - } catch (TIOError io) { - result.io = io; - } catch (TIllegalArgument ia) { - result.ia = ia; + public List getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_disableTableByPattern(); } } - public static class mutateRow extends org.apache.thrift.ProcessFunction { - public mutateRow() { - super("mutateRow"); - } + public void isTableEnabled(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + isTableEnabled_call method_call = new isTableEnabled_call(tableName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public mutateRow_args getEmptyArgsInstance() { - return new mutateRow_args(); + public static class isTableEnabled_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableName tableName; + public isTableEnabled_call(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isTableEnabled", org.apache.thrift.protocol.TMessageType.CALL, 0)); + isTableEnabled_args args = new isTableEnabled_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); } - public mutateRow_result getResult(I iface, mutateRow_args args) throws org.apache.thrift.TException { - mutateRow_result result = new mutateRow_result(); - try { - iface.mutateRow(args.table, args.trowMutations); - } catch (TIOError io) { - result.io = io; + public boolean getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_isTableEnabled(); } } - public static class getScannerResults extends org.apache.thrift.ProcessFunction { - public getScannerResults() { - super("getScannerResults"); - } + public void isTableDisabled(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + isTableDisabled_call method_call = new isTableDisabled_call(tableName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } - public getScannerResults_args getEmptyArgsInstance() { - return new getScannerResults_args(); + public static class isTableDisabled_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableName tableName; + public isTableDisabled_call(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; } - protected boolean isOneway() { - return false; + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isTableDisabled", org.apache.thrift.protocol.TMessageType.CALL, 0)); + isTableDisabled_args args = new isTableDisabled_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); } - public getScannerResults_result getResult(I iface, getScannerResults_args args) throws org.apache.thrift.TException { - getScannerResults_result result = new getScannerResults_result(); - try { - result.success = iface.getScannerResults(args.table, args.tscan, args.numRows); - } catch (TIOError io) { - result.io = io; + public boolean getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_isTableDisabled(); } } - public static class getRegionLocation extends org.apache.thrift.ProcessFunction { - public getRegionLocation() { - super("getRegionLocation"); + public void isTableAvailable(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + isTableAvailable_call method_call = new isTableAvailable_call(tableName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class isTableAvailable_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableName tableName; + public isTableAvailable_call(TTableName tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; } - public getRegionLocation_args getEmptyArgsInstance() { - return new getRegionLocation_args(); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isTableAvailable", org.apache.thrift.protocol.TMessageType.CALL, 0)); + isTableAvailable_args args = new isTableAvailable_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); } - protected boolean isOneway() { - return false; + public boolean getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_isTableAvailable(); } + } - public getRegionLocation_result getResult(I iface, getRegionLocation_args args) throws org.apache.thrift.TException { - getRegionLocation_result result = new getRegionLocation_result(); - try { - result.success = iface.getRegionLocation(args.table, args.row, args.reload); - } catch (TIOError io) { - result.io = io; + public void isTableAvailableWithSplit(TTableName tableName, List splitKeys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + isTableAvailableWithSplit_call method_call = new isTableAvailableWithSplit_call(tableName, splitKeys, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class isTableAvailableWithSplit_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableName tableName; + private List splitKeys; + public isTableAvailableWithSplit_call(TTableName tableName, List splitKeys, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.splitKeys = splitKeys; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isTableAvailableWithSplit", org.apache.thrift.protocol.TMessageType.CALL, 0)); + isTableAvailableWithSplit_args args = new isTableAvailableWithSplit_args(); + args.setTableName(tableName); + args.setSplitKeys(splitKeys); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_isTableAvailableWithSplit(); } } - public static class getAllRegionLocations extends org.apache.thrift.ProcessFunction { - public getAllRegionLocations() { - super("getAllRegionLocations"); + public void addColumnFamily(TTableName tableName, TColumnFamilyDescriptor column, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + addColumnFamily_call method_call = new addColumnFamily_call(tableName, column, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class addColumnFamily_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableName tableName; + private TColumnFamilyDescriptor column; + public addColumnFamily_call(TTableName tableName, TColumnFamilyDescriptor column, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.column = column; } - public getAllRegionLocations_args getEmptyArgsInstance() { - return new getAllRegionLocations_args(); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addColumnFamily", org.apache.thrift.protocol.TMessageType.CALL, 0)); + addColumnFamily_args args = new addColumnFamily_args(); + args.setTableName(tableName); + args.setColumn(column); + args.write(prot); + prot.writeMessageEnd(); } - protected boolean isOneway() { - return false; + public void getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_addColumnFamily(); } + } - public getAllRegionLocations_result getResult(I iface, getAllRegionLocations_args args) throws org.apache.thrift.TException { - getAllRegionLocations_result result = new getAllRegionLocations_result(); - try { - result.success = iface.getAllRegionLocations(args.table); - } catch (TIOError io) { - result.io = io; + public void deleteColumnFamily(TTableName tableName, ByteBuffer column, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteColumnFamily_call method_call = new deleteColumnFamily_call(tableName, column, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteColumnFamily_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableName tableName; + private ByteBuffer column; + public deleteColumnFamily_call(TTableName tableName, ByteBuffer column, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.column = column; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteColumnFamily", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteColumnFamily_args args = new deleteColumnFamily_args(); + args.setTableName(tableName); + args.setColumn(column); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_deleteColumnFamily(); } } - public static class checkAndMutate extends org.apache.thrift.ProcessFunction { - public checkAndMutate() { - super("checkAndMutate"); + public void modifyColumnFamily(TTableName tableName, TColumnFamilyDescriptor column, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + modifyColumnFamily_call method_call = new modifyColumnFamily_call(tableName, column, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class modifyColumnFamily_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableName tableName; + private TColumnFamilyDescriptor column; + public modifyColumnFamily_call(TTableName tableName, TColumnFamilyDescriptor column, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.column = column; } - public checkAndMutate_args getEmptyArgsInstance() { - return new checkAndMutate_args(); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("modifyColumnFamily", org.apache.thrift.protocol.TMessageType.CALL, 0)); + modifyColumnFamily_args args = new modifyColumnFamily_args(); + args.setTableName(tableName); + args.setColumn(column); + args.write(prot); + prot.writeMessageEnd(); } - protected boolean isOneway() { - return false; + public void getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_modifyColumnFamily(); } + } - public checkAndMutate_result getResult(I iface, checkAndMutate_args args) throws org.apache.thrift.TException { - checkAndMutate_result result = new checkAndMutate_result(); - try { - result.success = iface.checkAndMutate(args.table, args.row, args.family, args.qualifier, args.compareOp, args.value, args.rowMutations); - result.setSuccessIsSet(true); - } catch (TIOError io) { - result.io = io; + public void modifyTable(TTableDescriptor desc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + modifyTable_call method_call = new modifyTable_call(desc, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class modifyTable_call extends org.apache.thrift.async.TAsyncMethodCall { + private TTableDescriptor desc; + public modifyTable_call(TTableDescriptor desc, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.desc = desc; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("modifyTable", org.apache.thrift.protocol.TMessageType.CALL, 0)); + modifyTable_args args = new modifyTable_args(); + args.setDesc(desc); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - return result; + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_modifyTable(); + } + } + + public void createNamespace(TNamespaceDescriptor namespaceDesc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + createNamespace_call method_call = new createNamespace_call(namespaceDesc, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class createNamespace_call extends org.apache.thrift.async.TAsyncMethodCall { + private TNamespaceDescriptor namespaceDesc; + public createNamespace_call(TNamespaceDescriptor namespaceDesc, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.namespaceDesc = namespaceDesc; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createNamespace", org.apache.thrift.protocol.TMessageType.CALL, 0)); + createNamespace_args args = new createNamespace_args(); + args.setNamespaceDesc(namespaceDesc); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_createNamespace(); + } + } + + public void modifyNamespace(TNamespaceDescriptor namespaceDesc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + modifyNamespace_call method_call = new modifyNamespace_call(namespaceDesc, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class modifyNamespace_call extends org.apache.thrift.async.TAsyncMethodCall { + private TNamespaceDescriptor namespaceDesc; + public modifyNamespace_call(TNamespaceDescriptor namespaceDesc, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.namespaceDesc = namespaceDesc; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("modifyNamespace", org.apache.thrift.protocol.TMessageType.CALL, 0)); + modifyNamespace_args args = new modifyNamespace_args(); + args.setNamespaceDesc(namespaceDesc); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_modifyNamespace(); + } + } + + public void deleteNamespace(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteNamespace_call method_call = new deleteNamespace_call(name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteNamespace_call extends org.apache.thrift.async.TAsyncMethodCall { + private String name; + public deleteNamespace_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteNamespace", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteNamespace_args args = new deleteNamespace_args(); + args.setName(name); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_deleteNamespace(); + } + } + + public void getNamespaceDescriptor(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getNamespaceDescriptor_call method_call = new getNamespaceDescriptor_call(name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getNamespaceDescriptor_call extends org.apache.thrift.async.TAsyncMethodCall { + private String name; + public getNamespaceDescriptor_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNamespaceDescriptor", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getNamespaceDescriptor_args args = new getNamespaceDescriptor_args(); + args.setName(name); + args.write(prot); + prot.writeMessageEnd(); + } + + public TNamespaceDescriptor getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getNamespaceDescriptor(); + } + } + + public void listNamespaceDescriptors(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + listNamespaceDescriptors_call method_call = new listNamespaceDescriptors_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class listNamespaceDescriptors_call extends org.apache.thrift.async.TAsyncMethodCall { + public listNamespaceDescriptors_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listNamespaceDescriptors", org.apache.thrift.protocol.TMessageType.CALL, 0)); + listNamespaceDescriptors_args args = new listNamespaceDescriptors_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws TIOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_listNamespaceDescriptors(); } } } - public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); - public AsyncProcessor(I iface) { - super(iface, getProcessMap(new HashMap>())); + public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); + public Processor(I iface) { + super(iface, getProcessMap(new HashMap>())); } - protected AsyncProcessor(I iface, Map> processMap) { + protected Processor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } - private static Map> getProcessMap(Map> processMap) { + private static Map> getProcessMap(Map> processMap) { processMap.put("exists", new exists()); processMap.put("existsAll", new existsAll()); processMap.put("get", new get()); @@ -2207,10 +3410,38 @@ public class THBaseService { processMap.put("getRegionLocation", new getRegionLocation()); processMap.put("getAllRegionLocations", new getAllRegionLocations()); processMap.put("checkAndMutate", new checkAndMutate()); + processMap.put("getTableDescriptor", new getTableDescriptor()); + processMap.put("getTableDescriptors", new getTableDescriptors()); + processMap.put("tableExists", new tableExists()); + processMap.put("getTableDescriptorsByPattern", new getTableDescriptorsByPattern()); + processMap.put("getTableDescriptorsByNamespace", new getTableDescriptorsByNamespace()); + processMap.put("getTableNamesByPattern", new getTableNamesByPattern()); + processMap.put("getTableNamesByNamespace", new getTableNamesByNamespace()); + processMap.put("createTable", new createTable()); + processMap.put("deleteTable", new deleteTable()); + processMap.put("deleteTableByPattern", new deleteTableByPattern()); + processMap.put("truncateTable", new truncateTable()); + processMap.put("enableTable", new enableTable()); + processMap.put("enableTableByPattern", new enableTableByPattern()); + processMap.put("disableTable", new disableTable()); + processMap.put("disableTableByPattern", new disableTableByPattern()); + processMap.put("isTableEnabled", new isTableEnabled()); + processMap.put("isTableDisabled", new isTableDisabled()); + processMap.put("isTableAvailable", new isTableAvailable()); + processMap.put("isTableAvailableWithSplit", new isTableAvailableWithSplit()); + processMap.put("addColumnFamily", new addColumnFamily()); + processMap.put("deleteColumnFamily", new deleteColumnFamily()); + processMap.put("modifyColumnFamily", new modifyColumnFamily()); + processMap.put("modifyTable", new modifyTable()); + processMap.put("createNamespace", new createNamespace()); + processMap.put("modifyNamespace", new modifyNamespace()); + processMap.put("deleteNamespace", new deleteNamespace()); + processMap.put("getNamespaceDescriptor", new getNamespaceDescriptor()); + processMap.put("listNamespaceDescriptors", new listNamespaceDescriptors()); return processMap; } - public static class exists extends org.apache.thrift.AsyncProcessFunction { + public static class exists extends org.apache.thrift.ProcessFunction { public exists() { super("exists"); } @@ -2219,56 +3450,23 @@ public class THBaseService { return new exists_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - exists_result result = new exists_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - exists_result result = new exists_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, exists_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.exists(args.table, args.tget,resultHandler); + public exists_result getResult(I iface, exists_args args) throws org.apache.thrift.TException { + exists_result result = new exists_result(); + try { + result.success = iface.exists(args.table, args.tget); + result.setSuccessIsSet(true); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class existsAll extends org.apache.thrift.AsyncProcessFunction> { + public static class existsAll extends org.apache.thrift.ProcessFunction { public existsAll() { super("existsAll"); } @@ -2277,55 +3475,22 @@ public class THBaseService { return new existsAll_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - existsAll_result result = new existsAll_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - existsAll_result result = new existsAll_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, existsAll_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.existsAll(args.table, args.tgets,resultHandler); + public existsAll_result getResult(I iface, existsAll_args args) throws org.apache.thrift.TException { + existsAll_result result = new existsAll_result(); + try { + result.success = iface.existsAll(args.table, args.tgets); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class get extends org.apache.thrift.AsyncProcessFunction { + public static class get extends org.apache.thrift.ProcessFunction { public get() { super("get"); } @@ -2334,55 +3499,22 @@ public class THBaseService { return new get_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TResult o) { - get_result result = new get_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_result result = new get_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, get_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get(args.table, args.tget,resultHandler); + public get_result getResult(I iface, get_args args) throws org.apache.thrift.TException { + get_result result = new get_result(); + try { + result.success = iface.get(args.table, args.tget); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class getMultiple extends org.apache.thrift.AsyncProcessFunction> { + public static class getMultiple extends org.apache.thrift.ProcessFunction { public getMultiple() { super("getMultiple"); } @@ -2391,55 +3523,22 @@ public class THBaseService { return new getMultiple_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getMultiple_result result = new getMultiple_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getMultiple_result result = new getMultiple_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, getMultiple_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.getMultiple(args.table, args.tgets,resultHandler); + public getMultiple_result getResult(I iface, getMultiple_args args) throws org.apache.thrift.TException { + getMultiple_result result = new getMultiple_result(); + try { + result.success = iface.getMultiple(args.table, args.tgets); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class put extends org.apache.thrift.AsyncProcessFunction { + public static class put extends org.apache.thrift.ProcessFunction { public put() { super("put"); } @@ -2448,54 +3547,22 @@ public class THBaseService { return new put_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - put_result result = new put_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - put_result result = new put_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, put_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.put(args.table, args.tput,resultHandler); + public put_result getResult(I iface, put_args args) throws org.apache.thrift.TException { + put_result result = new put_result(); + try { + iface.put(args.table, args.tput); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class checkAndPut extends org.apache.thrift.AsyncProcessFunction { + public static class checkAndPut extends org.apache.thrift.ProcessFunction { public checkAndPut() { super("checkAndPut"); } @@ -2504,56 +3571,23 @@ public class THBaseService { return new checkAndPut_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - checkAndPut_result result = new checkAndPut_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - checkAndPut_result result = new checkAndPut_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, checkAndPut_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.checkAndPut(args.table, args.row, args.family, args.qualifier, args.value, args.tput,resultHandler); + public checkAndPut_result getResult(I iface, checkAndPut_args args) throws org.apache.thrift.TException { + checkAndPut_result result = new checkAndPut_result(); + try { + result.success = iface.checkAndPut(args.table, args.row, args.family, args.qualifier, args.value, args.tput); + result.setSuccessIsSet(true); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class putMultiple extends org.apache.thrift.AsyncProcessFunction { + public static class putMultiple extends org.apache.thrift.ProcessFunction { public putMultiple() { super("putMultiple"); } @@ -2562,54 +3596,22 @@ public class THBaseService { return new putMultiple_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - putMultiple_result result = new putMultiple_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - putMultiple_result result = new putMultiple_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, putMultiple_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.putMultiple(args.table, args.tputs,resultHandler); + public putMultiple_result getResult(I iface, putMultiple_args args) throws org.apache.thrift.TException { + putMultiple_result result = new putMultiple_result(); + try { + iface.putMultiple(args.table, args.tputs); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class deleteSingle extends org.apache.thrift.AsyncProcessFunction { + public static class deleteSingle extends org.apache.thrift.ProcessFunction { public deleteSingle() { super("deleteSingle"); } @@ -2618,54 +3620,22 @@ public class THBaseService { return new deleteSingle_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - deleteSingle_result result = new deleteSingle_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - deleteSingle_result result = new deleteSingle_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, deleteSingle_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.deleteSingle(args.table, args.tdelete,resultHandler); + public deleteSingle_result getResult(I iface, deleteSingle_args args) throws org.apache.thrift.TException { + deleteSingle_result result = new deleteSingle_result(); + try { + iface.deleteSingle(args.table, args.tdelete); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class deleteMultiple extends org.apache.thrift.AsyncProcessFunction> { + public static class deleteMultiple extends org.apache.thrift.ProcessFunction { public deleteMultiple() { super("deleteMultiple"); } @@ -2674,55 +3644,22 @@ public class THBaseService { return new deleteMultiple_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - deleteMultiple_result result = new deleteMultiple_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - deleteMultiple_result result = new deleteMultiple_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, deleteMultiple_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.deleteMultiple(args.table, args.tdeletes,resultHandler); + public deleteMultiple_result getResult(I iface, deleteMultiple_args args) throws org.apache.thrift.TException { + deleteMultiple_result result = new deleteMultiple_result(); + try { + result.success = iface.deleteMultiple(args.table, args.tdeletes); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class checkAndDelete extends org.apache.thrift.AsyncProcessFunction { + public static class checkAndDelete extends org.apache.thrift.ProcessFunction { public checkAndDelete() { super("checkAndDelete"); } @@ -2731,56 +3668,23 @@ public class THBaseService { return new checkAndDelete_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - checkAndDelete_result result = new checkAndDelete_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - checkAndDelete_result result = new checkAndDelete_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, checkAndDelete_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.checkAndDelete(args.table, args.row, args.family, args.qualifier, args.value, args.tdelete,resultHandler); + public checkAndDelete_result getResult(I iface, checkAndDelete_args args) throws org.apache.thrift.TException { + checkAndDelete_result result = new checkAndDelete_result(); + try { + result.success = iface.checkAndDelete(args.table, args.row, args.family, args.qualifier, args.value, args.tdelete); + result.setSuccessIsSet(true); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class increment extends org.apache.thrift.AsyncProcessFunction { + public static class increment extends org.apache.thrift.ProcessFunction { public increment() { super("increment"); } @@ -2789,55 +3693,22 @@ public class THBaseService { return new increment_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TResult o) { - increment_result result = new increment_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - increment_result result = new increment_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, increment_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.increment(args.table, args.tincrement,resultHandler); + public increment_result getResult(I iface, increment_args args) throws org.apache.thrift.TException { + increment_result result = new increment_result(); + try { + result.success = iface.increment(args.table, args.tincrement); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class append extends org.apache.thrift.AsyncProcessFunction { + public static class append extends org.apache.thrift.ProcessFunction { public append() { super("append"); } @@ -2846,55 +3717,22 @@ public class THBaseService { return new append_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TResult o) { - append_result result = new append_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - append_result result = new append_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, append_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.append(args.table, args.tappend,resultHandler); + public append_result getResult(I iface, append_args args) throws org.apache.thrift.TException { + append_result result = new append_result(); + try { + result.success = iface.append(args.table, args.tappend); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class openScanner extends org.apache.thrift.AsyncProcessFunction { + public static class openScanner extends org.apache.thrift.ProcessFunction { public openScanner() { super("openScanner"); } @@ -2903,56 +3741,23 @@ public class THBaseService { return new openScanner_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Integer o) { - openScanner_result result = new openScanner_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - openScanner_result result = new openScanner_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, openScanner_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.openScanner(args.table, args.tscan,resultHandler); + public openScanner_result getResult(I iface, openScanner_args args) throws org.apache.thrift.TException { + openScanner_result result = new openScanner_result(); + try { + result.success = iface.openScanner(args.table, args.tscan); + result.setSuccessIsSet(true); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class getScannerRows extends org.apache.thrift.AsyncProcessFunction> { + public static class getScannerRows extends org.apache.thrift.ProcessFunction { public getScannerRows() { super("getScannerRows"); } @@ -2961,60 +3766,24 @@ public class THBaseService { return new getScannerRows_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getScannerRows_result result = new getScannerRows_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getScannerRows_result result = new getScannerRows_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else if (e instanceof TIllegalArgument) { - result.ia = (TIllegalArgument) e; - result.setIaIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, getScannerRows_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.getScannerRows(args.scannerId, args.numRows,resultHandler); + public getScannerRows_result getResult(I iface, getScannerRows_args args) throws org.apache.thrift.TException { + getScannerRows_result result = new getScannerRows_result(); + try { + result.success = iface.getScannerRows(args.scannerId, args.numRows); + } catch (TIOError io) { + result.io = io; + } catch (TIllegalArgument ia) { + result.ia = ia; + } + return result; } } - public static class closeScanner extends org.apache.thrift.AsyncProcessFunction { + public static class closeScanner extends org.apache.thrift.ProcessFunction { public closeScanner() { super("closeScanner"); } @@ -3023,59 +3792,24 @@ public class THBaseService { return new closeScanner_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - closeScanner_result result = new closeScanner_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - closeScanner_result result = new closeScanner_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else if (e instanceof TIllegalArgument) { - result.ia = (TIllegalArgument) e; - result.setIaIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, closeScanner_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.closeScanner(args.scannerId,resultHandler); + public closeScanner_result getResult(I iface, closeScanner_args args) throws org.apache.thrift.TException { + closeScanner_result result = new closeScanner_result(); + try { + iface.closeScanner(args.scannerId); + } catch (TIOError io) { + result.io = io; + } catch (TIllegalArgument ia) { + result.ia = ia; + } + return result; } } - public static class mutateRow extends org.apache.thrift.AsyncProcessFunction { + public static class mutateRow extends org.apache.thrift.ProcessFunction { public mutateRow() { super("mutateRow"); } @@ -3084,54 +3818,22 @@ public class THBaseService { return new mutateRow_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - mutateRow_result result = new mutateRow_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - mutateRow_result result = new mutateRow_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, mutateRow_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.mutateRow(args.table, args.trowMutations,resultHandler); + public mutateRow_result getResult(I iface, mutateRow_args args) throws org.apache.thrift.TException { + mutateRow_result result = new mutateRow_result(); + try { + iface.mutateRow(args.table, args.trowMutations); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class getScannerResults extends org.apache.thrift.AsyncProcessFunction> { + public static class getScannerResults extends org.apache.thrift.ProcessFunction { public getScannerResults() { super("getScannerResults"); } @@ -3140,55 +3842,22 @@ public class THBaseService { return new getScannerResults_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getScannerResults_result result = new getScannerResults_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getScannerResults_result result = new getScannerResults_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, getScannerResults_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.getScannerResults(args.table, args.tscan, args.numRows,resultHandler); + public getScannerResults_result getResult(I iface, getScannerResults_args args) throws org.apache.thrift.TException { + getScannerResults_result result = new getScannerResults_result(); + try { + result.success = iface.getScannerResults(args.table, args.tscan, args.numRows); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class getRegionLocation extends org.apache.thrift.AsyncProcessFunction { + public static class getRegionLocation extends org.apache.thrift.ProcessFunction { public getRegionLocation() { super("getRegionLocation"); } @@ -3197,55 +3866,22 @@ public class THBaseService { return new getRegionLocation_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(THRegionLocation o) { - getRegionLocation_result result = new getRegionLocation_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getRegionLocation_result result = new getRegionLocation_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, getRegionLocation_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getRegionLocation(args.table, args.row, args.reload,resultHandler); + public getRegionLocation_result getResult(I iface, getRegionLocation_args args) throws org.apache.thrift.TException { + getRegionLocation_result result = new getRegionLocation_result(); + try { + result.success = iface.getRegionLocation(args.table, args.row, args.reload); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class getAllRegionLocations extends org.apache.thrift.AsyncProcessFunction> { + public static class getAllRegionLocations extends org.apache.thrift.ProcessFunction { public getAllRegionLocations() { super("getAllRegionLocations"); } @@ -3254,55 +3890,22 @@ public class THBaseService { return new getAllRegionLocations_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getAllRegionLocations_result result = new getAllRegionLocations_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getAllRegionLocations_result result = new getAllRegionLocations_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, getAllRegionLocations_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.getAllRegionLocations(args.table,resultHandler); + public getAllRegionLocations_result getResult(I iface, getAllRegionLocations_args args) throws org.apache.thrift.TException { + getAllRegionLocations_result result = new getAllRegionLocations_result(); + try { + result.success = iface.getAllRegionLocations(args.table); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public static class checkAndMutate extends org.apache.thrift.AsyncProcessFunction { + public static class checkAndMutate extends org.apache.thrift.ProcessFunction { public checkAndMutate() { super("checkAndMutate"); } @@ -3311,738 +3914,31075 @@ public class THBaseService { return new checkAndMutate_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - checkAndMutate_result result = new checkAndMutate_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - checkAndMutate_result result = new checkAndMutate_result(); - if (e instanceof TIOError) { - result.io = (TIOError) e; - result.setIoIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - protected boolean isOneway() { return false; } - public void start(I iface, checkAndMutate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.checkAndMutate(args.table, args.row, args.family, args.qualifier, args.compareOp, args.value, args.rowMutations,resultHandler); + public checkAndMutate_result getResult(I iface, checkAndMutate_args args) throws org.apache.thrift.TException { + checkAndMutate_result result = new checkAndMutate_result(); + try { + result.success = iface.checkAndMutate(args.table, args.row, args.family, args.qualifier, args.compareOp, args.value, args.rowMutations); + result.setSuccessIsSet(true); + } catch (TIOError io) { + result.io = io; + } + return result; } } - } + public static class getTableDescriptor extends org.apache.thrift.ProcessFunction { + public getTableDescriptor() { + super("getTableDescriptor"); + } - public static class exists_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_args"); + public getTableDescriptor_args getEmptyArgsInstance() { + return new getTableDescriptor_args(); + } - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TGET_FIELD_DESC = new org.apache.thrift.protocol.TField("tget", org.apache.thrift.protocol.TType.STRUCT, (short)2); + protected boolean isOneway() { + return false; + } - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new exists_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new exists_argsTupleSchemeFactory()); + public getTableDescriptor_result getResult(I iface, getTableDescriptor_args args) throws org.apache.thrift.TException { + getTableDescriptor_result result = new getTableDescriptor_result(); + try { + result.success = iface.getTableDescriptor(args.table); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - /** - * the table to check on - */ - public ByteBuffer table; // required - /** - * the TGet to check for - */ - public TGet tget; // required + public static class getTableDescriptors extends org.apache.thrift.ProcessFunction { + public getTableDescriptors() { + super("getTableDescriptors"); + } - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the table to check on - */ - TABLE((short)1, "table"), - /** - * the TGet to check for - */ - TGET((short)2, "tget"); + public getTableDescriptors_args getEmptyArgsInstance() { + return new getTableDescriptors_args(); + } - private static final Map byName = new HashMap(); + protected boolean isOneway() { + return false; + } - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); + public getTableDescriptors_result getResult(I iface, getTableDescriptors_args args) throws org.apache.thrift.TException { + getTableDescriptors_result result = new getTableDescriptors_result(); + try { + result.success = iface.getTableDescriptors(args.tables); + } catch (TIOError io) { + result.io = io; } + return result; } + } - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // TGET - return TGET; - default: - return null; - } + public static class tableExists extends org.apache.thrift.ProcessFunction { + public tableExists() { + super("tableExists"); } - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; + public tableExists_args getEmptyArgsInstance() { + return new tableExists_args(); } - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); + protected boolean isOneway() { + return false; } - private final short _thriftId; - private final String _fieldName; + public tableExists_result getResult(I iface, tableExists_args args) throws org.apache.thrift.TException { + tableExists_result result = new tableExists_result(); + try { + result.success = iface.tableExists(args.tableName); + result.setSuccessIsSet(true); + } catch (TIOError io) { + result.io = io; + } + return result; + } + } - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; + public static class getTableDescriptorsByPattern extends org.apache.thrift.ProcessFunction { + public getTableDescriptorsByPattern() { + super("getTableDescriptorsByPattern"); } - public short getThriftFieldId() { - return _thriftId; + public getTableDescriptorsByPattern_args getEmptyArgsInstance() { + return new getTableDescriptorsByPattern_args(); } - public String getFieldName() { - return _fieldName; + protected boolean isOneway() { + return false; } - } - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TGET, new org.apache.thrift.meta_data.FieldMetaData("tget", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGet.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_args.class, metaDataMap); + public getTableDescriptorsByPattern_result getResult(I iface, getTableDescriptorsByPattern_args args) throws org.apache.thrift.TException { + getTableDescriptorsByPattern_result result = new getTableDescriptorsByPattern_result(); + try { + result.success = iface.getTableDescriptorsByPattern(args.regex, args.includeSysTables); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - public exists_args() { - } + public static class getTableDescriptorsByNamespace extends org.apache.thrift.ProcessFunction { + public getTableDescriptorsByNamespace() { + super("getTableDescriptorsByNamespace"); + } - public exists_args( - ByteBuffer table, - TGet tget) - { - this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.tget = tget; - } + public getTableDescriptorsByNamespace_args getEmptyArgsInstance() { + return new getTableDescriptorsByNamespace_args(); + } - /** - * Performs a deep copy on other. - */ - public exists_args(exists_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + protected boolean isOneway() { + return false; } - if (other.isSetTget()) { - this.tget = new TGet(other.tget); + + public getTableDescriptorsByNamespace_result getResult(I iface, getTableDescriptorsByNamespace_args args) throws org.apache.thrift.TException { + getTableDescriptorsByNamespace_result result = new getTableDescriptorsByNamespace_result(); + try { + result.success = iface.getTableDescriptorsByNamespace(args.name); + } catch (TIOError io) { + result.io = io; + } + return result; } } - public exists_args deepCopy() { - return new exists_args(this); - } + public static class getTableNamesByPattern extends org.apache.thrift.ProcessFunction { + public getTableNamesByPattern() { + super("getTableNamesByPattern"); + } - @Override - public void clear() { - this.table = null; - this.tget = null; - } + public getTableNamesByPattern_args getEmptyArgsInstance() { + return new getTableNamesByPattern_args(); + } - /** - * the table to check on - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } + protected boolean isOneway() { + return false; + } - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); + public getTableNamesByPattern_result getResult(I iface, getTableNamesByPattern_args args) throws org.apache.thrift.TException { + getTableNamesByPattern_result result = new getTableNamesByPattern_result(); + try { + result.success = iface.getTableNamesByPattern(args.regex, args.includeSysTables); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - /** - * the table to check on - */ - public exists_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; - } + public static class getTableNamesByNamespace extends org.apache.thrift.ProcessFunction { + public getTableNamesByNamespace() { + super("getTableNamesByNamespace"); + } - public exists_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; - } + public getTableNamesByNamespace_args getEmptyArgsInstance() { + return new getTableNamesByNamespace_args(); + } - public void unsetTable() { - this.table = null; - } + protected boolean isOneway() { + return false; + } - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; + public getTableNamesByNamespace_result getResult(I iface, getTableNamesByNamespace_args args) throws org.apache.thrift.TException { + getTableNamesByNamespace_result result = new getTableNamesByNamespace_result(); + try { + result.success = iface.getTableNamesByNamespace(args.name); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; + public static class createTable extends org.apache.thrift.ProcessFunction { + public createTable() { + super("createTable"); } - } - /** - * the TGet to check for - */ - public TGet getTget() { - return this.tget; - } + public createTable_args getEmptyArgsInstance() { + return new createTable_args(); + } - /** - * the TGet to check for - */ - public exists_args setTget(TGet tget) { - this.tget = tget; - return this; - } + protected boolean isOneway() { + return false; + } - public void unsetTget() { - this.tget = null; + public createTable_result getResult(I iface, createTable_args args) throws org.apache.thrift.TException { + createTable_result result = new createTable_result(); + try { + iface.createTable(args.desc, args.splitKeys); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - /** Returns true if field tget is set (has been assigned a value) and false otherwise */ - public boolean isSetTget() { - return this.tget != null; - } + public static class deleteTable extends org.apache.thrift.ProcessFunction { + public deleteTable() { + super("deleteTable"); + } - public void setTgetIsSet(boolean value) { - if (!value) { - this.tget = null; + public deleteTable_args getEmptyArgsInstance() { + return new deleteTable_args(); } - } - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; + protected boolean isOneway() { + return false; + } - case TGET: - if (value == null) { - unsetTget(); - } else { - setTget((TGet)value); + public deleteTable_result getResult(I iface, deleteTable_args args) throws org.apache.thrift.TException { + deleteTable_result result = new deleteTable_result(); + try { + iface.deleteTable(args.tableName); + } catch (TIOError io) { + result.io = io; } - break; - + return result; } } - public Object getFieldValue(_Fields field) { - switch (field) { - case TABLE: - return getTable(); + public static class deleteTableByPattern extends org.apache.thrift.ProcessFunction { + public deleteTableByPattern() { + super("deleteTableByPattern"); + } - case TGET: - return getTget(); + public deleteTableByPattern_args getEmptyArgsInstance() { + return new deleteTableByPattern_args(); + } + protected boolean isOneway() { + return false; + } + + public deleteTableByPattern_result getResult(I iface, deleteTableByPattern_args args) throws org.apache.thrift.TException { + deleteTableByPattern_result result = new deleteTableByPattern_result(); + try { + result.success = iface.deleteTableByPattern(args.regex); + } catch (TIOError io) { + result.io = io; + } + return result; } - throw new IllegalStateException(); } - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); + public static class truncateTable extends org.apache.thrift.ProcessFunction { + public truncateTable() { + super("truncateTable"); } - switch (field) { - case TABLE: - return isSetTable(); - case TGET: - return isSetTget(); + public truncateTable_args getEmptyArgsInstance() { + return new truncateTable_args(); } - throw new IllegalStateException(); - } - @Override - public boolean equals(Object that) { - if (that == null) + protected boolean isOneway() { return false; - if (that instanceof exists_args) - return this.equals((exists_args)that); - return false; + } + + public truncateTable_result getResult(I iface, truncateTable_args args) throws org.apache.thrift.TException { + truncateTable_result result = new truncateTable_result(); + try { + iface.truncateTable(args.tableName, args.preserveSplits); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - public boolean equals(exists_args that) { - if (that == null) - return false; + public static class enableTable extends org.apache.thrift.ProcessFunction { + public enableTable() { + super("enableTable"); + } - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; + public enableTable_args getEmptyArgsInstance() { + return new enableTable_args(); } - boolean this_present_tget = true && this.isSetTget(); - boolean that_present_tget = true && that.isSetTget(); - if (this_present_tget || that_present_tget) { - if (!(this_present_tget && that_present_tget)) - return false; - if (!this.tget.equals(that.tget)) - return false; + protected boolean isOneway() { + return false; } - return true; + public enableTable_result getResult(I iface, enableTable_args args) throws org.apache.thrift.TException { + enableTable_result result = new enableTable_result(); + try { + iface.enableTable(args.tableName); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - @Override - public int hashCode() { - List list = new ArrayList(); + public static class enableTableByPattern extends org.apache.thrift.ProcessFunction { + public enableTableByPattern() { + super("enableTableByPattern"); + } - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); + public enableTableByPattern_args getEmptyArgsInstance() { + return new enableTableByPattern_args(); + } - boolean present_tget = true && (isSetTget()); - list.add(present_tget); - if (present_tget) - list.add(tget); + protected boolean isOneway() { + return false; + } - return list.hashCode(); + public enableTableByPattern_result getResult(I iface, enableTableByPattern_args args) throws org.apache.thrift.TException { + enableTableByPattern_result result = new enableTableByPattern_result(); + try { + result.success = iface.enableTableByPattern(args.regex); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - @Override - public int compareTo(exists_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); + public static class disableTable extends org.apache.thrift.ProcessFunction { + public disableTable() { + super("disableTable"); } - int lastComparison = 0; + public disableTable_args getEmptyArgsInstance() { + return new disableTable_args(); + } - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; + protected boolean isOneway() { + return false; } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; + + public disableTable_result getResult(I iface, disableTable_args args) throws org.apache.thrift.TException { + disableTable_result result = new disableTable_result(); + try { + iface.disableTable(args.tableName); + } catch (TIOError io) { + result.io = io; } + return result; } - lastComparison = Boolean.valueOf(isSetTget()).compareTo(other.isSetTget()); - if (lastComparison != 0) { - return lastComparison; + } + + public static class disableTableByPattern extends org.apache.thrift.ProcessFunction { + public disableTableByPattern() { + super("disableTableByPattern"); } - if (isSetTget()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tget, other.tget); - if (lastComparison != 0) { - return lastComparison; - } + + public disableTableByPattern_args getEmptyArgsInstance() { + return new disableTableByPattern_args(); } - return 0; - } - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } + protected boolean isOneway() { + return false; + } - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + public disableTableByPattern_result getResult(I iface, disableTableByPattern_args args) throws org.apache.thrift.TException { + disableTableByPattern_result result = new disableTableByPattern_result(); + try { + result.success = iface.disableTableByPattern(args.regex); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + public static class isTableEnabled extends org.apache.thrift.ProcessFunction { + public isTableEnabled() { + super("isTableEnabled"); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder("exists_args("); - boolean first = true; + public isTableEnabled_args getEmptyArgsInstance() { + return new isTableEnabled_args(); + } - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); + protected boolean isOneway() { + return false; } - first = false; - if (!first) sb.append(", "); - sb.append("tget:"); - if (this.tget == null) { - sb.append("null"); - } else { - sb.append(this.tget); + + public isTableEnabled_result getResult(I iface, isTableEnabled_args args) throws org.apache.thrift.TException { + isTableEnabled_result result = new isTableEnabled_result(); + try { + result.success = iface.isTableEnabled(args.tableName); + result.setSuccessIsSet(true); + } catch (TIOError io) { + result.io = io; + } + return result; } - first = false; - sb.append(")"); - return sb.toString(); } - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + public static class isTableDisabled extends org.apache.thrift.ProcessFunction { + public isTableDisabled() { + super("isTableDisabled"); } - if (tget == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tget' was not present! Struct: " + toString()); + + public isTableDisabled_args getEmptyArgsInstance() { + return new isTableDisabled_args(); } - // check for sub-struct validity - if (tget != null) { - tget.validate(); + + protected boolean isOneway() { + return false; } - } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); + public isTableDisabled_result getResult(I iface, isTableDisabled_args args) throws org.apache.thrift.TException { + isTableDisabled_result result = new isTableDisabled_result(); + try { + result.success = iface.isTableDisabled(args.tableName); + result.setSuccessIsSet(true); + } catch (TIOError io) { + result.io = io; + } + return result; } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); + public static class isTableAvailable extends org.apache.thrift.ProcessFunction { + public isTableAvailable() { + super("isTableAvailable"); } - } - private static class exists_argsStandardSchemeFactory implements SchemeFactory { - public exists_argsStandardScheme getScheme() { - return new exists_argsStandardScheme(); + public isTableAvailable_args getEmptyArgsInstance() { + return new isTableAvailable_args(); } - } - private static class exists_argsStandardScheme extends StandardScheme { + protected boolean isOneway() { + return false; + } - public void read(org.apache.thrift.protocol.TProtocol iprot, exists_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TGET - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tget = new TGet(); - struct.tget.read(iprot); - struct.setTgetIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); + public isTableAvailable_result getResult(I iface, isTableAvailable_args args) throws org.apache.thrift.TException { + isTableAvailable_result result = new isTableAvailable_result(); + try { + result.success = iface.isTableAvailable(args.tableName); + result.setSuccessIsSet(true); + } catch (TIOError io) { + result.io = io; } - iprot.readStructEnd(); + return result; + } + } - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); + public static class isTableAvailableWithSplit extends org.apache.thrift.ProcessFunction { + public isTableAvailableWithSplit() { + super("isTableAvailableWithSplit"); } - public void write(org.apache.thrift.protocol.TProtocol oprot, exists_args struct) throws org.apache.thrift.TException { - struct.validate(); + public isTableAvailableWithSplit_args getEmptyArgsInstance() { + return new isTableAvailableWithSplit_args(); + } - oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.tget != null) { - oprot.writeFieldBegin(TGET_FIELD_DESC); - struct.tget.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + protected boolean isOneway() { + return false; } + public isTableAvailableWithSplit_result getResult(I iface, isTableAvailableWithSplit_args args) throws org.apache.thrift.TException { + isTableAvailableWithSplit_result result = new isTableAvailableWithSplit_result(); + try { + result.success = iface.isTableAvailableWithSplit(args.tableName, args.splitKeys); + result.setSuccessIsSet(true); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - private static class exists_argsTupleSchemeFactory implements SchemeFactory { - public exists_argsTupleScheme getScheme() { - return new exists_argsTupleScheme(); + public static class addColumnFamily extends org.apache.thrift.ProcessFunction { + public addColumnFamily() { + super("addColumnFamily"); } - } - private static class exists_argsTupleScheme extends TupleScheme { + public addColumnFamily_args getEmptyArgsInstance() { + return new addColumnFamily_args(); + } - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - struct.tget.write(oprot); + protected boolean isOneway() { + return false; } - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - struct.tget = new TGet(); - struct.tget.read(iprot); - struct.setTgetIsSet(true); + public addColumnFamily_result getResult(I iface, addColumnFamily_args args) throws org.apache.thrift.TException { + addColumnFamily_result result = new addColumnFamily_result(); + try { + iface.addColumnFamily(args.tableName, args.column); + } catch (TIOError io) { + result.io = io; + } + return result; } } - } + public static class deleteColumnFamily extends org.apache.thrift.ProcessFunction { + public deleteColumnFamily() { + super("deleteColumnFamily"); + } - public static class exists_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_result"); + public deleteColumnFamily_args getEmptyArgsInstance() { + return new deleteColumnFamily_args(); + } - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); - private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + protected boolean isOneway() { + return false; + } - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new exists_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new exists_resultTupleSchemeFactory()); + public deleteColumnFamily_result getResult(I iface, deleteColumnFamily_args args) throws org.apache.thrift.TException { + deleteColumnFamily_result result = new deleteColumnFamily_result(); + try { + iface.deleteColumnFamily(args.tableName, args.column); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - public boolean success; // required - public TIOError io; // required + public static class modifyColumnFamily extends org.apache.thrift.ProcessFunction { + public modifyColumnFamily() { + super("modifyColumnFamily"); + } - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - IO((short)1, "io"); + public modifyColumnFamily_args getEmptyArgsInstance() { + return new modifyColumnFamily_args(); + } - private static final Map byName = new HashMap(); + protected boolean isOneway() { + return false; + } - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); + public modifyColumnFamily_result getResult(I iface, modifyColumnFamily_args args) throws org.apache.thrift.TException { + modifyColumnFamily_result result = new modifyColumnFamily_result(); + try { + iface.modifyColumnFamily(args.tableName, args.column); + } catch (TIOError io) { + result.io = io; } + return result; } + } - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // IO - return IO; - default: - return null; - } + public static class modifyTable extends org.apache.thrift.ProcessFunction { + public modifyTable() { + super("modifyTable"); } - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; + public modifyTable_args getEmptyArgsInstance() { + return new modifyTable_args(); } - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); + protected boolean isOneway() { + return false; } - private final short _thriftId; - private final String _fieldName; + public modifyTable_result getResult(I iface, modifyTable_args args) throws org.apache.thrift.TException { + modifyTable_result result = new modifyTable_result(); + try { + iface.modifyTable(args.desc); + } catch (TIOError io) { + result.io = io; + } + return result; + } + } - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; + public static class createNamespace extends org.apache.thrift.ProcessFunction { + public createNamespace() { + super("createNamespace"); } - public short getThriftFieldId() { - return _thriftId; + public createNamespace_args getEmptyArgsInstance() { + return new createNamespace_args(); } - public String getFieldName() { - return _fieldName; + protected boolean isOneway() { + return false; } - } - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_result.class, metaDataMap); + public createNamespace_result getResult(I iface, createNamespace_args args) throws org.apache.thrift.TException { + createNamespace_result result = new createNamespace_result(); + try { + iface.createNamespace(args.namespaceDesc); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - public exists_result() { - } + public static class modifyNamespace extends org.apache.thrift.ProcessFunction { + public modifyNamespace() { + super("modifyNamespace"); + } - public exists_result( - boolean success, - TIOError io) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.io = io; - } + public modifyNamespace_args getEmptyArgsInstance() { + return new modifyNamespace_args(); + } - /** - * Performs a deep copy on other. - */ - public exists_result(exists_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetIo()) { - this.io = new TIOError(other.io); + protected boolean isOneway() { + return false; } - } - public exists_result deepCopy() { - return new exists_result(this); + public modifyNamespace_result getResult(I iface, modifyNamespace_args args) throws org.apache.thrift.TException { + modifyNamespace_result result = new modifyNamespace_result(); + try { + iface.modifyNamespace(args.namespaceDesc); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.io = null; - } + public static class deleteNamespace extends org.apache.thrift.ProcessFunction { + public deleteNamespace() { + super("deleteNamespace"); + } - public boolean isSuccess() { - return this.success; - } + public deleteNamespace_args getEmptyArgsInstance() { + return new deleteNamespace_args(); + } - public exists_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } + protected boolean isOneway() { + return false; + } - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + public deleteNamespace_result getResult(I iface, deleteNamespace_args args) throws org.apache.thrift.TException { + deleteNamespace_result result = new deleteNamespace_result(); + try { + iface.deleteNamespace(args.name); + } catch (TIOError io) { + result.io = io; + } + return result; + } } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } + public static class getNamespaceDescriptor extends org.apache.thrift.ProcessFunction { + public getNamespaceDescriptor() { + super("getNamespaceDescriptor"); + } - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } + public getNamespaceDescriptor_args getEmptyArgsInstance() { + return new getNamespaceDescriptor_args(); + } - public TIOError getIo() { - return this.io; - } + protected boolean isOneway() { + return false; + } - public exists_result setIo(TIOError io) { - this.io = io; + public getNamespaceDescriptor_result getResult(I iface, getNamespaceDescriptor_args args) throws org.apache.thrift.TException { + getNamespaceDescriptor_result result = new getNamespaceDescriptor_result(); + try { + result.success = iface.getNamespaceDescriptor(args.name); + } catch (TIOError io) { + result.io = io; + } + return result; + } + } + + public static class listNamespaceDescriptors extends org.apache.thrift.ProcessFunction { + public listNamespaceDescriptors() { + super("listNamespaceDescriptors"); + } + + public listNamespaceDescriptors_args getEmptyArgsInstance() { + return new listNamespaceDescriptors_args(); + } + + protected boolean isOneway() { + return false; + } + + public listNamespaceDescriptors_result getResult(I iface, listNamespaceDescriptors_args args) throws org.apache.thrift.TException { + listNamespaceDescriptors_result result = new listNamespaceDescriptors_result(); + try { + result.success = iface.listNamespaceDescriptors(); + } catch (TIOError io) { + result.io = io; + } + return result; + } + } + + } + + public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); + public AsyncProcessor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } + + protected AsyncProcessor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("exists", new exists()); + processMap.put("existsAll", new existsAll()); + processMap.put("get", new get()); + processMap.put("getMultiple", new getMultiple()); + processMap.put("put", new put()); + processMap.put("checkAndPut", new checkAndPut()); + processMap.put("putMultiple", new putMultiple()); + processMap.put("deleteSingle", new deleteSingle()); + processMap.put("deleteMultiple", new deleteMultiple()); + processMap.put("checkAndDelete", new checkAndDelete()); + processMap.put("increment", new increment()); + processMap.put("append", new append()); + processMap.put("openScanner", new openScanner()); + processMap.put("getScannerRows", new getScannerRows()); + processMap.put("closeScanner", new closeScanner()); + processMap.put("mutateRow", new mutateRow()); + processMap.put("getScannerResults", new getScannerResults()); + processMap.put("getRegionLocation", new getRegionLocation()); + processMap.put("getAllRegionLocations", new getAllRegionLocations()); + processMap.put("checkAndMutate", new checkAndMutate()); + processMap.put("getTableDescriptor", new getTableDescriptor()); + processMap.put("getTableDescriptors", new getTableDescriptors()); + processMap.put("tableExists", new tableExists()); + processMap.put("getTableDescriptorsByPattern", new getTableDescriptorsByPattern()); + processMap.put("getTableDescriptorsByNamespace", new getTableDescriptorsByNamespace()); + processMap.put("getTableNamesByPattern", new getTableNamesByPattern()); + processMap.put("getTableNamesByNamespace", new getTableNamesByNamespace()); + processMap.put("createTable", new createTable()); + processMap.put("deleteTable", new deleteTable()); + processMap.put("deleteTableByPattern", new deleteTableByPattern()); + processMap.put("truncateTable", new truncateTable()); + processMap.put("enableTable", new enableTable()); + processMap.put("enableTableByPattern", new enableTableByPattern()); + processMap.put("disableTable", new disableTable()); + processMap.put("disableTableByPattern", new disableTableByPattern()); + processMap.put("isTableEnabled", new isTableEnabled()); + processMap.put("isTableDisabled", new isTableDisabled()); + processMap.put("isTableAvailable", new isTableAvailable()); + processMap.put("isTableAvailableWithSplit", new isTableAvailableWithSplit()); + processMap.put("addColumnFamily", new addColumnFamily()); + processMap.put("deleteColumnFamily", new deleteColumnFamily()); + processMap.put("modifyColumnFamily", new modifyColumnFamily()); + processMap.put("modifyTable", new modifyTable()); + processMap.put("createNamespace", new createNamespace()); + processMap.put("modifyNamespace", new modifyNamespace()); + processMap.put("deleteNamespace", new deleteNamespace()); + processMap.put("getNamespaceDescriptor", new getNamespaceDescriptor()); + processMap.put("listNamespaceDescriptors", new listNamespaceDescriptors()); + return processMap; + } + + public static class exists extends org.apache.thrift.AsyncProcessFunction { + public exists() { + super("exists"); + } + + public exists_args getEmptyArgsInstance() { + return new exists_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + exists_result result = new exists_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + exists_result result = new exists_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, exists_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.exists(args.table, args.tget,resultHandler); + } + } + + public static class existsAll extends org.apache.thrift.AsyncProcessFunction> { + public existsAll() { + super("existsAll"); + } + + public existsAll_args getEmptyArgsInstance() { + return new existsAll_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + existsAll_result result = new existsAll_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + existsAll_result result = new existsAll_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, existsAll_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.existsAll(args.table, args.tgets,resultHandler); + } + } + + public static class get extends org.apache.thrift.AsyncProcessFunction { + public get() { + super("get"); + } + + public get_args getEmptyArgsInstance() { + return new get_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TResult o) { + get_result result = new get_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_result result = new get_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get(args.table, args.tget,resultHandler); + } + } + + public static class getMultiple extends org.apache.thrift.AsyncProcessFunction> { + public getMultiple() { + super("getMultiple"); + } + + public getMultiple_args getEmptyArgsInstance() { + return new getMultiple_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getMultiple_result result = new getMultiple_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getMultiple_result result = new getMultiple_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getMultiple_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getMultiple(args.table, args.tgets,resultHandler); + } + } + + public static class put extends org.apache.thrift.AsyncProcessFunction { + public put() { + super("put"); + } + + public put_args getEmptyArgsInstance() { + return new put_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + put_result result = new put_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + put_result result = new put_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, put_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.put(args.table, args.tput,resultHandler); + } + } + + public static class checkAndPut extends org.apache.thrift.AsyncProcessFunction { + public checkAndPut() { + super("checkAndPut"); + } + + public checkAndPut_args getEmptyArgsInstance() { + return new checkAndPut_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + checkAndPut_result result = new checkAndPut_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + checkAndPut_result result = new checkAndPut_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, checkAndPut_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.checkAndPut(args.table, args.row, args.family, args.qualifier, args.value, args.tput,resultHandler); + } + } + + public static class putMultiple extends org.apache.thrift.AsyncProcessFunction { + public putMultiple() { + super("putMultiple"); + } + + public putMultiple_args getEmptyArgsInstance() { + return new putMultiple_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + putMultiple_result result = new putMultiple_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + putMultiple_result result = new putMultiple_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, putMultiple_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.putMultiple(args.table, args.tputs,resultHandler); + } + } + + public static class deleteSingle extends org.apache.thrift.AsyncProcessFunction { + public deleteSingle() { + super("deleteSingle"); + } + + public deleteSingle_args getEmptyArgsInstance() { + return new deleteSingle_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + deleteSingle_result result = new deleteSingle_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deleteSingle_result result = new deleteSingle_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deleteSingle_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deleteSingle(args.table, args.tdelete,resultHandler); + } + } + + public static class deleteMultiple extends org.apache.thrift.AsyncProcessFunction> { + public deleteMultiple() { + super("deleteMultiple"); + } + + public deleteMultiple_args getEmptyArgsInstance() { + return new deleteMultiple_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + deleteMultiple_result result = new deleteMultiple_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deleteMultiple_result result = new deleteMultiple_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deleteMultiple_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.deleteMultiple(args.table, args.tdeletes,resultHandler); + } + } + + public static class checkAndDelete extends org.apache.thrift.AsyncProcessFunction { + public checkAndDelete() { + super("checkAndDelete"); + } + + public checkAndDelete_args getEmptyArgsInstance() { + return new checkAndDelete_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + checkAndDelete_result result = new checkAndDelete_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + checkAndDelete_result result = new checkAndDelete_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, checkAndDelete_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.checkAndDelete(args.table, args.row, args.family, args.qualifier, args.value, args.tdelete,resultHandler); + } + } + + public static class increment extends org.apache.thrift.AsyncProcessFunction { + public increment() { + super("increment"); + } + + public increment_args getEmptyArgsInstance() { + return new increment_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TResult o) { + increment_result result = new increment_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + increment_result result = new increment_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, increment_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.increment(args.table, args.tincrement,resultHandler); + } + } + + public static class append extends org.apache.thrift.AsyncProcessFunction { + public append() { + super("append"); + } + + public append_args getEmptyArgsInstance() { + return new append_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TResult o) { + append_result result = new append_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + append_result result = new append_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, append_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.append(args.table, args.tappend,resultHandler); + } + } + + public static class openScanner extends org.apache.thrift.AsyncProcessFunction { + public openScanner() { + super("openScanner"); + } + + public openScanner_args getEmptyArgsInstance() { + return new openScanner_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Integer o) { + openScanner_result result = new openScanner_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + openScanner_result result = new openScanner_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, openScanner_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.openScanner(args.table, args.tscan,resultHandler); + } + } + + public static class getScannerRows extends org.apache.thrift.AsyncProcessFunction> { + public getScannerRows() { + super("getScannerRows"); + } + + public getScannerRows_args getEmptyArgsInstance() { + return new getScannerRows_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getScannerRows_result result = new getScannerRows_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getScannerRows_result result = new getScannerRows_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else if (e instanceof TIllegalArgument) { + result.ia = (TIllegalArgument) e; + result.setIaIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getScannerRows_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getScannerRows(args.scannerId, args.numRows,resultHandler); + } + } + + public static class closeScanner extends org.apache.thrift.AsyncProcessFunction { + public closeScanner() { + super("closeScanner"); + } + + public closeScanner_args getEmptyArgsInstance() { + return new closeScanner_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + closeScanner_result result = new closeScanner_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + closeScanner_result result = new closeScanner_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else if (e instanceof TIllegalArgument) { + result.ia = (TIllegalArgument) e; + result.setIaIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, closeScanner_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.closeScanner(args.scannerId,resultHandler); + } + } + + public static class mutateRow extends org.apache.thrift.AsyncProcessFunction { + public mutateRow() { + super("mutateRow"); + } + + public mutateRow_args getEmptyArgsInstance() { + return new mutateRow_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + mutateRow_result result = new mutateRow_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + mutateRow_result result = new mutateRow_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, mutateRow_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.mutateRow(args.table, args.trowMutations,resultHandler); + } + } + + public static class getScannerResults extends org.apache.thrift.AsyncProcessFunction> { + public getScannerResults() { + super("getScannerResults"); + } + + public getScannerResults_args getEmptyArgsInstance() { + return new getScannerResults_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getScannerResults_result result = new getScannerResults_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getScannerResults_result result = new getScannerResults_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getScannerResults_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getScannerResults(args.table, args.tscan, args.numRows,resultHandler); + } + } + + public static class getRegionLocation extends org.apache.thrift.AsyncProcessFunction { + public getRegionLocation() { + super("getRegionLocation"); + } + + public getRegionLocation_args getEmptyArgsInstance() { + return new getRegionLocation_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(THRegionLocation o) { + getRegionLocation_result result = new getRegionLocation_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getRegionLocation_result result = new getRegionLocation_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getRegionLocation_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getRegionLocation(args.table, args.row, args.reload,resultHandler); + } + } + + public static class getAllRegionLocations extends org.apache.thrift.AsyncProcessFunction> { + public getAllRegionLocations() { + super("getAllRegionLocations"); + } + + public getAllRegionLocations_args getEmptyArgsInstance() { + return new getAllRegionLocations_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getAllRegionLocations_result result = new getAllRegionLocations_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getAllRegionLocations_result result = new getAllRegionLocations_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getAllRegionLocations_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getAllRegionLocations(args.table,resultHandler); + } + } + + public static class checkAndMutate extends org.apache.thrift.AsyncProcessFunction { + public checkAndMutate() { + super("checkAndMutate"); + } + + public checkAndMutate_args getEmptyArgsInstance() { + return new checkAndMutate_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + checkAndMutate_result result = new checkAndMutate_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + checkAndMutate_result result = new checkAndMutate_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, checkAndMutate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.checkAndMutate(args.table, args.row, args.family, args.qualifier, args.compareOp, args.value, args.rowMutations,resultHandler); + } + } + + public static class getTableDescriptor extends org.apache.thrift.AsyncProcessFunction { + public getTableDescriptor() { + super("getTableDescriptor"); + } + + public getTableDescriptor_args getEmptyArgsInstance() { + return new getTableDescriptor_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TTableDescriptor o) { + getTableDescriptor_result result = new getTableDescriptor_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getTableDescriptor_result result = new getTableDescriptor_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getTableDescriptor_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getTableDescriptor(args.table,resultHandler); + } + } + + public static class getTableDescriptors extends org.apache.thrift.AsyncProcessFunction> { + public getTableDescriptors() { + super("getTableDescriptors"); + } + + public getTableDescriptors_args getEmptyArgsInstance() { + return new getTableDescriptors_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getTableDescriptors_result result = new getTableDescriptors_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getTableDescriptors_result result = new getTableDescriptors_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getTableDescriptors_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getTableDescriptors(args.tables,resultHandler); + } + } + + public static class tableExists extends org.apache.thrift.AsyncProcessFunction { + public tableExists() { + super("tableExists"); + } + + public tableExists_args getEmptyArgsInstance() { + return new tableExists_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + tableExists_result result = new tableExists_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + tableExists_result result = new tableExists_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, tableExists_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.tableExists(args.tableName,resultHandler); + } + } + + public static class getTableDescriptorsByPattern extends org.apache.thrift.AsyncProcessFunction> { + public getTableDescriptorsByPattern() { + super("getTableDescriptorsByPattern"); + } + + public getTableDescriptorsByPattern_args getEmptyArgsInstance() { + return new getTableDescriptorsByPattern_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getTableDescriptorsByPattern_result result = new getTableDescriptorsByPattern_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getTableDescriptorsByPattern_result result = new getTableDescriptorsByPattern_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getTableDescriptorsByPattern_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getTableDescriptorsByPattern(args.regex, args.includeSysTables,resultHandler); + } + } + + public static class getTableDescriptorsByNamespace extends org.apache.thrift.AsyncProcessFunction> { + public getTableDescriptorsByNamespace() { + super("getTableDescriptorsByNamespace"); + } + + public getTableDescriptorsByNamespace_args getEmptyArgsInstance() { + return new getTableDescriptorsByNamespace_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getTableDescriptorsByNamespace_result result = new getTableDescriptorsByNamespace_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getTableDescriptorsByNamespace_result result = new getTableDescriptorsByNamespace_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getTableDescriptorsByNamespace_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getTableDescriptorsByNamespace(args.name,resultHandler); + } + } + + public static class getTableNamesByPattern extends org.apache.thrift.AsyncProcessFunction> { + public getTableNamesByPattern() { + super("getTableNamesByPattern"); + } + + public getTableNamesByPattern_args getEmptyArgsInstance() { + return new getTableNamesByPattern_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getTableNamesByPattern_result result = new getTableNamesByPattern_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getTableNamesByPattern_result result = new getTableNamesByPattern_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getTableNamesByPattern_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getTableNamesByPattern(args.regex, args.includeSysTables,resultHandler); + } + } + + public static class getTableNamesByNamespace extends org.apache.thrift.AsyncProcessFunction> { + public getTableNamesByNamespace() { + super("getTableNamesByNamespace"); + } + + public getTableNamesByNamespace_args getEmptyArgsInstance() { + return new getTableNamesByNamespace_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getTableNamesByNamespace_result result = new getTableNamesByNamespace_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getTableNamesByNamespace_result result = new getTableNamesByNamespace_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getTableNamesByNamespace_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getTableNamesByNamespace(args.name,resultHandler); + } + } + + public static class createTable extends org.apache.thrift.AsyncProcessFunction { + public createTable() { + super("createTable"); + } + + public createTable_args getEmptyArgsInstance() { + return new createTable_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + createTable_result result = new createTable_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + createTable_result result = new createTable_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, createTable_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.createTable(args.desc, args.splitKeys,resultHandler); + } + } + + public static class deleteTable extends org.apache.thrift.AsyncProcessFunction { + public deleteTable() { + super("deleteTable"); + } + + public deleteTable_args getEmptyArgsInstance() { + return new deleteTable_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + deleteTable_result result = new deleteTable_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deleteTable_result result = new deleteTable_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deleteTable_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deleteTable(args.tableName,resultHandler); + } + } + + public static class deleteTableByPattern extends org.apache.thrift.AsyncProcessFunction> { + public deleteTableByPattern() { + super("deleteTableByPattern"); + } + + public deleteTableByPattern_args getEmptyArgsInstance() { + return new deleteTableByPattern_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + deleteTableByPattern_result result = new deleteTableByPattern_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deleteTableByPattern_result result = new deleteTableByPattern_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deleteTableByPattern_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.deleteTableByPattern(args.regex,resultHandler); + } + } + + public static class truncateTable extends org.apache.thrift.AsyncProcessFunction { + public truncateTable() { + super("truncateTable"); + } + + public truncateTable_args getEmptyArgsInstance() { + return new truncateTable_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + truncateTable_result result = new truncateTable_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + truncateTable_result result = new truncateTable_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, truncateTable_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.truncateTable(args.tableName, args.preserveSplits,resultHandler); + } + } + + public static class enableTable extends org.apache.thrift.AsyncProcessFunction { + public enableTable() { + super("enableTable"); + } + + public enableTable_args getEmptyArgsInstance() { + return new enableTable_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + enableTable_result result = new enableTable_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + enableTable_result result = new enableTable_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, enableTable_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.enableTable(args.tableName,resultHandler); + } + } + + public static class enableTableByPattern extends org.apache.thrift.AsyncProcessFunction> { + public enableTableByPattern() { + super("enableTableByPattern"); + } + + public enableTableByPattern_args getEmptyArgsInstance() { + return new enableTableByPattern_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + enableTableByPattern_result result = new enableTableByPattern_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + enableTableByPattern_result result = new enableTableByPattern_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, enableTableByPattern_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.enableTableByPattern(args.regex,resultHandler); + } + } + + public static class disableTable extends org.apache.thrift.AsyncProcessFunction { + public disableTable() { + super("disableTable"); + } + + public disableTable_args getEmptyArgsInstance() { + return new disableTable_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + disableTable_result result = new disableTable_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + disableTable_result result = new disableTable_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, disableTable_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.disableTable(args.tableName,resultHandler); + } + } + + public static class disableTableByPattern extends org.apache.thrift.AsyncProcessFunction> { + public disableTableByPattern() { + super("disableTableByPattern"); + } + + public disableTableByPattern_args getEmptyArgsInstance() { + return new disableTableByPattern_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + disableTableByPattern_result result = new disableTableByPattern_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + disableTableByPattern_result result = new disableTableByPattern_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, disableTableByPattern_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.disableTableByPattern(args.regex,resultHandler); + } + } + + public static class isTableEnabled extends org.apache.thrift.AsyncProcessFunction { + public isTableEnabled() { + super("isTableEnabled"); + } + + public isTableEnabled_args getEmptyArgsInstance() { + return new isTableEnabled_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + isTableEnabled_result result = new isTableEnabled_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + isTableEnabled_result result = new isTableEnabled_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, isTableEnabled_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.isTableEnabled(args.tableName,resultHandler); + } + } + + public static class isTableDisabled extends org.apache.thrift.AsyncProcessFunction { + public isTableDisabled() { + super("isTableDisabled"); + } + + public isTableDisabled_args getEmptyArgsInstance() { + return new isTableDisabled_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + isTableDisabled_result result = new isTableDisabled_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + isTableDisabled_result result = new isTableDisabled_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, isTableDisabled_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.isTableDisabled(args.tableName,resultHandler); + } + } + + public static class isTableAvailable extends org.apache.thrift.AsyncProcessFunction { + public isTableAvailable() { + super("isTableAvailable"); + } + + public isTableAvailable_args getEmptyArgsInstance() { + return new isTableAvailable_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + isTableAvailable_result result = new isTableAvailable_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + isTableAvailable_result result = new isTableAvailable_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, isTableAvailable_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.isTableAvailable(args.tableName,resultHandler); + } + } + + public static class isTableAvailableWithSplit extends org.apache.thrift.AsyncProcessFunction { + public isTableAvailableWithSplit() { + super("isTableAvailableWithSplit"); + } + + public isTableAvailableWithSplit_args getEmptyArgsInstance() { + return new isTableAvailableWithSplit_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + isTableAvailableWithSplit_result result = new isTableAvailableWithSplit_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + isTableAvailableWithSplit_result result = new isTableAvailableWithSplit_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, isTableAvailableWithSplit_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.isTableAvailableWithSplit(args.tableName, args.splitKeys,resultHandler); + } + } + + public static class addColumnFamily extends org.apache.thrift.AsyncProcessFunction { + public addColumnFamily() { + super("addColumnFamily"); + } + + public addColumnFamily_args getEmptyArgsInstance() { + return new addColumnFamily_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + addColumnFamily_result result = new addColumnFamily_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + addColumnFamily_result result = new addColumnFamily_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, addColumnFamily_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.addColumnFamily(args.tableName, args.column,resultHandler); + } + } + + public static class deleteColumnFamily extends org.apache.thrift.AsyncProcessFunction { + public deleteColumnFamily() { + super("deleteColumnFamily"); + } + + public deleteColumnFamily_args getEmptyArgsInstance() { + return new deleteColumnFamily_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + deleteColumnFamily_result result = new deleteColumnFamily_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deleteColumnFamily_result result = new deleteColumnFamily_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deleteColumnFamily_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deleteColumnFamily(args.tableName, args.column,resultHandler); + } + } + + public static class modifyColumnFamily extends org.apache.thrift.AsyncProcessFunction { + public modifyColumnFamily() { + super("modifyColumnFamily"); + } + + public modifyColumnFamily_args getEmptyArgsInstance() { + return new modifyColumnFamily_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + modifyColumnFamily_result result = new modifyColumnFamily_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + modifyColumnFamily_result result = new modifyColumnFamily_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, modifyColumnFamily_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.modifyColumnFamily(args.tableName, args.column,resultHandler); + } + } + + public static class modifyTable extends org.apache.thrift.AsyncProcessFunction { + public modifyTable() { + super("modifyTable"); + } + + public modifyTable_args getEmptyArgsInstance() { + return new modifyTable_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + modifyTable_result result = new modifyTable_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + modifyTable_result result = new modifyTable_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, modifyTable_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.modifyTable(args.desc,resultHandler); + } + } + + public static class createNamespace extends org.apache.thrift.AsyncProcessFunction { + public createNamespace() { + super("createNamespace"); + } + + public createNamespace_args getEmptyArgsInstance() { + return new createNamespace_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + createNamespace_result result = new createNamespace_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + createNamespace_result result = new createNamespace_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, createNamespace_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.createNamespace(args.namespaceDesc,resultHandler); + } + } + + public static class modifyNamespace extends org.apache.thrift.AsyncProcessFunction { + public modifyNamespace() { + super("modifyNamespace"); + } + + public modifyNamespace_args getEmptyArgsInstance() { + return new modifyNamespace_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + modifyNamespace_result result = new modifyNamespace_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + modifyNamespace_result result = new modifyNamespace_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, modifyNamespace_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.modifyNamespace(args.namespaceDesc,resultHandler); + } + } + + public static class deleteNamespace extends org.apache.thrift.AsyncProcessFunction { + public deleteNamespace() { + super("deleteNamespace"); + } + + public deleteNamespace_args getEmptyArgsInstance() { + return new deleteNamespace_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + deleteNamespace_result result = new deleteNamespace_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + deleteNamespace_result result = new deleteNamespace_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deleteNamespace_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deleteNamespace(args.name,resultHandler); + } + } + + public static class getNamespaceDescriptor extends org.apache.thrift.AsyncProcessFunction { + public getNamespaceDescriptor() { + super("getNamespaceDescriptor"); + } + + public getNamespaceDescriptor_args getEmptyArgsInstance() { + return new getNamespaceDescriptor_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TNamespaceDescriptor o) { + getNamespaceDescriptor_result result = new getNamespaceDescriptor_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getNamespaceDescriptor_result result = new getNamespaceDescriptor_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getNamespaceDescriptor_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getNamespaceDescriptor(args.name,resultHandler); + } + } + + public static class listNamespaceDescriptors extends org.apache.thrift.AsyncProcessFunction> { + public listNamespaceDescriptors() { + super("listNamespaceDescriptors"); + } + + public listNamespaceDescriptors_args getEmptyArgsInstance() { + return new listNamespaceDescriptors_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + listNamespaceDescriptors_result result = new listNamespaceDescriptors_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + listNamespaceDescriptors_result result = new listNamespaceDescriptors_result(); + if (e instanceof TIOError) { + result.io = (TIOError) e; + result.setIoIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, listNamespaceDescriptors_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.listNamespaceDescriptors(resultHandler); + } + } + + } + + public static class exists_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TGET_FIELD_DESC = new org.apache.thrift.protocol.TField("tget", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new exists_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new exists_argsTupleSchemeFactory()); + } + + /** + * the table to check on + */ + public ByteBuffer table; // required + /** + * the TGet to check for + */ + public TGet tget; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the table to check on + */ + TABLE((short)1, "table"), + /** + * the TGet to check for + */ + TGET((short)2, "tget"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // TGET + return TGET; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TGET, new org.apache.thrift.meta_data.FieldMetaData("tget", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGet.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_args.class, metaDataMap); + } + + public exists_args() { + } + + public exists_args( + ByteBuffer table, + TGet tget) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.tget = tget; + } + + /** + * Performs a deep copy on other. + */ + public exists_args(exists_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetTget()) { + this.tget = new TGet(other.tget); + } + } + + public exists_args deepCopy() { + return new exists_args(this); + } + + @Override + public void clear() { + this.table = null; + this.tget = null; + } + + /** + * the table to check on + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * the table to check on + */ + public exists_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public exists_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + /** + * the TGet to check for + */ + public TGet getTget() { + return this.tget; + } + + /** + * the TGet to check for + */ + public exists_args setTget(TGet tget) { + this.tget = tget; + return this; + } + + public void unsetTget() { + this.tget = null; + } + + /** Returns true if field tget is set (has been assigned a value) and false otherwise */ + public boolean isSetTget() { + return this.tget != null; + } + + public void setTgetIsSet(boolean value) { + if (!value) { + this.tget = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case TGET: + if (value == null) { + unsetTget(); + } else { + setTget((TGet)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case TGET: + return getTget(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case TGET: + return isSetTget(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof exists_args) + return this.equals((exists_args)that); + return false; + } + + public boolean equals(exists_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_tget = true && this.isSetTget(); + boolean that_present_tget = true && that.isSetTget(); + if (this_present_tget || that_present_tget) { + if (!(this_present_tget && that_present_tget)) + return false; + if (!this.tget.equals(that.tget)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_tget = true && (isSetTget()); + list.add(present_tget); + if (present_tget) + list.add(tget); + + return list.hashCode(); + } + + @Override + public int compareTo(exists_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTget()).compareTo(other.isSetTget()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTget()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tget, other.tget); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("exists_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tget:"); + if (this.tget == null) { + sb.append("null"); + } else { + sb.append(this.tget); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (tget == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tget' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (tget != null) { + tget.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class exists_argsStandardSchemeFactory implements SchemeFactory { + public exists_argsStandardScheme getScheme() { + return new exists_argsStandardScheme(); + } + } + + private static class exists_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, exists_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TGET + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tget = new TGet(); + struct.tget.read(iprot); + struct.setTgetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, exists_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.tget != null) { + oprot.writeFieldBegin(TGET_FIELD_DESC); + struct.tget.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class exists_argsTupleSchemeFactory implements SchemeFactory { + public exists_argsTupleScheme getScheme() { + return new exists_argsTupleScheme(); + } + } + + private static class exists_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + struct.tget.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + struct.tget = new TGet(); + struct.tget.read(iprot); + struct.setTgetIsSet(true); + } + } + + } + + public static class exists_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new exists_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new exists_resultTupleSchemeFactory()); + } + + public boolean success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_result.class, metaDataMap); + } + + public exists_result() { + } + + public exists_result( + boolean success, + TIOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public exists_result(exists_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public exists_result deepCopy() { + return new exists_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.io = null; + } + + public boolean isSuccess() { + return this.success; + } + + public exists_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public TIOError getIo() { + return this.io; + } + + public exists_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof exists_result) + return this.equals((exists_result)that); + return false; + } + + public boolean equals(exists_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(exists_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("exists_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class exists_resultStandardSchemeFactory implements SchemeFactory { + public exists_resultStandardScheme getScheme() { + return new exists_resultStandardScheme(); + } + } + + private static class exists_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, exists_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, exists_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class exists_resultTupleSchemeFactory implements SchemeFactory { + public exists_resultTupleScheme getScheme() { + return new exists_resultTupleScheme(); + } + } + + private static class exists_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class existsAll_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("existsAll_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TGETS_FIELD_DESC = new org.apache.thrift.protocol.TField("tgets", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new existsAll_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new existsAll_argsTupleSchemeFactory()); + } + + /** + * the table to check on + */ + public ByteBuffer table; // required + /** + * a list of TGets to check for + */ + public List tgets; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the table to check on + */ + TABLE((short)1, "table"), + /** + * a list of TGets to check for + */ + TGETS((short)2, "tgets"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // TGETS + return TGETS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TGETS, new org.apache.thrift.meta_data.FieldMetaData("tgets", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGet.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(existsAll_args.class, metaDataMap); + } + + public existsAll_args() { + } + + public existsAll_args( + ByteBuffer table, + List tgets) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.tgets = tgets; + } + + /** + * Performs a deep copy on other. + */ + public existsAll_args(existsAll_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetTgets()) { + List __this__tgets = new ArrayList(other.tgets.size()); + for (TGet other_element : other.tgets) { + __this__tgets.add(new TGet(other_element)); + } + this.tgets = __this__tgets; + } + } + + public existsAll_args deepCopy() { + return new existsAll_args(this); + } + + @Override + public void clear() { + this.table = null; + this.tgets = null; + } + + /** + * the table to check on + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * the table to check on + */ + public existsAll_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public existsAll_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + public int getTgetsSize() { + return (this.tgets == null) ? 0 : this.tgets.size(); + } + + public java.util.Iterator getTgetsIterator() { + return (this.tgets == null) ? null : this.tgets.iterator(); + } + + public void addToTgets(TGet elem) { + if (this.tgets == null) { + this.tgets = new ArrayList(); + } + this.tgets.add(elem); + } + + /** + * a list of TGets to check for + */ + public List getTgets() { + return this.tgets; + } + + /** + * a list of TGets to check for + */ + public existsAll_args setTgets(List tgets) { + this.tgets = tgets; + return this; + } + + public void unsetTgets() { + this.tgets = null; + } + + /** Returns true if field tgets is set (has been assigned a value) and false otherwise */ + public boolean isSetTgets() { + return this.tgets != null; + } + + public void setTgetsIsSet(boolean value) { + if (!value) { + this.tgets = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case TGETS: + if (value == null) { + unsetTgets(); + } else { + setTgets((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case TGETS: + return getTgets(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case TGETS: + return isSetTgets(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof existsAll_args) + return this.equals((existsAll_args)that); + return false; + } + + public boolean equals(existsAll_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_tgets = true && this.isSetTgets(); + boolean that_present_tgets = true && that.isSetTgets(); + if (this_present_tgets || that_present_tgets) { + if (!(this_present_tgets && that_present_tgets)) + return false; + if (!this.tgets.equals(that.tgets)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_tgets = true && (isSetTgets()); + list.add(present_tgets); + if (present_tgets) + list.add(tgets); + + return list.hashCode(); + } + + @Override + public int compareTo(existsAll_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTgets()).compareTo(other.isSetTgets()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTgets()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tgets, other.tgets); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("existsAll_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tgets:"); + if (this.tgets == null) { + sb.append("null"); + } else { + sb.append(this.tgets); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (tgets == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tgets' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class existsAll_argsStandardSchemeFactory implements SchemeFactory { + public existsAll_argsStandardScheme getScheme() { + return new existsAll_argsStandardScheme(); + } + } + + private static class existsAll_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, existsAll_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TGETS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list190 = iprot.readListBegin(); + struct.tgets = new ArrayList(_list190.size); + TGet _elem191; + for (int _i192 = 0; _i192 < _list190.size; ++_i192) + { + _elem191 = new TGet(); + _elem191.read(iprot); + struct.tgets.add(_elem191); + } + iprot.readListEnd(); + } + struct.setTgetsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, existsAll_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.tgets != null) { + oprot.writeFieldBegin(TGETS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tgets.size())); + for (TGet _iter193 : struct.tgets) + { + _iter193.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class existsAll_argsTupleSchemeFactory implements SchemeFactory { + public existsAll_argsTupleScheme getScheme() { + return new existsAll_argsTupleScheme(); + } + } + + private static class existsAll_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, existsAll_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + { + oprot.writeI32(struct.tgets.size()); + for (TGet _iter194 : struct.tgets) + { + _iter194.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, existsAll_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + { + org.apache.thrift.protocol.TList _list195 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.tgets = new ArrayList(_list195.size); + TGet _elem196; + for (int _i197 = 0; _i197 < _list195.size; ++_i197) + { + _elem196 = new TGet(); + _elem196.read(iprot); + struct.tgets.add(_elem196); + } + } + struct.setTgetsIsSet(true); + } + } + + } + + public static class existsAll_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("existsAll_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new existsAll_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new existsAll_resultTupleSchemeFactory()); + } + + public List success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(existsAll_result.class, metaDataMap); + } + + public existsAll_result() { + } + + public existsAll_result( + List success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public existsAll_result(existsAll_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public existsAll_result deepCopy() { + return new existsAll_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(boolean elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public existsAll_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public existsAll_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof existsAll_result) + return this.equals((existsAll_result)that); + return false; + } + + public boolean equals(existsAll_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(existsAll_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("existsAll_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class existsAll_resultStandardSchemeFactory implements SchemeFactory { + public existsAll_resultStandardScheme getScheme() { + return new existsAll_resultStandardScheme(); + } + } + + private static class existsAll_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, existsAll_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list198 = iprot.readListBegin(); + struct.success = new ArrayList(_list198.size); + boolean _elem199; + for (int _i200 = 0; _i200 < _list198.size; ++_i200) + { + _elem199 = iprot.readBool(); + struct.success.add(_elem199); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, existsAll_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, struct.success.size())); + for (boolean _iter201 : struct.success) + { + oprot.writeBool(_iter201); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class existsAll_resultTupleSchemeFactory implements SchemeFactory { + public existsAll_resultTupleScheme getScheme() { + return new existsAll_resultTupleScheme(); + } + } + + private static class existsAll_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, existsAll_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (boolean _iter202 : struct.success) + { + oprot.writeBool(_iter202); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, existsAll_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list203 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, iprot.readI32()); + struct.success = new ArrayList(_list203.size); + boolean _elem204; + for (int _i205 = 0; _i205 < _list203.size; ++_i205) + { + _elem204 = iprot.readBool(); + struct.success.add(_elem204); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class get_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TGET_FIELD_DESC = new org.apache.thrift.protocol.TField("tget", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_argsTupleSchemeFactory()); + } + + /** + * the table to get from + */ + public ByteBuffer table; // required + /** + * the TGet to fetch + */ + public TGet tget; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the table to get from + */ + TABLE((short)1, "table"), + /** + * the TGet to fetch + */ + TGET((short)2, "tget"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // TGET + return TGET; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TGET, new org.apache.thrift.meta_data.FieldMetaData("tget", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGet.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap); + } + + public get_args() { + } + + public get_args( + ByteBuffer table, + TGet tget) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.tget = tget; + } + + /** + * Performs a deep copy on other. + */ + public get_args(get_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetTget()) { + this.tget = new TGet(other.tget); + } + } + + public get_args deepCopy() { + return new get_args(this); + } + + @Override + public void clear() { + this.table = null; + this.tget = null; + } + + /** + * the table to get from + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * the table to get from + */ + public get_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public get_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + /** + * the TGet to fetch + */ + public TGet getTget() { + return this.tget; + } + + /** + * the TGet to fetch + */ + public get_args setTget(TGet tget) { + this.tget = tget; + return this; + } + + public void unsetTget() { + this.tget = null; + } + + /** Returns true if field tget is set (has been assigned a value) and false otherwise */ + public boolean isSetTget() { + return this.tget != null; + } + + public void setTgetIsSet(boolean value) { + if (!value) { + this.tget = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case TGET: + if (value == null) { + unsetTget(); + } else { + setTget((TGet)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case TGET: + return getTget(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case TGET: + return isSetTget(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_args) + return this.equals((get_args)that); + return false; + } + + public boolean equals(get_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_tget = true && this.isSetTget(); + boolean that_present_tget = true && that.isSetTget(); + if (this_present_tget || that_present_tget) { + if (!(this_present_tget && that_present_tget)) + return false; + if (!this.tget.equals(that.tget)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_tget = true && (isSetTget()); + list.add(present_tget); + if (present_tget) + list.add(tget); + + return list.hashCode(); + } + + @Override + public int compareTo(get_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTget()).compareTo(other.isSetTget()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTget()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tget, other.tget); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tget:"); + if (this.tget == null) { + sb.append("null"); + } else { + sb.append(this.tget); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (tget == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tget' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (tget != null) { + tget.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class get_argsStandardSchemeFactory implements SchemeFactory { + public get_argsStandardScheme getScheme() { + return new get_argsStandardScheme(); + } + } + + private static class get_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TGET + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tget = new TGet(); + struct.tget.read(iprot); + struct.setTgetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.tget != null) { + oprot.writeFieldBegin(TGET_FIELD_DESC); + struct.tget.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_argsTupleSchemeFactory implements SchemeFactory { + public get_argsTupleScheme getScheme() { + return new get_argsTupleScheme(); + } + } + + private static class get_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + struct.tget.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + struct.tget = new TGet(); + struct.tget.read(iprot); + struct.setTgetIsSet(true); + } + } + + } + + public static class get_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_resultTupleSchemeFactory()); + } + + public TResult success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_result.class, metaDataMap); + } + + public get_result() { + } + + public get_result( + TResult success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public get_result(get_result other) { + if (other.isSetSuccess()) { + this.success = new TResult(other.success); + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public get_result deepCopy() { + return new get_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public TResult getSuccess() { + return this.success; + } + + public get_result setSuccess(TResult success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public get_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TResult)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_result) + return this.equals((get_result)that); + return false; + } + + public boolean equals(get_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(get_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class get_resultStandardSchemeFactory implements SchemeFactory { + public get_resultStandardScheme getScheme() { + return new get_resultStandardScheme(); + } + } + + private static class get_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_resultTupleSchemeFactory implements SchemeFactory { + public get_resultTupleScheme getScheme() { + return new get_resultTupleScheme(); + } + } + + private static class get_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new TResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getMultiple_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMultiple_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TGETS_FIELD_DESC = new org.apache.thrift.protocol.TField("tgets", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getMultiple_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getMultiple_argsTupleSchemeFactory()); + } + + /** + * the table to get from + */ + public ByteBuffer table; // required + /** + * a list of TGets to fetch, the Result list + * will have the Results at corresponding positions + * or null if there was an error + */ + public List tgets; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the table to get from + */ + TABLE((short)1, "table"), + /** + * a list of TGets to fetch, the Result list + * will have the Results at corresponding positions + * or null if there was an error + */ + TGETS((short)2, "tgets"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // TGETS + return TGETS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TGETS, new org.apache.thrift.meta_data.FieldMetaData("tgets", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGet.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMultiple_args.class, metaDataMap); + } + + public getMultiple_args() { + } + + public getMultiple_args( + ByteBuffer table, + List tgets) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.tgets = tgets; + } + + /** + * Performs a deep copy on other. + */ + public getMultiple_args(getMultiple_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetTgets()) { + List __this__tgets = new ArrayList(other.tgets.size()); + for (TGet other_element : other.tgets) { + __this__tgets.add(new TGet(other_element)); + } + this.tgets = __this__tgets; + } + } + + public getMultiple_args deepCopy() { + return new getMultiple_args(this); + } + + @Override + public void clear() { + this.table = null; + this.tgets = null; + } + + /** + * the table to get from + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * the table to get from + */ + public getMultiple_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public getMultiple_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + public int getTgetsSize() { + return (this.tgets == null) ? 0 : this.tgets.size(); + } + + public java.util.Iterator getTgetsIterator() { + return (this.tgets == null) ? null : this.tgets.iterator(); + } + + public void addToTgets(TGet elem) { + if (this.tgets == null) { + this.tgets = new ArrayList(); + } + this.tgets.add(elem); + } + + /** + * a list of TGets to fetch, the Result list + * will have the Results at corresponding positions + * or null if there was an error + */ + public List getTgets() { + return this.tgets; + } + + /** + * a list of TGets to fetch, the Result list + * will have the Results at corresponding positions + * or null if there was an error + */ + public getMultiple_args setTgets(List tgets) { + this.tgets = tgets; + return this; + } + + public void unsetTgets() { + this.tgets = null; + } + + /** Returns true if field tgets is set (has been assigned a value) and false otherwise */ + public boolean isSetTgets() { + return this.tgets != null; + } + + public void setTgetsIsSet(boolean value) { + if (!value) { + this.tgets = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case TGETS: + if (value == null) { + unsetTgets(); + } else { + setTgets((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case TGETS: + return getTgets(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case TGETS: + return isSetTgets(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getMultiple_args) + return this.equals((getMultiple_args)that); + return false; + } + + public boolean equals(getMultiple_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_tgets = true && this.isSetTgets(); + boolean that_present_tgets = true && that.isSetTgets(); + if (this_present_tgets || that_present_tgets) { + if (!(this_present_tgets && that_present_tgets)) + return false; + if (!this.tgets.equals(that.tgets)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_tgets = true && (isSetTgets()); + list.add(present_tgets); + if (present_tgets) + list.add(tgets); + + return list.hashCode(); + } + + @Override + public int compareTo(getMultiple_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTgets()).compareTo(other.isSetTgets()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTgets()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tgets, other.tgets); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getMultiple_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tgets:"); + if (this.tgets == null) { + sb.append("null"); + } else { + sb.append(this.tgets); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (tgets == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tgets' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getMultiple_argsStandardSchemeFactory implements SchemeFactory { + public getMultiple_argsStandardScheme getScheme() { + return new getMultiple_argsStandardScheme(); + } + } + + private static class getMultiple_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getMultiple_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TGETS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list206 = iprot.readListBegin(); + struct.tgets = new ArrayList(_list206.size); + TGet _elem207; + for (int _i208 = 0; _i208 < _list206.size; ++_i208) + { + _elem207 = new TGet(); + _elem207.read(iprot); + struct.tgets.add(_elem207); + } + iprot.readListEnd(); + } + struct.setTgetsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getMultiple_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.tgets != null) { + oprot.writeFieldBegin(TGETS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tgets.size())); + for (TGet _iter209 : struct.tgets) + { + _iter209.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getMultiple_argsTupleSchemeFactory implements SchemeFactory { + public getMultiple_argsTupleScheme getScheme() { + return new getMultiple_argsTupleScheme(); + } + } + + private static class getMultiple_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getMultiple_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + { + oprot.writeI32(struct.tgets.size()); + for (TGet _iter210 : struct.tgets) + { + _iter210.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getMultiple_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + { + org.apache.thrift.protocol.TList _list211 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.tgets = new ArrayList(_list211.size); + TGet _elem212; + for (int _i213 = 0; _i213 < _list211.size; ++_i213) + { + _elem212 = new TGet(); + _elem212.read(iprot); + struct.tgets.add(_elem212); + } + } + struct.setTgetsIsSet(true); + } + } + + } + + public static class getMultiple_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMultiple_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getMultiple_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getMultiple_resultTupleSchemeFactory()); + } + + public List success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMultiple_result.class, metaDataMap); + } + + public getMultiple_result() { + } + + public getMultiple_result( + List success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getMultiple_result(getMultiple_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (TResult other_element : other.success) { + __this__success.add(new TResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public getMultiple_result deepCopy() { + return new getMultiple_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getMultiple_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public getMultiple_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getMultiple_result) + return this.equals((getMultiple_result)that); + return false; + } + + public boolean equals(getMultiple_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(getMultiple_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getMultiple_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getMultiple_resultStandardSchemeFactory implements SchemeFactory { + public getMultiple_resultStandardScheme getScheme() { + return new getMultiple_resultStandardScheme(); + } + } + + private static class getMultiple_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getMultiple_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list214 = iprot.readListBegin(); + struct.success = new ArrayList(_list214.size); + TResult _elem215; + for (int _i216 = 0; _i216 < _list214.size; ++_i216) + { + _elem215 = new TResult(); + _elem215.read(iprot); + struct.success.add(_elem215); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getMultiple_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TResult _iter217 : struct.success) + { + _iter217.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getMultiple_resultTupleSchemeFactory implements SchemeFactory { + public getMultiple_resultTupleScheme getScheme() { + return new getMultiple_resultTupleScheme(); + } + } + + private static class getMultiple_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getMultiple_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TResult _iter218 : struct.success) + { + _iter218.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getMultiple_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list219 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list219.size); + TResult _elem220; + for (int _i221 = 0; _i221 < _list219.size; ++_i221) + { + _elem220 = new TResult(); + _elem220.read(iprot); + struct.success.add(_elem220); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class put_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TPUT_FIELD_DESC = new org.apache.thrift.protocol.TField("tput", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new put_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new put_argsTupleSchemeFactory()); + } + + /** + * the table to put data in + */ + public ByteBuffer table; // required + /** + * the TPut to put + */ + public TPut tput; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the table to put data in + */ + TABLE((short)1, "table"), + /** + * the TPut to put + */ + TPUT((short)2, "tput"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // TPUT + return TPUT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TPUT, new org.apache.thrift.meta_data.FieldMetaData("tput", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPut.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_args.class, metaDataMap); + } + + public put_args() { + } + + public put_args( + ByteBuffer table, + TPut tput) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.tput = tput; + } + + /** + * Performs a deep copy on other. + */ + public put_args(put_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetTput()) { + this.tput = new TPut(other.tput); + } + } + + public put_args deepCopy() { + return new put_args(this); + } + + @Override + public void clear() { + this.table = null; + this.tput = null; + } + + /** + * the table to put data in + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * the table to put data in + */ + public put_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public put_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + /** + * the TPut to put + */ + public TPut getTput() { + return this.tput; + } + + /** + * the TPut to put + */ + public put_args setTput(TPut tput) { + this.tput = tput; + return this; + } + + public void unsetTput() { + this.tput = null; + } + + /** Returns true if field tput is set (has been assigned a value) and false otherwise */ + public boolean isSetTput() { + return this.tput != null; + } + + public void setTputIsSet(boolean value) { + if (!value) { + this.tput = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case TPUT: + if (value == null) { + unsetTput(); + } else { + setTput((TPut)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case TPUT: + return getTput(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case TPUT: + return isSetTput(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof put_args) + return this.equals((put_args)that); + return false; + } + + public boolean equals(put_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_tput = true && this.isSetTput(); + boolean that_present_tput = true && that.isSetTput(); + if (this_present_tput || that_present_tput) { + if (!(this_present_tput && that_present_tput)) + return false; + if (!this.tput.equals(that.tput)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_tput = true && (isSetTput()); + list.add(present_tput); + if (present_tput) + list.add(tput); + + return list.hashCode(); + } + + @Override + public int compareTo(put_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTput()).compareTo(other.isSetTput()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTput()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tput, other.tput); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("put_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tput:"); + if (this.tput == null) { + sb.append("null"); + } else { + sb.append(this.tput); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (tput == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tput' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (tput != null) { + tput.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class put_argsStandardSchemeFactory implements SchemeFactory { + public put_argsStandardScheme getScheme() { + return new put_argsStandardScheme(); + } + } + + private static class put_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, put_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TPUT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tput = new TPut(); + struct.tput.read(iprot); + struct.setTputIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, put_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.tput != null) { + oprot.writeFieldBegin(TPUT_FIELD_DESC); + struct.tput.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class put_argsTupleSchemeFactory implements SchemeFactory { + public put_argsTupleScheme getScheme() { + return new put_argsTupleScheme(); + } + } + + private static class put_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, put_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + struct.tput.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, put_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + struct.tput = new TPut(); + struct.tput.read(iprot); + struct.setTputIsSet(true); + } + } + + } + + public static class put_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new put_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new put_resultTupleSchemeFactory()); + } + + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_result.class, metaDataMap); + } + + public put_result() { + } + + public put_result( + TIOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public put_result(put_result other) { + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public put_result deepCopy() { + return new put_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public TIOError getIo() { + return this.io; + } + + public put_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof put_result) + return this.equals((put_result)that); + return false; + } + + public boolean equals(put_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(put_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("put_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class put_resultStandardSchemeFactory implements SchemeFactory { + public put_resultStandardScheme getScheme() { + return new put_resultStandardScheme(); + } + } + + private static class put_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, put_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, put_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class put_resultTupleSchemeFactory implements SchemeFactory { + public put_resultTupleScheme getScheme() { + return new put_resultTupleScheme(); + } + } + + private static class put_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, put_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, put_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class checkAndPut_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndPut_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField TPUT_FIELD_DESC = new org.apache.thrift.protocol.TField("tput", org.apache.thrift.protocol.TType.STRUCT, (short)6); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new checkAndPut_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new checkAndPut_argsTupleSchemeFactory()); + } + + /** + * to check in and put to + */ + public ByteBuffer table; // required + /** + * row to check + */ + public ByteBuffer row; // required + /** + * column family to check + */ + public ByteBuffer family; // required + /** + * column qualifier to check + */ + public ByteBuffer qualifier; // required + /** + * the expected value, if not provided the + * check is for the non-existence of the + * column in question + */ + public ByteBuffer value; // required + /** + * the TPut to put if the check succeeds + */ + public TPut tput; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * to check in and put to + */ + TABLE((short)1, "table"), + /** + * row to check + */ + ROW((short)2, "row"), + /** + * column family to check + */ + FAMILY((short)3, "family"), + /** + * column qualifier to check + */ + QUALIFIER((short)4, "qualifier"), + /** + * the expected value, if not provided the + * check is for the non-existence of the + * column in question + */ + VALUE((short)5, "value"), + /** + * the TPut to put if the check succeeds + */ + TPUT((short)6, "tput"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // ROW + return ROW; + case 3: // FAMILY + return FAMILY; + case 4: // QUALIFIER + return QUALIFIER; + case 5: // VALUE + return VALUE; + case 6: // TPUT + return TPUT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.FAMILY, new org.apache.thrift.meta_data.FieldMetaData("family", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TPUT, new org.apache.thrift.meta_data.FieldMetaData("tput", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPut.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndPut_args.class, metaDataMap); + } + + public checkAndPut_args() { + } + + public checkAndPut_args( + ByteBuffer table, + ByteBuffer row, + ByteBuffer family, + ByteBuffer qualifier, + ByteBuffer value, + TPut tput) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.row = org.apache.thrift.TBaseHelper.copyBinary(row); + this.family = org.apache.thrift.TBaseHelper.copyBinary(family); + this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); + this.value = org.apache.thrift.TBaseHelper.copyBinary(value); + this.tput = tput; + } + + /** + * Performs a deep copy on other. + */ + public checkAndPut_args(checkAndPut_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetRow()) { + this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); + } + if (other.isSetFamily()) { + this.family = org.apache.thrift.TBaseHelper.copyBinary(other.family); + } + if (other.isSetQualifier()) { + this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier); + } + if (other.isSetValue()) { + this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); + } + if (other.isSetTput()) { + this.tput = new TPut(other.tput); + } + } + + public checkAndPut_args deepCopy() { + return new checkAndPut_args(this); + } + + @Override + public void clear() { + this.table = null; + this.row = null; + this.family = null; + this.qualifier = null; + this.value = null; + this.tput = null; + } + + /** + * to check in and put to + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * to check in and put to + */ + public checkAndPut_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public checkAndPut_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + /** + * row to check + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return org.apache.thrift.TBaseHelper.copyBinary(row); + } + + /** + * row to check + */ + public checkAndPut_args setRow(byte[] row) { + this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length)); + return this; + } + + public checkAndPut_args setRow(ByteBuffer row) { + this.row = org.apache.thrift.TBaseHelper.copyBinary(row); + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + /** + * column family to check + */ + public byte[] getFamily() { + setFamily(org.apache.thrift.TBaseHelper.rightSize(family)); + return family == null ? null : family.array(); + } + + public ByteBuffer bufferForFamily() { + return org.apache.thrift.TBaseHelper.copyBinary(family); + } + + /** + * column family to check + */ + public checkAndPut_args setFamily(byte[] family) { + this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length)); + return this; + } + + public checkAndPut_args setFamily(ByteBuffer family) { + this.family = org.apache.thrift.TBaseHelper.copyBinary(family); + return this; + } + + public void unsetFamily() { + this.family = null; + } + + /** Returns true if field family is set (has been assigned a value) and false otherwise */ + public boolean isSetFamily() { + return this.family != null; + } + + public void setFamilyIsSet(boolean value) { + if (!value) { + this.family = null; + } + } + + /** + * column qualifier to check + */ + public byte[] getQualifier() { + setQualifier(org.apache.thrift.TBaseHelper.rightSize(qualifier)); + return qualifier == null ? null : qualifier.array(); + } + + public ByteBuffer bufferForQualifier() { + return org.apache.thrift.TBaseHelper.copyBinary(qualifier); + } + + /** + * column qualifier to check + */ + public checkAndPut_args setQualifier(byte[] qualifier) { + this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length)); + return this; + } + + public checkAndPut_args setQualifier(ByteBuffer qualifier) { + this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); + return this; + } + + public void unsetQualifier() { + this.qualifier = null; + } + + /** Returns true if field qualifier is set (has been assigned a value) and false otherwise */ + public boolean isSetQualifier() { + return this.qualifier != null; + } + + public void setQualifierIsSet(boolean value) { + if (!value) { + this.qualifier = null; + } + } + + /** + * the expected value, if not provided the + * check is for the non-existence of the + * column in question + */ + public byte[] getValue() { + setValue(org.apache.thrift.TBaseHelper.rightSize(value)); + return value == null ? null : value.array(); + } + + public ByteBuffer bufferForValue() { + return org.apache.thrift.TBaseHelper.copyBinary(value); + } + + /** + * the expected value, if not provided the + * check is for the non-existence of the + * column in question + */ + public checkAndPut_args setValue(byte[] value) { + this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length)); + return this; + } + + public checkAndPut_args setValue(ByteBuffer value) { + this.value = org.apache.thrift.TBaseHelper.copyBinary(value); + return this; + } + + public void unsetValue() { + this.value = null; + } + + /** Returns true if field value is set (has been assigned a value) and false otherwise */ + public boolean isSetValue() { + return this.value != null; + } + + public void setValueIsSet(boolean value) { + if (!value) { + this.value = null; + } + } + + /** + * the TPut to put if the check succeeds + */ + public TPut getTput() { + return this.tput; + } + + /** + * the TPut to put if the check succeeds + */ + public checkAndPut_args setTput(TPut tput) { + this.tput = tput; + return this; + } + + public void unsetTput() { + this.tput = null; + } + + /** Returns true if field tput is set (has been assigned a value) and false otherwise */ + public boolean isSetTput() { + return this.tput != null; + } + + public void setTputIsSet(boolean value) { + if (!value) { + this.tput = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case FAMILY: + if (value == null) { + unsetFamily(); + } else { + setFamily((ByteBuffer)value); + } + break; + + case QUALIFIER: + if (value == null) { + unsetQualifier(); + } else { + setQualifier((ByteBuffer)value); + } + break; + + case VALUE: + if (value == null) { + unsetValue(); + } else { + setValue((ByteBuffer)value); + } + break; + + case TPUT: + if (value == null) { + unsetTput(); + } else { + setTput((TPut)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case ROW: + return getRow(); + + case FAMILY: + return getFamily(); + + case QUALIFIER: + return getQualifier(); + + case VALUE: + return getValue(); + + case TPUT: + return getTput(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case ROW: + return isSetRow(); + case FAMILY: + return isSetFamily(); + case QUALIFIER: + return isSetQualifier(); + case VALUE: + return isSetValue(); + case TPUT: + return isSetTput(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof checkAndPut_args) + return this.equals((checkAndPut_args)that); + return false; + } + + public boolean equals(checkAndPut_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_family = true && this.isSetFamily(); + boolean that_present_family = true && that.isSetFamily(); + if (this_present_family || that_present_family) { + if (!(this_present_family && that_present_family)) + return false; + if (!this.family.equals(that.family)) + return false; + } + + boolean this_present_qualifier = true && this.isSetQualifier(); + boolean that_present_qualifier = true && that.isSetQualifier(); + if (this_present_qualifier || that_present_qualifier) { + if (!(this_present_qualifier && that_present_qualifier)) + return false; + if (!this.qualifier.equals(that.qualifier)) + return false; + } + + 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; + if (!this.value.equals(that.value)) + return false; + } + + boolean this_present_tput = true && this.isSetTput(); + boolean that_present_tput = true && that.isSetTput(); + if (this_present_tput || that_present_tput) { + if (!(this_present_tput && that_present_tput)) + return false; + if (!this.tput.equals(that.tput)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_row = true && (isSetRow()); + list.add(present_row); + if (present_row) + list.add(row); + + boolean present_family = true && (isSetFamily()); + list.add(present_family); + if (present_family) + list.add(family); + + boolean present_qualifier = true && (isSetQualifier()); + list.add(present_qualifier); + if (present_qualifier) + list.add(qualifier); + + boolean present_value = true && (isSetValue()); + list.add(present_value); + if (present_value) + list.add(value); + + boolean present_tput = true && (isSetTput()); + list.add(present_tput); + if (present_tput) + list.add(tput); + + return list.hashCode(); + } + + @Override + public int compareTo(checkAndPut_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFamily()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, other.family); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQualifier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTput()).compareTo(other.isSetTput()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTput()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tput, other.tput); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("checkAndPut_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.row, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("family:"); + if (this.family == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.family, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("qualifier:"); + if (this.qualifier == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.qualifier, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("value:"); + if (this.value == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.value, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tput:"); + if (this.tput == null) { + sb.append("null"); + } else { + sb.append(this.tput); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (row == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString()); + } + if (family == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'family' was not present! Struct: " + toString()); + } + if (qualifier == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifier' was not present! Struct: " + toString()); + } + if (tput == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tput' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (tput != null) { + tput.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class checkAndPut_argsStandardSchemeFactory implements SchemeFactory { + public checkAndPut_argsStandardScheme getScheme() { + return new checkAndPut_argsStandardScheme(); + } + } + + private static class checkAndPut_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndPut_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FAMILY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.family = iprot.readBinary(); + struct.setFamilyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // QUALIFIER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.qualifier = iprot.readBinary(); + struct.setQualifierIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.value = iprot.readBinary(); + struct.setValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // TPUT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tput = new TPut(); + struct.tput.read(iprot); + struct.setTputIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndPut_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.family != null) { + oprot.writeFieldBegin(FAMILY_FIELD_DESC); + oprot.writeBinary(struct.family); + oprot.writeFieldEnd(); + } + if (struct.qualifier != null) { + oprot.writeFieldBegin(QUALIFIER_FIELD_DESC); + oprot.writeBinary(struct.qualifier); + oprot.writeFieldEnd(); + } + if (struct.value != null) { + oprot.writeFieldBegin(VALUE_FIELD_DESC); + oprot.writeBinary(struct.value); + oprot.writeFieldEnd(); + } + if (struct.tput != null) { + oprot.writeFieldBegin(TPUT_FIELD_DESC); + struct.tput.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class checkAndPut_argsTupleSchemeFactory implements SchemeFactory { + public checkAndPut_argsTupleScheme getScheme() { + return new checkAndPut_argsTupleScheme(); + } + } + + private static class checkAndPut_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, checkAndPut_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + oprot.writeBinary(struct.row); + oprot.writeBinary(struct.family); + oprot.writeBinary(struct.qualifier); + struct.tput.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetValue()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetValue()) { + oprot.writeBinary(struct.value); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, checkAndPut_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + struct.family = iprot.readBinary(); + struct.setFamilyIsSet(true); + struct.qualifier = iprot.readBinary(); + struct.setQualifierIsSet(true); + struct.tput = new TPut(); + struct.tput.read(iprot); + struct.setTputIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.value = iprot.readBinary(); + struct.setValueIsSet(true); + } + } + } + + } + + public static class checkAndPut_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndPut_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new checkAndPut_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new checkAndPut_resultTupleSchemeFactory()); + } + + public boolean success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndPut_result.class, metaDataMap); + } + + public checkAndPut_result() { + } + + public checkAndPut_result( + boolean success, + TIOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public checkAndPut_result(checkAndPut_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public checkAndPut_result deepCopy() { + return new checkAndPut_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.io = null; + } + + public boolean isSuccess() { + return this.success; + } + + public checkAndPut_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public TIOError getIo() { + return this.io; + } + + public checkAndPut_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof checkAndPut_result) + return this.equals((checkAndPut_result)that); + return false; + } + + public boolean equals(checkAndPut_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(checkAndPut_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("checkAndPut_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class checkAndPut_resultStandardSchemeFactory implements SchemeFactory { + public checkAndPut_resultStandardScheme getScheme() { + return new checkAndPut_resultStandardScheme(); + } + } + + private static class checkAndPut_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndPut_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndPut_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class checkAndPut_resultTupleSchemeFactory implements SchemeFactory { + public checkAndPut_resultTupleScheme getScheme() { + return new checkAndPut_resultTupleScheme(); + } + } + + private static class checkAndPut_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, checkAndPut_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, checkAndPut_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class putMultiple_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putMultiple_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("tputs", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new putMultiple_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new putMultiple_argsTupleSchemeFactory()); + } + + /** + * the table to put data in + */ + public ByteBuffer table; // required + /** + * a list of TPuts to commit + */ + public List tputs; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the table to put data in + */ + TABLE((short)1, "table"), + /** + * a list of TPuts to commit + */ + TPUTS((short)2, "tputs"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // TPUTS + return TPUTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TPUTS, new org.apache.thrift.meta_data.FieldMetaData("tputs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPut.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putMultiple_args.class, metaDataMap); + } + + public putMultiple_args() { + } + + public putMultiple_args( + ByteBuffer table, + List tputs) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.tputs = tputs; + } + + /** + * Performs a deep copy on other. + */ + public putMultiple_args(putMultiple_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetTputs()) { + List __this__tputs = new ArrayList(other.tputs.size()); + for (TPut other_element : other.tputs) { + __this__tputs.add(new TPut(other_element)); + } + this.tputs = __this__tputs; + } + } + + public putMultiple_args deepCopy() { + return new putMultiple_args(this); + } + + @Override + public void clear() { + this.table = null; + this.tputs = null; + } + + /** + * the table to put data in + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * the table to put data in + */ + public putMultiple_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public putMultiple_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + public int getTputsSize() { + return (this.tputs == null) ? 0 : this.tputs.size(); + } + + public java.util.Iterator getTputsIterator() { + return (this.tputs == null) ? null : this.tputs.iterator(); + } + + public void addToTputs(TPut elem) { + if (this.tputs == null) { + this.tputs = new ArrayList(); + } + this.tputs.add(elem); + } + + /** + * a list of TPuts to commit + */ + public List getTputs() { + return this.tputs; + } + + /** + * a list of TPuts to commit + */ + public putMultiple_args setTputs(List tputs) { + this.tputs = tputs; + return this; + } + + public void unsetTputs() { + this.tputs = null; + } + + /** Returns true if field tputs is set (has been assigned a value) and false otherwise */ + public boolean isSetTputs() { + return this.tputs != null; + } + + public void setTputsIsSet(boolean value) { + if (!value) { + this.tputs = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case TPUTS: + if (value == null) { + unsetTputs(); + } else { + setTputs((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case TPUTS: + return getTputs(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case TPUTS: + return isSetTputs(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof putMultiple_args) + return this.equals((putMultiple_args)that); + return false; + } + + public boolean equals(putMultiple_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_tputs = true && this.isSetTputs(); + boolean that_present_tputs = true && that.isSetTputs(); + if (this_present_tputs || that_present_tputs) { + if (!(this_present_tputs && that_present_tputs)) + return false; + if (!this.tputs.equals(that.tputs)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_tputs = true && (isSetTputs()); + list.add(present_tputs); + if (present_tputs) + list.add(tputs); + + return list.hashCode(); + } + + @Override + public int compareTo(putMultiple_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTputs()).compareTo(other.isSetTputs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTputs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tputs, other.tputs); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("putMultiple_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tputs:"); + if (this.tputs == null) { + sb.append("null"); + } else { + sb.append(this.tputs); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (tputs == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tputs' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class putMultiple_argsStandardSchemeFactory implements SchemeFactory { + public putMultiple_argsStandardScheme getScheme() { + return new putMultiple_argsStandardScheme(); + } + } + + private static class putMultiple_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, putMultiple_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TPUTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list222 = iprot.readListBegin(); + struct.tputs = new ArrayList(_list222.size); + TPut _elem223; + for (int _i224 = 0; _i224 < _list222.size; ++_i224) + { + _elem223 = new TPut(); + _elem223.read(iprot); + struct.tputs.add(_elem223); + } + iprot.readListEnd(); + } + struct.setTputsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, putMultiple_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.tputs != null) { + oprot.writeFieldBegin(TPUTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tputs.size())); + for (TPut _iter225 : struct.tputs) + { + _iter225.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class putMultiple_argsTupleSchemeFactory implements SchemeFactory { + public putMultiple_argsTupleScheme getScheme() { + return new putMultiple_argsTupleScheme(); + } + } + + private static class putMultiple_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, putMultiple_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + { + oprot.writeI32(struct.tputs.size()); + for (TPut _iter226 : struct.tputs) + { + _iter226.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, putMultiple_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + { + org.apache.thrift.protocol.TList _list227 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.tputs = new ArrayList(_list227.size); + TPut _elem228; + for (int _i229 = 0; _i229 < _list227.size; ++_i229) + { + _elem228 = new TPut(); + _elem228.read(iprot); + struct.tputs.add(_elem228); + } + } + struct.setTputsIsSet(true); + } + } + + } + + public static class putMultiple_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putMultiple_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new putMultiple_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new putMultiple_resultTupleSchemeFactory()); + } + + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putMultiple_result.class, metaDataMap); + } + + public putMultiple_result() { + } + + public putMultiple_result( + TIOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public putMultiple_result(putMultiple_result other) { + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public putMultiple_result deepCopy() { + return new putMultiple_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public TIOError getIo() { + return this.io; + } + + public putMultiple_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof putMultiple_result) + return this.equals((putMultiple_result)that); + return false; + } + + public boolean equals(putMultiple_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(putMultiple_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("putMultiple_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class putMultiple_resultStandardSchemeFactory implements SchemeFactory { + public putMultiple_resultStandardScheme getScheme() { + return new putMultiple_resultStandardScheme(); + } + } + + private static class putMultiple_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, putMultiple_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, putMultiple_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class putMultiple_resultTupleSchemeFactory implements SchemeFactory { + public putMultiple_resultTupleScheme getScheme() { + return new putMultiple_resultTupleScheme(); + } + } + + private static class putMultiple_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, putMultiple_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, putMultiple_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class deleteSingle_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteSingle_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TDELETE_FIELD_DESC = new org.apache.thrift.protocol.TField("tdelete", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteSingle_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteSingle_argsTupleSchemeFactory()); + } + + /** + * the table to delete from + */ + public ByteBuffer table; // required + /** + * the TDelete to delete + */ + public TDelete tdelete; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the table to delete from + */ + TABLE((short)1, "table"), + /** + * the TDelete to delete + */ + TDELETE((short)2, "tdelete"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // TDELETE + return TDELETE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TDELETE, new org.apache.thrift.meta_data.FieldMetaData("tdelete", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDelete.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteSingle_args.class, metaDataMap); + } + + public deleteSingle_args() { + } + + public deleteSingle_args( + ByteBuffer table, + TDelete tdelete) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.tdelete = tdelete; + } + + /** + * Performs a deep copy on other. + */ + public deleteSingle_args(deleteSingle_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetTdelete()) { + this.tdelete = new TDelete(other.tdelete); + } + } + + public deleteSingle_args deepCopy() { + return new deleteSingle_args(this); + } + + @Override + public void clear() { + this.table = null; + this.tdelete = null; + } + + /** + * the table to delete from + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * the table to delete from + */ + public deleteSingle_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public deleteSingle_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + /** + * the TDelete to delete + */ + public TDelete getTdelete() { + return this.tdelete; + } + + /** + * the TDelete to delete + */ + public deleteSingle_args setTdelete(TDelete tdelete) { + this.tdelete = tdelete; + return this; + } + + public void unsetTdelete() { + this.tdelete = null; + } + + /** Returns true if field tdelete is set (has been assigned a value) and false otherwise */ + public boolean isSetTdelete() { + return this.tdelete != null; + } + + public void setTdeleteIsSet(boolean value) { + if (!value) { + this.tdelete = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case TDELETE: + if (value == null) { + unsetTdelete(); + } else { + setTdelete((TDelete)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case TDELETE: + return getTdelete(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case TDELETE: + return isSetTdelete(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteSingle_args) + return this.equals((deleteSingle_args)that); + return false; + } + + public boolean equals(deleteSingle_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_tdelete = true && this.isSetTdelete(); + boolean that_present_tdelete = true && that.isSetTdelete(); + if (this_present_tdelete || that_present_tdelete) { + if (!(this_present_tdelete && that_present_tdelete)) + return false; + if (!this.tdelete.equals(that.tdelete)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_tdelete = true && (isSetTdelete()); + list.add(present_tdelete); + if (present_tdelete) + list.add(tdelete); + + return list.hashCode(); + } + + @Override + public int compareTo(deleteSingle_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTdelete()).compareTo(other.isSetTdelete()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTdelete()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tdelete, other.tdelete); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteSingle_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tdelete:"); + if (this.tdelete == null) { + sb.append("null"); + } else { + sb.append(this.tdelete); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (tdelete == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tdelete' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (tdelete != null) { + tdelete.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteSingle_argsStandardSchemeFactory implements SchemeFactory { + public deleteSingle_argsStandardScheme getScheme() { + return new deleteSingle_argsStandardScheme(); + } + } + + private static class deleteSingle_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteSingle_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TDELETE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tdelete = new TDelete(); + struct.tdelete.read(iprot); + struct.setTdeleteIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteSingle_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.tdelete != null) { + oprot.writeFieldBegin(TDELETE_FIELD_DESC); + struct.tdelete.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteSingle_argsTupleSchemeFactory implements SchemeFactory { + public deleteSingle_argsTupleScheme getScheme() { + return new deleteSingle_argsTupleScheme(); + } + } + + private static class deleteSingle_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteSingle_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + struct.tdelete.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteSingle_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + struct.tdelete = new TDelete(); + struct.tdelete.read(iprot); + struct.setTdeleteIsSet(true); + } + } + + } + + public static class deleteSingle_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteSingle_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteSingle_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteSingle_resultTupleSchemeFactory()); + } + + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteSingle_result.class, metaDataMap); + } + + public deleteSingle_result() { + } + + public deleteSingle_result( + TIOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public deleteSingle_result(deleteSingle_result other) { + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public deleteSingle_result deepCopy() { + return new deleteSingle_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public TIOError getIo() { + return this.io; + } + + public deleteSingle_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteSingle_result) + return this.equals((deleteSingle_result)that); + return false; + } + + public boolean equals(deleteSingle_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(deleteSingle_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteSingle_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteSingle_resultStandardSchemeFactory implements SchemeFactory { + public deleteSingle_resultStandardScheme getScheme() { + return new deleteSingle_resultStandardScheme(); + } + } + + private static class deleteSingle_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteSingle_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteSingle_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteSingle_resultTupleSchemeFactory implements SchemeFactory { + public deleteSingle_resultTupleScheme getScheme() { + return new deleteSingle_resultTupleScheme(); + } + } + + private static class deleteSingle_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteSingle_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteSingle_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class deleteMultiple_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteMultiple_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TDELETES_FIELD_DESC = new org.apache.thrift.protocol.TField("tdeletes", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteMultiple_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteMultiple_argsTupleSchemeFactory()); + } + + /** + * the table to delete from + */ + public ByteBuffer table; // required + /** + * list of TDeletes to delete + */ + public List tdeletes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the table to delete from + */ + TABLE((short)1, "table"), + /** + * list of TDeletes to delete + */ + TDELETES((short)2, "tdeletes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // TDELETES + return TDELETES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TDELETES, new org.apache.thrift.meta_data.FieldMetaData("tdeletes", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDelete.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteMultiple_args.class, metaDataMap); + } + + public deleteMultiple_args() { + } + + public deleteMultiple_args( + ByteBuffer table, + List tdeletes) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.tdeletes = tdeletes; + } + + /** + * Performs a deep copy on other. + */ + public deleteMultiple_args(deleteMultiple_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetTdeletes()) { + List __this__tdeletes = new ArrayList(other.tdeletes.size()); + for (TDelete other_element : other.tdeletes) { + __this__tdeletes.add(new TDelete(other_element)); + } + this.tdeletes = __this__tdeletes; + } + } + + public deleteMultiple_args deepCopy() { + return new deleteMultiple_args(this); + } + + @Override + public void clear() { + this.table = null; + this.tdeletes = null; + } + + /** + * the table to delete from + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * the table to delete from + */ + public deleteMultiple_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public deleteMultiple_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + public int getTdeletesSize() { + return (this.tdeletes == null) ? 0 : this.tdeletes.size(); + } + + public java.util.Iterator getTdeletesIterator() { + return (this.tdeletes == null) ? null : this.tdeletes.iterator(); + } + + public void addToTdeletes(TDelete elem) { + if (this.tdeletes == null) { + this.tdeletes = new ArrayList(); + } + this.tdeletes.add(elem); + } + + /** + * list of TDeletes to delete + */ + public List getTdeletes() { + return this.tdeletes; + } + + /** + * list of TDeletes to delete + */ + public deleteMultiple_args setTdeletes(List tdeletes) { + this.tdeletes = tdeletes; + return this; + } + + public void unsetTdeletes() { + this.tdeletes = null; + } + + /** Returns true if field tdeletes is set (has been assigned a value) and false otherwise */ + public boolean isSetTdeletes() { + return this.tdeletes != null; + } + + public void setTdeletesIsSet(boolean value) { + if (!value) { + this.tdeletes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case TDELETES: + if (value == null) { + unsetTdeletes(); + } else { + setTdeletes((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case TDELETES: + return getTdeletes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case TDELETES: + return isSetTdeletes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteMultiple_args) + return this.equals((deleteMultiple_args)that); + return false; + } + + public boolean equals(deleteMultiple_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_tdeletes = true && this.isSetTdeletes(); + boolean that_present_tdeletes = true && that.isSetTdeletes(); + if (this_present_tdeletes || that_present_tdeletes) { + if (!(this_present_tdeletes && that_present_tdeletes)) + return false; + if (!this.tdeletes.equals(that.tdeletes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_tdeletes = true && (isSetTdeletes()); + list.add(present_tdeletes); + if (present_tdeletes) + list.add(tdeletes); + + return list.hashCode(); + } + + @Override + public int compareTo(deleteMultiple_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTdeletes()).compareTo(other.isSetTdeletes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTdeletes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tdeletes, other.tdeletes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteMultiple_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tdeletes:"); + if (this.tdeletes == null) { + sb.append("null"); + } else { + sb.append(this.tdeletes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (tdeletes == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tdeletes' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteMultiple_argsStandardSchemeFactory implements SchemeFactory { + public deleteMultiple_argsStandardScheme getScheme() { + return new deleteMultiple_argsStandardScheme(); + } + } + + private static class deleteMultiple_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteMultiple_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TDELETES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list230 = iprot.readListBegin(); + struct.tdeletes = new ArrayList(_list230.size); + TDelete _elem231; + for (int _i232 = 0; _i232 < _list230.size; ++_i232) + { + _elem231 = new TDelete(); + _elem231.read(iprot); + struct.tdeletes.add(_elem231); + } + iprot.readListEnd(); + } + struct.setTdeletesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteMultiple_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.tdeletes != null) { + oprot.writeFieldBegin(TDELETES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tdeletes.size())); + for (TDelete _iter233 : struct.tdeletes) + { + _iter233.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteMultiple_argsTupleSchemeFactory implements SchemeFactory { + public deleteMultiple_argsTupleScheme getScheme() { + return new deleteMultiple_argsTupleScheme(); + } + } + + private static class deleteMultiple_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteMultiple_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + { + oprot.writeI32(struct.tdeletes.size()); + for (TDelete _iter234 : struct.tdeletes) + { + _iter234.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteMultiple_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + { + org.apache.thrift.protocol.TList _list235 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.tdeletes = new ArrayList(_list235.size); + TDelete _elem236; + for (int _i237 = 0; _i237 < _list235.size; ++_i237) + { + _elem236 = new TDelete(); + _elem236.read(iprot); + struct.tdeletes.add(_elem236); + } + } + struct.setTdeletesIsSet(true); + } + } + + } + + public static class deleteMultiple_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteMultiple_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteMultiple_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteMultiple_resultTupleSchemeFactory()); + } + + public List success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDelete.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteMultiple_result.class, metaDataMap); + } + + public deleteMultiple_result() { + } + + public deleteMultiple_result( + List success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public deleteMultiple_result(deleteMultiple_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (TDelete other_element : other.success) { + __this__success.add(new TDelete(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public deleteMultiple_result deepCopy() { + return new deleteMultiple_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TDelete elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public deleteMultiple_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public deleteMultiple_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteMultiple_result) + return this.equals((deleteMultiple_result)that); + return false; + } + + public boolean equals(deleteMultiple_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(deleteMultiple_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteMultiple_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteMultiple_resultStandardSchemeFactory implements SchemeFactory { + public deleteMultiple_resultStandardScheme getScheme() { + return new deleteMultiple_resultStandardScheme(); + } + } + + private static class deleteMultiple_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteMultiple_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list238 = iprot.readListBegin(); + struct.success = new ArrayList(_list238.size); + TDelete _elem239; + for (int _i240 = 0; _i240 < _list238.size; ++_i240) + { + _elem239 = new TDelete(); + _elem239.read(iprot); + struct.success.add(_elem239); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteMultiple_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TDelete _iter241 : struct.success) + { + _iter241.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteMultiple_resultTupleSchemeFactory implements SchemeFactory { + public deleteMultiple_resultTupleScheme getScheme() { + return new deleteMultiple_resultTupleScheme(); + } + } + + private static class deleteMultiple_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteMultiple_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TDelete _iter242 : struct.success) + { + _iter242.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteMultiple_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list243 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list243.size); + TDelete _elem244; + for (int _i245 = 0; _i245 < _list243.size; ++_i245) + { + _elem244 = new TDelete(); + _elem244.read(iprot); + struct.success.add(_elem244); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class checkAndDelete_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndDelete_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField TDELETE_FIELD_DESC = new org.apache.thrift.protocol.TField("tdelete", org.apache.thrift.protocol.TType.STRUCT, (short)6); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new checkAndDelete_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new checkAndDelete_argsTupleSchemeFactory()); + } + + /** + * to check in and delete from + */ + public ByteBuffer table; // required + /** + * row to check + */ + public ByteBuffer row; // required + /** + * column family to check + */ + public ByteBuffer family; // required + /** + * column qualifier to check + */ + public ByteBuffer qualifier; // required + /** + * the expected value, if not provided the + * check is for the non-existence of the + * column in question + */ + public ByteBuffer value; // required + /** + * the TDelete to execute if the check succeeds + */ + public TDelete tdelete; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * to check in and delete from + */ + TABLE((short)1, "table"), + /** + * row to check + */ + ROW((short)2, "row"), + /** + * column family to check + */ + FAMILY((short)3, "family"), + /** + * column qualifier to check + */ + QUALIFIER((short)4, "qualifier"), + /** + * the expected value, if not provided the + * check is for the non-existence of the + * column in question + */ + VALUE((short)5, "value"), + /** + * the TDelete to execute if the check succeeds + */ + TDELETE((short)6, "tdelete"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // ROW + return ROW; + case 3: // FAMILY + return FAMILY; + case 4: // QUALIFIER + return QUALIFIER; + case 5: // VALUE + return VALUE; + case 6: // TDELETE + return TDELETE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.FAMILY, new org.apache.thrift.meta_data.FieldMetaData("family", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TDELETE, new org.apache.thrift.meta_data.FieldMetaData("tdelete", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDelete.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndDelete_args.class, metaDataMap); + } + + public checkAndDelete_args() { + } + + public checkAndDelete_args( + ByteBuffer table, + ByteBuffer row, + ByteBuffer family, + ByteBuffer qualifier, + ByteBuffer value, + TDelete tdelete) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.row = org.apache.thrift.TBaseHelper.copyBinary(row); + this.family = org.apache.thrift.TBaseHelper.copyBinary(family); + this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); + this.value = org.apache.thrift.TBaseHelper.copyBinary(value); + this.tdelete = tdelete; + } + + /** + * Performs a deep copy on other. + */ + public checkAndDelete_args(checkAndDelete_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetRow()) { + this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); + } + if (other.isSetFamily()) { + this.family = org.apache.thrift.TBaseHelper.copyBinary(other.family); + } + if (other.isSetQualifier()) { + this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier); + } + if (other.isSetValue()) { + this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); + } + if (other.isSetTdelete()) { + this.tdelete = new TDelete(other.tdelete); + } + } + + public checkAndDelete_args deepCopy() { + return new checkAndDelete_args(this); + } + + @Override + public void clear() { + this.table = null; + this.row = null; + this.family = null; + this.qualifier = null; + this.value = null; + this.tdelete = null; + } + + /** + * to check in and delete from + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * to check in and delete from + */ + public checkAndDelete_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public checkAndDelete_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + /** + * row to check + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return org.apache.thrift.TBaseHelper.copyBinary(row); + } + + /** + * row to check + */ + public checkAndDelete_args setRow(byte[] row) { + this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length)); + return this; + } + + public checkAndDelete_args setRow(ByteBuffer row) { + this.row = org.apache.thrift.TBaseHelper.copyBinary(row); + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + /** + * column family to check + */ + public byte[] getFamily() { + setFamily(org.apache.thrift.TBaseHelper.rightSize(family)); + return family == null ? null : family.array(); + } + + public ByteBuffer bufferForFamily() { + return org.apache.thrift.TBaseHelper.copyBinary(family); + } + + /** + * column family to check + */ + public checkAndDelete_args setFamily(byte[] family) { + this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length)); + return this; + } + + public checkAndDelete_args setFamily(ByteBuffer family) { + this.family = org.apache.thrift.TBaseHelper.copyBinary(family); + return this; + } + + public void unsetFamily() { + this.family = null; + } + + /** Returns true if field family is set (has been assigned a value) and false otherwise */ + public boolean isSetFamily() { + return this.family != null; + } + + public void setFamilyIsSet(boolean value) { + if (!value) { + this.family = null; + } + } + + /** + * column qualifier to check + */ + public byte[] getQualifier() { + setQualifier(org.apache.thrift.TBaseHelper.rightSize(qualifier)); + return qualifier == null ? null : qualifier.array(); + } + + public ByteBuffer bufferForQualifier() { + return org.apache.thrift.TBaseHelper.copyBinary(qualifier); + } + + /** + * column qualifier to check + */ + public checkAndDelete_args setQualifier(byte[] qualifier) { + this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length)); + return this; + } + + public checkAndDelete_args setQualifier(ByteBuffer qualifier) { + this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); + return this; + } + + public void unsetQualifier() { + this.qualifier = null; + } + + /** Returns true if field qualifier is set (has been assigned a value) and false otherwise */ + public boolean isSetQualifier() { + return this.qualifier != null; + } + + public void setQualifierIsSet(boolean value) { + if (!value) { + this.qualifier = null; + } + } + + /** + * the expected value, if not provided the + * check is for the non-existence of the + * column in question + */ + public byte[] getValue() { + setValue(org.apache.thrift.TBaseHelper.rightSize(value)); + return value == null ? null : value.array(); + } + + public ByteBuffer bufferForValue() { + return org.apache.thrift.TBaseHelper.copyBinary(value); + } + + /** + * the expected value, if not provided the + * check is for the non-existence of the + * column in question + */ + public checkAndDelete_args setValue(byte[] value) { + this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length)); + return this; + } + + public checkAndDelete_args setValue(ByteBuffer value) { + this.value = org.apache.thrift.TBaseHelper.copyBinary(value); + return this; + } + + public void unsetValue() { + this.value = null; + } + + /** Returns true if field value is set (has been assigned a value) and false otherwise */ + public boolean isSetValue() { + return this.value != null; + } + + public void setValueIsSet(boolean value) { + if (!value) { + this.value = null; + } + } + + /** + * the TDelete to execute if the check succeeds + */ + public TDelete getTdelete() { + return this.tdelete; + } + + /** + * the TDelete to execute if the check succeeds + */ + public checkAndDelete_args setTdelete(TDelete tdelete) { + this.tdelete = tdelete; + return this; + } + + public void unsetTdelete() { + this.tdelete = null; + } + + /** Returns true if field tdelete is set (has been assigned a value) and false otherwise */ + public boolean isSetTdelete() { + return this.tdelete != null; + } + + public void setTdeleteIsSet(boolean value) { + if (!value) { + this.tdelete = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case FAMILY: + if (value == null) { + unsetFamily(); + } else { + setFamily((ByteBuffer)value); + } + break; + + case QUALIFIER: + if (value == null) { + unsetQualifier(); + } else { + setQualifier((ByteBuffer)value); + } + break; + + case VALUE: + if (value == null) { + unsetValue(); + } else { + setValue((ByteBuffer)value); + } + break; + + case TDELETE: + if (value == null) { + unsetTdelete(); + } else { + setTdelete((TDelete)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case ROW: + return getRow(); + + case FAMILY: + return getFamily(); + + case QUALIFIER: + return getQualifier(); + + case VALUE: + return getValue(); + + case TDELETE: + return getTdelete(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case ROW: + return isSetRow(); + case FAMILY: + return isSetFamily(); + case QUALIFIER: + return isSetQualifier(); + case VALUE: + return isSetValue(); + case TDELETE: + return isSetTdelete(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof checkAndDelete_args) + return this.equals((checkAndDelete_args)that); + return false; + } + + public boolean equals(checkAndDelete_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_family = true && this.isSetFamily(); + boolean that_present_family = true && that.isSetFamily(); + if (this_present_family || that_present_family) { + if (!(this_present_family && that_present_family)) + return false; + if (!this.family.equals(that.family)) + return false; + } + + boolean this_present_qualifier = true && this.isSetQualifier(); + boolean that_present_qualifier = true && that.isSetQualifier(); + if (this_present_qualifier || that_present_qualifier) { + if (!(this_present_qualifier && that_present_qualifier)) + return false; + if (!this.qualifier.equals(that.qualifier)) + return false; + } + + 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; + if (!this.value.equals(that.value)) + return false; + } + + boolean this_present_tdelete = true && this.isSetTdelete(); + boolean that_present_tdelete = true && that.isSetTdelete(); + if (this_present_tdelete || that_present_tdelete) { + if (!(this_present_tdelete && that_present_tdelete)) + return false; + if (!this.tdelete.equals(that.tdelete)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_row = true && (isSetRow()); + list.add(present_row); + if (present_row) + list.add(row); + + boolean present_family = true && (isSetFamily()); + list.add(present_family); + if (present_family) + list.add(family); + + boolean present_qualifier = true && (isSetQualifier()); + list.add(present_qualifier); + if (present_qualifier) + list.add(qualifier); + + boolean present_value = true && (isSetValue()); + list.add(present_value); + if (present_value) + list.add(value); + + boolean present_tdelete = true && (isSetTdelete()); + list.add(present_tdelete); + if (present_tdelete) + list.add(tdelete); + + return list.hashCode(); + } + + @Override + public int compareTo(checkAndDelete_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFamily()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, other.family); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQualifier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTdelete()).compareTo(other.isSetTdelete()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTdelete()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tdelete, other.tdelete); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("checkAndDelete_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.row, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("family:"); + if (this.family == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.family, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("qualifier:"); + if (this.qualifier == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.qualifier, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("value:"); + if (this.value == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.value, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tdelete:"); + if (this.tdelete == null) { + sb.append("null"); + } else { + sb.append(this.tdelete); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (row == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString()); + } + if (family == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'family' was not present! Struct: " + toString()); + } + if (qualifier == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifier' was not present! Struct: " + toString()); + } + if (tdelete == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tdelete' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (tdelete != null) { + tdelete.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class checkAndDelete_argsStandardSchemeFactory implements SchemeFactory { + public checkAndDelete_argsStandardScheme getScheme() { + return new checkAndDelete_argsStandardScheme(); + } + } + + private static class checkAndDelete_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndDelete_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FAMILY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.family = iprot.readBinary(); + struct.setFamilyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // QUALIFIER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.qualifier = iprot.readBinary(); + struct.setQualifierIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.value = iprot.readBinary(); + struct.setValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // TDELETE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tdelete = new TDelete(); + struct.tdelete.read(iprot); + struct.setTdeleteIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndDelete_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.family != null) { + oprot.writeFieldBegin(FAMILY_FIELD_DESC); + oprot.writeBinary(struct.family); + oprot.writeFieldEnd(); + } + if (struct.qualifier != null) { + oprot.writeFieldBegin(QUALIFIER_FIELD_DESC); + oprot.writeBinary(struct.qualifier); + oprot.writeFieldEnd(); + } + if (struct.value != null) { + oprot.writeFieldBegin(VALUE_FIELD_DESC); + oprot.writeBinary(struct.value); + oprot.writeFieldEnd(); + } + if (struct.tdelete != null) { + oprot.writeFieldBegin(TDELETE_FIELD_DESC); + struct.tdelete.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class checkAndDelete_argsTupleSchemeFactory implements SchemeFactory { + public checkAndDelete_argsTupleScheme getScheme() { + return new checkAndDelete_argsTupleScheme(); + } + } + + private static class checkAndDelete_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + oprot.writeBinary(struct.row); + oprot.writeBinary(struct.family); + oprot.writeBinary(struct.qualifier); + struct.tdelete.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetValue()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetValue()) { + oprot.writeBinary(struct.value); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + struct.family = iprot.readBinary(); + struct.setFamilyIsSet(true); + struct.qualifier = iprot.readBinary(); + struct.setQualifierIsSet(true); + struct.tdelete = new TDelete(); + struct.tdelete.read(iprot); + struct.setTdeleteIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.value = iprot.readBinary(); + struct.setValueIsSet(true); + } + } + } + + } + + public static class checkAndDelete_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndDelete_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new checkAndDelete_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new checkAndDelete_resultTupleSchemeFactory()); + } + + public boolean success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndDelete_result.class, metaDataMap); + } + + public checkAndDelete_result() { + } + + public checkAndDelete_result( + boolean success, + TIOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public checkAndDelete_result(checkAndDelete_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public checkAndDelete_result deepCopy() { + return new checkAndDelete_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.io = null; + } + + public boolean isSuccess() { + return this.success; + } + + public checkAndDelete_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public TIOError getIo() { + return this.io; + } + + public checkAndDelete_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof checkAndDelete_result) + return this.equals((checkAndDelete_result)that); + return false; + } + + public boolean equals(checkAndDelete_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(checkAndDelete_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("checkAndDelete_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class checkAndDelete_resultStandardSchemeFactory implements SchemeFactory { + public checkAndDelete_resultStandardScheme getScheme() { + return new checkAndDelete_resultStandardScheme(); + } + } + + private static class checkAndDelete_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndDelete_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndDelete_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class checkAndDelete_resultTupleSchemeFactory implements SchemeFactory { + public checkAndDelete_resultTupleScheme getScheme() { + return new checkAndDelete_resultTupleScheme(); + } + } + + private static class checkAndDelete_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class increment_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("increment_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TINCREMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("tincrement", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new increment_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new increment_argsTupleSchemeFactory()); + } + + /** + * the table to increment the value on + */ + public ByteBuffer table; // required + /** + * the TIncrement to increment + */ + public TIncrement tincrement; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the table to increment the value on + */ + TABLE((short)1, "table"), + /** + * the TIncrement to increment + */ + TINCREMENT((short)2, "tincrement"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // TINCREMENT + return TINCREMENT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TINCREMENT, new org.apache.thrift.meta_data.FieldMetaData("tincrement", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TIncrement.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(increment_args.class, metaDataMap); + } + + public increment_args() { + } + + public increment_args( + ByteBuffer table, + TIncrement tincrement) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.tincrement = tincrement; + } + + /** + * Performs a deep copy on other. + */ + public increment_args(increment_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetTincrement()) { + this.tincrement = new TIncrement(other.tincrement); + } + } + + public increment_args deepCopy() { + return new increment_args(this); + } + + @Override + public void clear() { + this.table = null; + this.tincrement = null; + } + + /** + * the table to increment the value on + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * the table to increment the value on + */ + public increment_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public increment_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + /** + * the TIncrement to increment + */ + public TIncrement getTincrement() { + return this.tincrement; + } + + /** + * the TIncrement to increment + */ + public increment_args setTincrement(TIncrement tincrement) { + this.tincrement = tincrement; + return this; + } + + public void unsetTincrement() { + this.tincrement = null; + } + + /** Returns true if field tincrement is set (has been assigned a value) and false otherwise */ + public boolean isSetTincrement() { + return this.tincrement != null; + } + + public void setTincrementIsSet(boolean value) { + if (!value) { + this.tincrement = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case TINCREMENT: + if (value == null) { + unsetTincrement(); + } else { + setTincrement((TIncrement)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case TINCREMENT: + return getTincrement(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case TINCREMENT: + return isSetTincrement(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof increment_args) + return this.equals((increment_args)that); + return false; + } + + public boolean equals(increment_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_tincrement = true && this.isSetTincrement(); + boolean that_present_tincrement = true && that.isSetTincrement(); + if (this_present_tincrement || that_present_tincrement) { + if (!(this_present_tincrement && that_present_tincrement)) + return false; + if (!this.tincrement.equals(that.tincrement)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_tincrement = true && (isSetTincrement()); + list.add(present_tincrement); + if (present_tincrement) + list.add(tincrement); + + return list.hashCode(); + } + + @Override + public int compareTo(increment_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTincrement()).compareTo(other.isSetTincrement()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTincrement()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tincrement, other.tincrement); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("increment_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tincrement:"); + if (this.tincrement == null) { + sb.append("null"); + } else { + sb.append(this.tincrement); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (tincrement == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tincrement' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (tincrement != null) { + tincrement.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class increment_argsStandardSchemeFactory implements SchemeFactory { + public increment_argsStandardScheme getScheme() { + return new increment_argsStandardScheme(); + } + } + + private static class increment_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, increment_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TINCREMENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tincrement = new TIncrement(); + struct.tincrement.read(iprot); + struct.setTincrementIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, increment_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.tincrement != null) { + oprot.writeFieldBegin(TINCREMENT_FIELD_DESC); + struct.tincrement.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class increment_argsTupleSchemeFactory implements SchemeFactory { + public increment_argsTupleScheme getScheme() { + return new increment_argsTupleScheme(); + } + } + + private static class increment_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, increment_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + struct.tincrement.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, increment_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + struct.tincrement = new TIncrement(); + struct.tincrement.read(iprot); + struct.setTincrementIsSet(true); + } + } + + } + + public static class increment_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("increment_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new increment_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new increment_resultTupleSchemeFactory()); + } + + public TResult success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(increment_result.class, metaDataMap); + } + + public increment_result() { + } + + public increment_result( + TResult success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public increment_result(increment_result other) { + if (other.isSetSuccess()) { + this.success = new TResult(other.success); + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public increment_result deepCopy() { + return new increment_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public TResult getSuccess() { + return this.success; + } + + public increment_result setSuccess(TResult success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public increment_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TResult)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof increment_result) + return this.equals((increment_result)that); + return false; + } + + public boolean equals(increment_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(increment_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("increment_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class increment_resultStandardSchemeFactory implements SchemeFactory { + public increment_resultStandardScheme getScheme() { + return new increment_resultStandardScheme(); + } + } + + private static class increment_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, increment_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, increment_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class increment_resultTupleSchemeFactory implements SchemeFactory { + public increment_resultTupleScheme getScheme() { + return new increment_resultTupleScheme(); + } + } + + private static class increment_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, increment_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, increment_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new TResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class append_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TAPPEND_FIELD_DESC = new org.apache.thrift.protocol.TField("tappend", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new append_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_argsTupleSchemeFactory()); + } + + /** + * the table to append the value on + */ + public ByteBuffer table; // required + /** + * the TAppend to append + */ + public TAppend tappend; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the table to append the value on + */ + TABLE((short)1, "table"), + /** + * the TAppend to append + */ + TAPPEND((short)2, "tappend"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // TAPPEND + return TAPPEND; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TAPPEND, new org.apache.thrift.meta_data.FieldMetaData("tappend", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAppend.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_args.class, metaDataMap); + } + + public append_args() { + } + + public append_args( + ByteBuffer table, + TAppend tappend) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.tappend = tappend; + } + + /** + * Performs a deep copy on other. + */ + public append_args(append_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetTappend()) { + this.tappend = new TAppend(other.tappend); + } + } + + public append_args deepCopy() { + return new append_args(this); + } + + @Override + public void clear() { + this.table = null; + this.tappend = null; + } + + /** + * the table to append the value on + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * the table to append the value on + */ + public append_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public append_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + /** + * the TAppend to append + */ + public TAppend getTappend() { + return this.tappend; + } + + /** + * the TAppend to append + */ + public append_args setTappend(TAppend tappend) { + this.tappend = tappend; + return this; + } + + public void unsetTappend() { + this.tappend = null; + } + + /** Returns true if field tappend is set (has been assigned a value) and false otherwise */ + public boolean isSetTappend() { + return this.tappend != null; + } + + public void setTappendIsSet(boolean value) { + if (!value) { + this.tappend = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case TAPPEND: + if (value == null) { + unsetTappend(); + } else { + setTappend((TAppend)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case TAPPEND: + return getTappend(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case TAPPEND: + return isSetTappend(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_args) + return this.equals((append_args)that); + return false; + } + + public boolean equals(append_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_tappend = true && this.isSetTappend(); + boolean that_present_tappend = true && that.isSetTappend(); + if (this_present_tappend || that_present_tappend) { + if (!(this_present_tappend && that_present_tappend)) + return false; + if (!this.tappend.equals(that.tappend)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_tappend = true && (isSetTappend()); + list.add(present_tappend); + if (present_tappend) + list.add(tappend); + + return list.hashCode(); + } + + @Override + public int compareTo(append_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTappend()).compareTo(other.isSetTappend()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTappend()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tappend, other.tappend); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tappend:"); + if (this.tappend == null) { + sb.append("null"); + } else { + sb.append(this.tappend); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (tappend == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tappend' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (tappend != null) { + tappend.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class append_argsStandardSchemeFactory implements SchemeFactory { + public append_argsStandardScheme getScheme() { + return new append_argsStandardScheme(); + } + } + + private static class append_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TAPPEND + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tappend = new TAppend(); + struct.tappend.read(iprot); + struct.setTappendIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, append_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.tappend != null) { + oprot.writeFieldBegin(TAPPEND_FIELD_DESC); + struct.tappend.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class append_argsTupleSchemeFactory implements SchemeFactory { + public append_argsTupleScheme getScheme() { + return new append_argsTupleScheme(); + } + } + + private static class append_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + struct.tappend.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, append_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + struct.tappend = new TAppend(); + struct.tappend.read(iprot); + struct.setTappendIsSet(true); + } + } + + } + + public static class append_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new append_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_resultTupleSchemeFactory()); + } + + public TResult success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_result.class, metaDataMap); + } + + public append_result() { + } + + public append_result( + TResult success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public append_result(append_result other) { + if (other.isSetSuccess()) { + this.success = new TResult(other.success); + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public append_result deepCopy() { + return new append_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public TResult getSuccess() { + return this.success; + } + + public append_result setSuccess(TResult success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public append_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TResult)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_result) + return this.equals((append_result)that); + return false; + } + + public boolean equals(append_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(append_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class append_resultStandardSchemeFactory implements SchemeFactory { + public append_resultStandardScheme getScheme() { + return new append_resultStandardScheme(); + } + } + + private static class append_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, append_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class append_resultTupleSchemeFactory implements SchemeFactory { + public append_resultTupleScheme getScheme() { + return new append_resultTupleScheme(); + } + } + + private static class append_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, append_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new TResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class openScanner_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openScanner_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TSCAN_FIELD_DESC = new org.apache.thrift.protocol.TField("tscan", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new openScanner_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new openScanner_argsTupleSchemeFactory()); + } + + /** + * the table to get the Scanner for + */ + public ByteBuffer table; // required + /** + * the scan object to get a Scanner for + */ + public TScan tscan; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the table to get the Scanner for + */ + TABLE((short)1, "table"), + /** + * the scan object to get a Scanner for + */ + TSCAN((short)2, "tscan"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // TSCAN + return TSCAN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TSCAN, new org.apache.thrift.meta_data.FieldMetaData("tscan", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TScan.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openScanner_args.class, metaDataMap); + } + + public openScanner_args() { + } + + public openScanner_args( + ByteBuffer table, + TScan tscan) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.tscan = tscan; + } + + /** + * Performs a deep copy on other. + */ + public openScanner_args(openScanner_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetTscan()) { + this.tscan = new TScan(other.tscan); + } + } + + public openScanner_args deepCopy() { + return new openScanner_args(this); + } + + @Override + public void clear() { + this.table = null; + this.tscan = null; + } + + /** + * the table to get the Scanner for + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * the table to get the Scanner for + */ + public openScanner_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public openScanner_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + /** + * the scan object to get a Scanner for + */ + public TScan getTscan() { + return this.tscan; + } + + /** + * the scan object to get a Scanner for + */ + public openScanner_args setTscan(TScan tscan) { + this.tscan = tscan; + return this; + } + + public void unsetTscan() { + this.tscan = null; + } + + /** Returns true if field tscan is set (has been assigned a value) and false otherwise */ + public boolean isSetTscan() { + return this.tscan != null; + } + + public void setTscanIsSet(boolean value) { + if (!value) { + this.tscan = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case TSCAN: + if (value == null) { + unsetTscan(); + } else { + setTscan((TScan)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case TSCAN: + return getTscan(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case TSCAN: + return isSetTscan(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof openScanner_args) + return this.equals((openScanner_args)that); + return false; + } + + public boolean equals(openScanner_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_tscan = true && this.isSetTscan(); + boolean that_present_tscan = true && that.isSetTscan(); + if (this_present_tscan || that_present_tscan) { + if (!(this_present_tscan && that_present_tscan)) + return false; + if (!this.tscan.equals(that.tscan)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_tscan = true && (isSetTscan()); + list.add(present_tscan); + if (present_tscan) + list.add(tscan); + + return list.hashCode(); + } + + @Override + public int compareTo(openScanner_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTscan()).compareTo(other.isSetTscan()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTscan()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tscan, other.tscan); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("openScanner_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tscan:"); + if (this.tscan == null) { + sb.append("null"); + } else { + sb.append(this.tscan); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (tscan == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tscan' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (tscan != null) { + tscan.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class openScanner_argsStandardSchemeFactory implements SchemeFactory { + public openScanner_argsStandardScheme getScheme() { + return new openScanner_argsStandardScheme(); + } + } + + private static class openScanner_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, openScanner_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TSCAN + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tscan = new TScan(); + struct.tscan.read(iprot); + struct.setTscanIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, openScanner_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.tscan != null) { + oprot.writeFieldBegin(TSCAN_FIELD_DESC); + struct.tscan.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class openScanner_argsTupleSchemeFactory implements SchemeFactory { + public openScanner_argsTupleScheme getScheme() { + return new openScanner_argsTupleScheme(); + } + } + + private static class openScanner_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, openScanner_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + struct.tscan.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, openScanner_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + struct.tscan = new TScan(); + struct.tscan.read(iprot); + struct.setTscanIsSet(true); + } + } + + } + + public static class openScanner_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openScanner_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new openScanner_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new openScanner_resultTupleSchemeFactory()); + } + + public int success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openScanner_result.class, metaDataMap); + } + + public openScanner_result() { + } + + public openScanner_result( + int success, + TIOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public openScanner_result(openScanner_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public openScanner_result deepCopy() { + return new openScanner_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; + } + + public int getSuccess() { + return this.success; + } + + public openScanner_result setSuccess(int success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public TIOError getIo() { + return this.io; + } + + public openScanner_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof openScanner_result) + return this.equals((openScanner_result)that); + return false; + } + + public boolean equals(openScanner_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(openScanner_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("openScanner_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class openScanner_resultStandardSchemeFactory implements SchemeFactory { + public openScanner_resultStandardScheme getScheme() { + return new openScanner_resultStandardScheme(); + } + } + + private static class openScanner_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, openScanner_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, openScanner_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(struct.success); + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class openScanner_resultTupleSchemeFactory implements SchemeFactory { + public openScanner_resultTupleScheme getScheme() { + return new openScanner_resultTupleScheme(); + } + } + + private static class openScanner_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, openScanner_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeI32(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, openScanner_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getScannerRows_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScannerRows_args"); + + private static final org.apache.thrift.protocol.TField SCANNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scannerId", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField NUM_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("numRows", org.apache.thrift.protocol.TType.I32, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getScannerRows_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getScannerRows_argsTupleSchemeFactory()); + } + + /** + * the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. + */ + public int scannerId; // required + /** + * number of rows to return + */ + public int numRows; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. + */ + SCANNER_ID((short)1, "scannerId"), + /** + * number of rows to return + */ + NUM_ROWS((short)2, "numRows"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SCANNER_ID + return SCANNER_ID; + case 2: // NUM_ROWS + return NUM_ROWS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SCANNERID_ISSET_ID = 0; + private static final int __NUMROWS_ISSET_ID = 1; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SCANNER_ID, new org.apache.thrift.meta_data.FieldMetaData("scannerId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.NUM_ROWS, new org.apache.thrift.meta_data.FieldMetaData("numRows", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScannerRows_args.class, metaDataMap); + } + + public getScannerRows_args() { + this.numRows = 1; + + } + + public getScannerRows_args( + int scannerId, + int numRows) + { + this(); + this.scannerId = scannerId; + setScannerIdIsSet(true); + this.numRows = numRows; + setNumRowsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public getScannerRows_args(getScannerRows_args other) { + __isset_bitfield = other.__isset_bitfield; + this.scannerId = other.scannerId; + this.numRows = other.numRows; + } + + public getScannerRows_args deepCopy() { + return new getScannerRows_args(this); + } + + @Override + public void clear() { + setScannerIdIsSet(false); + this.scannerId = 0; + this.numRows = 1; + + } + + /** + * the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. + */ + public int getScannerId() { + return this.scannerId; + } + + /** + * the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. + */ + public getScannerRows_args setScannerId(int scannerId) { + this.scannerId = scannerId; + setScannerIdIsSet(true); + return this; + } + + public void unsetScannerId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCANNERID_ISSET_ID); + } + + /** Returns true if field scannerId is set (has been assigned a value) and false otherwise */ + public boolean isSetScannerId() { + return EncodingUtils.testBit(__isset_bitfield, __SCANNERID_ISSET_ID); + } + + public void setScannerIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCANNERID_ISSET_ID, value); + } + + /** + * number of rows to return + */ + public int getNumRows() { + return this.numRows; + } + + /** + * number of rows to return + */ + public getScannerRows_args setNumRows(int numRows) { + this.numRows = numRows; + setNumRowsIsSet(true); + return this; + } + + public void unsetNumRows() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMROWS_ISSET_ID); + } + + /** Returns true if field numRows is set (has been assigned a value) and false otherwise */ + public boolean isSetNumRows() { + return EncodingUtils.testBit(__isset_bitfield, __NUMROWS_ISSET_ID); + } + + public void setNumRowsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMROWS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SCANNER_ID: + if (value == null) { + unsetScannerId(); + } else { + setScannerId((Integer)value); + } + break; + + case NUM_ROWS: + if (value == null) { + unsetNumRows(); + } else { + setNumRows((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SCANNER_ID: + return getScannerId(); + + case NUM_ROWS: + return getNumRows(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SCANNER_ID: + return isSetScannerId(); + case NUM_ROWS: + return isSetNumRows(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getScannerRows_args) + return this.equals((getScannerRows_args)that); + return false; + } + + public boolean equals(getScannerRows_args that) { + if (that == null) + return false; + + boolean this_present_scannerId = true; + boolean that_present_scannerId = true; + if (this_present_scannerId || that_present_scannerId) { + if (!(this_present_scannerId && that_present_scannerId)) + return false; + if (this.scannerId != that.scannerId) + return false; + } + + boolean this_present_numRows = true; + boolean that_present_numRows = true; + if (this_present_numRows || that_present_numRows) { + if (!(this_present_numRows && that_present_numRows)) + return false; + if (this.numRows != that.numRows) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_scannerId = true; + list.add(present_scannerId); + if (present_scannerId) + list.add(scannerId); + + boolean present_numRows = true; + list.add(present_numRows); + if (present_numRows) + list.add(numRows); + + return list.hashCode(); + } + + @Override + public int compareTo(getScannerRows_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetScannerId()).compareTo(other.isSetScannerId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetScannerId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scannerId, other.scannerId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumRows()).compareTo(other.isSetNumRows()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumRows()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numRows, other.numRows); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getScannerRows_args("); + boolean first = true; + + sb.append("scannerId:"); + sb.append(this.scannerId); + first = false; + if (!first) sb.append(", "); + sb.append("numRows:"); + sb.append(this.numRows); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'scannerId' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getScannerRows_argsStandardSchemeFactory implements SchemeFactory { + public getScannerRows_argsStandardScheme getScheme() { + return new getScannerRows_argsStandardScheme(); + } + } + + private static class getScannerRows_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerRows_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SCANNER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.scannerId = iprot.readI32(); + struct.setScannerIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NUM_ROWS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.numRows = iprot.readI32(); + struct.setNumRowsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetScannerId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'scannerId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getScannerRows_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SCANNER_ID_FIELD_DESC); + oprot.writeI32(struct.scannerId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC); + oprot.writeI32(struct.numRows); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getScannerRows_argsTupleSchemeFactory implements SchemeFactory { + public getScannerRows_argsTupleScheme getScheme() { + return new getScannerRows_argsTupleScheme(); + } + } + + private static class getScannerRows_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getScannerRows_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI32(struct.scannerId); + BitSet optionals = new BitSet(); + if (struct.isSetNumRows()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetNumRows()) { + oprot.writeI32(struct.numRows); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getScannerRows_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.scannerId = iprot.readI32(); + struct.setScannerIdIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.numRows = iprot.readI32(); + struct.setNumRowsIsSet(true); + } + } + } + + } + + public static class getScannerRows_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScannerRows_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getScannerRows_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getScannerRows_resultTupleSchemeFactory()); + } + + public List success; // required + public TIOError io; // required + /** + * if the scannerId is invalid + */ + public TIllegalArgument ia; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"), + /** + * if the scannerId is invalid + */ + IA((short)2, "ia"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScannerRows_result.class, metaDataMap); + } + + public getScannerRows_result() { + } + + public getScannerRows_result( + List success, + TIOError io, + TIllegalArgument ia) + { + this(); + this.success = success; + this.io = io; + this.ia = ia; + } + + /** + * Performs a deep copy on other. + */ + public getScannerRows_result(getScannerRows_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (TResult other_element : other.success) { + __this__success.add(new TResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + if (other.isSetIa()) { + this.ia = new TIllegalArgument(other.ia); + } + } + + public getScannerRows_result deepCopy() { + return new getScannerRows_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + this.ia = null; + } + + 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(TResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getScannerRows_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public getScannerRows_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + /** + * if the scannerId is invalid + */ + public TIllegalArgument getIa() { + return this.ia; + } + + /** + * if the scannerId is invalid + */ + public getScannerRows_result setIa(TIllegalArgument ia) { + this.ia = ia; + return this; + } + + public void unsetIa() { + this.ia = null; + } + + /** Returns true if field ia is set (has been assigned 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(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((TIllegalArgument)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + case IA: + return getIa(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + case IA: + return isSetIa(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getScannerRows_result) + return this.equals((getScannerRows_result)that); + return false; + } + + public boolean equals(getScannerRows_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + 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; + if (!this.ia.equals(that.ia)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + boolean present_ia = true && (isSetIa()); + list.add(present_ia); + if (present_ia) + list.add(ia); + + return list.hashCode(); + } + + @Override + public int compareTo(getScannerRows_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIa()).compareTo(other.isSetIa()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIa()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, other.ia); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getScannerRows_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + 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 org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getScannerRows_resultStandardSchemeFactory implements SchemeFactory { + public getScannerRows_resultStandardScheme getScheme() { + return new getScannerRows_resultStandardScheme(); + } + } + + private static class getScannerRows_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerRows_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list246 = iprot.readListBegin(); + struct.success = new ArrayList(_list246.size); + TResult _elem247; + for (int _i248 = 0; _i248 < _list246.size; ++_i248) + { + _elem247 = new TResult(); + _elem247.read(iprot); + struct.success.add(_elem247); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ia = new TIllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getScannerRows_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TResult _iter249 : struct.success) + { + _iter249.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ia != null) { + oprot.writeFieldBegin(IA_FIELD_DESC); + struct.ia.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getScannerRows_resultTupleSchemeFactory implements SchemeFactory { + public getScannerRows_resultTupleScheme getScheme() { + return new getScannerRows_resultTupleScheme(); + } + } + + private static class getScannerRows_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getScannerRows_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + if (struct.isSetIa()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TResult _iter250 : struct.success) + { + _iter250.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + if (struct.isSetIa()) { + struct.ia.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getScannerRows_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list251 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list251.size); + TResult _elem252; + for (int _i253 = 0; _i253 < _list251.size; ++_i253) + { + _elem252 = new TResult(); + _elem252.read(iprot); + struct.success.add(_elem252); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + if (incoming.get(2)) { + struct.ia = new TIllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } + } + } + + } + + public static class closeScanner_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeScanner_args"); + + private static final org.apache.thrift.protocol.TField SCANNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scannerId", org.apache.thrift.protocol.TType.I32, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new closeScanner_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new closeScanner_argsTupleSchemeFactory()); + } + + /** + * the Id of the Scanner to close * + */ + public int scannerId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the Id of the Scanner to close * + */ + SCANNER_ID((short)1, "scannerId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SCANNER_ID + return SCANNER_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SCANNERID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SCANNER_ID, new org.apache.thrift.meta_data.FieldMetaData("scannerId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeScanner_args.class, metaDataMap); + } + + public closeScanner_args() { + } + + public closeScanner_args( + int scannerId) + { + this(); + this.scannerId = scannerId; + setScannerIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public closeScanner_args(closeScanner_args other) { + __isset_bitfield = other.__isset_bitfield; + this.scannerId = other.scannerId; + } + + public closeScanner_args deepCopy() { + return new closeScanner_args(this); + } + + @Override + public void clear() { + setScannerIdIsSet(false); + this.scannerId = 0; + } + + /** + * the Id of the Scanner to close * + */ + public int getScannerId() { + return this.scannerId; + } + + /** + * the Id of the Scanner to close * + */ + public closeScanner_args setScannerId(int scannerId) { + this.scannerId = scannerId; + setScannerIdIsSet(true); + return this; + } + + public void unsetScannerId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCANNERID_ISSET_ID); + } + + /** Returns true if field scannerId is set (has been assigned a value) and false otherwise */ + public boolean isSetScannerId() { + return EncodingUtils.testBit(__isset_bitfield, __SCANNERID_ISSET_ID); + } + + public void setScannerIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCANNERID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SCANNER_ID: + if (value == null) { + unsetScannerId(); + } else { + setScannerId((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SCANNER_ID: + return getScannerId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SCANNER_ID: + return isSetScannerId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof closeScanner_args) + return this.equals((closeScanner_args)that); + return false; + } + + public boolean equals(closeScanner_args that) { + if (that == null) + return false; + + boolean this_present_scannerId = true; + boolean that_present_scannerId = true; + if (this_present_scannerId || that_present_scannerId) { + if (!(this_present_scannerId && that_present_scannerId)) + return false; + if (this.scannerId != that.scannerId) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_scannerId = true; + list.add(present_scannerId); + if (present_scannerId) + list.add(scannerId); + + return list.hashCode(); + } + + @Override + public int compareTo(closeScanner_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetScannerId()).compareTo(other.isSetScannerId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetScannerId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scannerId, other.scannerId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("closeScanner_args("); + boolean first = true; + + sb.append("scannerId:"); + sb.append(this.scannerId); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // alas, we cannot check 'scannerId' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class closeScanner_argsStandardSchemeFactory implements SchemeFactory { + public closeScanner_argsStandardScheme getScheme() { + return new closeScanner_argsStandardScheme(); + } + } + + private static class closeScanner_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, closeScanner_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SCANNER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.scannerId = iprot.readI32(); + struct.setScannerIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetScannerId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'scannerId' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, closeScanner_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SCANNER_ID_FIELD_DESC); + oprot.writeI32(struct.scannerId); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class closeScanner_argsTupleSchemeFactory implements SchemeFactory { + public closeScanner_argsTupleScheme getScheme() { + return new closeScanner_argsTupleScheme(); + } + } + + private static class closeScanner_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, closeScanner_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI32(struct.scannerId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, closeScanner_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.scannerId = iprot.readI32(); + struct.setScannerIdIsSet(true); + } + } + + } + + public static class closeScanner_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeScanner_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new closeScanner_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new closeScanner_resultTupleSchemeFactory()); + } + + public TIOError io; // required + /** + * if the scannerId is invalid + */ + public TIllegalArgument ia; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"), + /** + * if the scannerId is invalid + */ + IA((short)2, "ia"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeScanner_result.class, metaDataMap); + } + + public closeScanner_result() { + } + + public closeScanner_result( + TIOError io, + TIllegalArgument ia) + { + this(); + this.io = io; + this.ia = ia; + } + + /** + * Performs a deep copy on other. + */ + public closeScanner_result(closeScanner_result other) { + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + if (other.isSetIa()) { + this.ia = new TIllegalArgument(other.ia); + } + } + + public closeScanner_result deepCopy() { + return new closeScanner_result(this); + } + + @Override + public void clear() { + this.io = null; + this.ia = null; + } + + public TIOError getIo() { + return this.io; + } + + public closeScanner_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + /** + * if the scannerId is invalid + */ + public TIllegalArgument getIa() { + return this.ia; + } + + /** + * if the scannerId is invalid + */ + public closeScanner_result setIa(TIllegalArgument ia) { + this.ia = ia; + return this; + } + + public void unsetIa() { + this.ia = null; + } + + /** Returns true if field ia is set (has been assigned 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(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((TIllegalArgument)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + case IA: + return getIa(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + case IA: + return isSetIa(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof closeScanner_result) + return this.equals((closeScanner_result)that); + return false; + } + + public boolean equals(closeScanner_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + 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; + if (!this.ia.equals(that.ia)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + boolean present_ia = true && (isSetIa()); + list.add(present_ia); + if (present_ia) + list.add(ia); + + return list.hashCode(); + } + + @Override + public int compareTo(closeScanner_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIa()).compareTo(other.isSetIa()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIa()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, other.ia); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("closeScanner_result("); + boolean first = true; + + 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 org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class closeScanner_resultStandardSchemeFactory implements SchemeFactory { + public closeScanner_resultStandardScheme getScheme() { + return new closeScanner_resultStandardScheme(); + } + } + + private static class closeScanner_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, closeScanner_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ia = new TIllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, closeScanner_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ia != null) { + oprot.writeFieldBegin(IA_FIELD_DESC); + struct.ia.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class closeScanner_resultTupleSchemeFactory implements SchemeFactory { + public closeScanner_resultTupleScheme getScheme() { + return new closeScanner_resultTupleScheme(); + } + } + + private static class closeScanner_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, closeScanner_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + if (struct.isSetIa()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + if (struct.isSetIa()) { + struct.ia.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, closeScanner_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + if (incoming.get(1)) { + struct.ia = new TIllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } + } + } + + } + + public static class mutateRow_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRow_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TROW_MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("trowMutations", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mutateRow_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mutateRow_argsTupleSchemeFactory()); + } + + /** + * table to apply the mutations + */ + public ByteBuffer table; // required + /** + * mutations to apply + */ + public TRowMutations trowMutations; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * table to apply the mutations + */ + TABLE((short)1, "table"), + /** + * mutations to apply + */ + TROW_MUTATIONS((short)2, "trowMutations"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // TROW_MUTATIONS + return TROW_MUTATIONS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TROW_MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("trowMutations", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowMutations.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRow_args.class, metaDataMap); + } + + public mutateRow_args() { + } + + public mutateRow_args( + ByteBuffer table, + TRowMutations trowMutations) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.trowMutations = trowMutations; + } + + /** + * Performs a deep copy on other. + */ + public mutateRow_args(mutateRow_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetTrowMutations()) { + this.trowMutations = new TRowMutations(other.trowMutations); + } + } + + public mutateRow_args deepCopy() { + return new mutateRow_args(this); + } + + @Override + public void clear() { + this.table = null; + this.trowMutations = null; + } + + /** + * table to apply the mutations + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * table to apply the mutations + */ + public mutateRow_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public mutateRow_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + /** + * mutations to apply + */ + public TRowMutations getTrowMutations() { + return this.trowMutations; + } + + /** + * mutations to apply + */ + public mutateRow_args setTrowMutations(TRowMutations trowMutations) { + this.trowMutations = trowMutations; + return this; + } + + public void unsetTrowMutations() { + this.trowMutations = null; + } + + /** Returns true if field trowMutations is set (has been assigned a value) and false otherwise */ + public boolean isSetTrowMutations() { + return this.trowMutations != null; + } + + public void setTrowMutationsIsSet(boolean value) { + if (!value) { + this.trowMutations = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case TROW_MUTATIONS: + if (value == null) { + unsetTrowMutations(); + } else { + setTrowMutations((TRowMutations)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case TROW_MUTATIONS: + return getTrowMutations(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case TROW_MUTATIONS: + return isSetTrowMutations(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mutateRow_args) + return this.equals((mutateRow_args)that); + return false; + } + + public boolean equals(mutateRow_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_trowMutations = true && this.isSetTrowMutations(); + boolean that_present_trowMutations = true && that.isSetTrowMutations(); + if (this_present_trowMutations || that_present_trowMutations) { + if (!(this_present_trowMutations && that_present_trowMutations)) + return false; + if (!this.trowMutations.equals(that.trowMutations)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_trowMutations = true && (isSetTrowMutations()); + list.add(present_trowMutations); + if (present_trowMutations) + list.add(trowMutations); + + return list.hashCode(); + } + + @Override + public int compareTo(mutateRow_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTrowMutations()).compareTo(other.isSetTrowMutations()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTrowMutations()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trowMutations, other.trowMutations); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mutateRow_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("trowMutations:"); + if (this.trowMutations == null) { + sb.append("null"); + } else { + sb.append(this.trowMutations); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (trowMutations == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'trowMutations' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (trowMutations != null) { + trowMutations.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mutateRow_argsStandardSchemeFactory implements SchemeFactory { + public mutateRow_argsStandardScheme getScheme() { + return new mutateRow_argsStandardScheme(); + } + } + + private static class mutateRow_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRow_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TROW_MUTATIONS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.trowMutations = new TRowMutations(); + struct.trowMutations.read(iprot); + struct.setTrowMutationsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRow_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.trowMutations != null) { + oprot.writeFieldBegin(TROW_MUTATIONS_FIELD_DESC); + struct.trowMutations.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mutateRow_argsTupleSchemeFactory implements SchemeFactory { + public mutateRow_argsTupleScheme getScheme() { + return new mutateRow_argsTupleScheme(); + } + } + + private static class mutateRow_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mutateRow_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + struct.trowMutations.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mutateRow_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + struct.trowMutations = new TRowMutations(); + struct.trowMutations.read(iprot); + struct.setTrowMutationsIsSet(true); + } + } + + } + + public static class mutateRow_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRow_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mutateRow_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mutateRow_resultTupleSchemeFactory()); + } + + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRow_result.class, metaDataMap); + } + + public mutateRow_result() { + } + + public mutateRow_result( + TIOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public mutateRow_result(mutateRow_result other) { + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public mutateRow_result deepCopy() { + return new mutateRow_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public TIOError getIo() { + return this.io; + } + + public mutateRow_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mutateRow_result) + return this.equals((mutateRow_result)that); + return false; + } + + public boolean equals(mutateRow_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(mutateRow_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mutateRow_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mutateRow_resultStandardSchemeFactory implements SchemeFactory { + public mutateRow_resultStandardScheme getScheme() { + return new mutateRow_resultStandardScheme(); + } + } + + private static class mutateRow_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRow_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRow_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mutateRow_resultTupleSchemeFactory implements SchemeFactory { + public mutateRow_resultTupleScheme getScheme() { + return new mutateRow_resultTupleScheme(); + } + } + + private static class mutateRow_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mutateRow_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mutateRow_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getScannerResults_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScannerResults_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TSCAN_FIELD_DESC = new org.apache.thrift.protocol.TField("tscan", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField NUM_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("numRows", org.apache.thrift.protocol.TType.I32, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getScannerResults_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getScannerResults_argsTupleSchemeFactory()); + } + + /** + * the table to get the Scanner for + */ + public ByteBuffer table; // required + /** + * the scan object to get a Scanner for + */ + public TScan tscan; // required + /** + * number of rows to return + */ + public int numRows; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * the table to get the Scanner for + */ + TABLE((short)1, "table"), + /** + * the scan object to get a Scanner for + */ + TSCAN((short)2, "tscan"), + /** + * number of rows to return + */ + NUM_ROWS((short)3, "numRows"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // TSCAN + return TSCAN; + case 3: // NUM_ROWS + return NUM_ROWS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __NUMROWS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.TSCAN, new org.apache.thrift.meta_data.FieldMetaData("tscan", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TScan.class))); + tmpMap.put(_Fields.NUM_ROWS, new org.apache.thrift.meta_data.FieldMetaData("numRows", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScannerResults_args.class, metaDataMap); + } + + public getScannerResults_args() { + this.numRows = 1; + + } + + public getScannerResults_args( + ByteBuffer table, + TScan tscan, + int numRows) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.tscan = tscan; + this.numRows = numRows; + setNumRowsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public getScannerResults_args(getScannerResults_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetTscan()) { + this.tscan = new TScan(other.tscan); + } + this.numRows = other.numRows; + } + + public getScannerResults_args deepCopy() { + return new getScannerResults_args(this); + } + + @Override + public void clear() { + this.table = null; + this.tscan = null; + this.numRows = 1; + + } + + /** + * the table to get the Scanner for + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * the table to get the Scanner for + */ + public getScannerResults_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public getScannerResults_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + /** + * the scan object to get a Scanner for + */ + public TScan getTscan() { + return this.tscan; + } + + /** + * the scan object to get a Scanner for + */ + public getScannerResults_args setTscan(TScan tscan) { + this.tscan = tscan; + return this; + } + + public void unsetTscan() { + this.tscan = null; + } + + /** Returns true if field tscan is set (has been assigned a value) and false otherwise */ + public boolean isSetTscan() { + return this.tscan != null; + } + + public void setTscanIsSet(boolean value) { + if (!value) { + this.tscan = null; + } + } + + /** + * number of rows to return + */ + public int getNumRows() { + return this.numRows; + } + + /** + * number of rows to return + */ + public getScannerResults_args setNumRows(int numRows) { + this.numRows = numRows; + setNumRowsIsSet(true); + return this; + } + + public void unsetNumRows() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMROWS_ISSET_ID); + } + + /** Returns true if field numRows is set (has been assigned a value) and false otherwise */ + public boolean isSetNumRows() { + return EncodingUtils.testBit(__isset_bitfield, __NUMROWS_ISSET_ID); + } + + public void setNumRowsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMROWS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case TSCAN: + if (value == null) { + unsetTscan(); + } else { + setTscan((TScan)value); + } + break; + + case NUM_ROWS: + if (value == null) { + unsetNumRows(); + } else { + setNumRows((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case TSCAN: + return getTscan(); + + case NUM_ROWS: + return getNumRows(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case TSCAN: + return isSetTscan(); + case NUM_ROWS: + return isSetNumRows(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getScannerResults_args) + return this.equals((getScannerResults_args)that); + return false; + } + + public boolean equals(getScannerResults_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_tscan = true && this.isSetTscan(); + boolean that_present_tscan = true && that.isSetTscan(); + if (this_present_tscan || that_present_tscan) { + if (!(this_present_tscan && that_present_tscan)) + return false; + if (!this.tscan.equals(that.tscan)) + return false; + } + + boolean this_present_numRows = true; + boolean that_present_numRows = true; + if (this_present_numRows || that_present_numRows) { + if (!(this_present_numRows && that_present_numRows)) + return false; + if (this.numRows != that.numRows) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_tscan = true && (isSetTscan()); + list.add(present_tscan); + if (present_tscan) + list.add(tscan); + + boolean present_numRows = true; + list.add(present_numRows); + if (present_numRows) + list.add(numRows); + + return list.hashCode(); + } + + @Override + public int compareTo(getScannerResults_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTscan()).compareTo(other.isSetTscan()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTscan()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tscan, other.tscan); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumRows()).compareTo(other.isSetNumRows()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumRows()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numRows, other.numRows); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getScannerResults_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("tscan:"); + if (this.tscan == null) { + sb.append("null"); + } else { + sb.append(this.tscan); + } + first = false; + if (!first) sb.append(", "); + sb.append("numRows:"); + sb.append(this.numRows); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (tscan == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tscan' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (tscan != null) { + tscan.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getScannerResults_argsStandardSchemeFactory implements SchemeFactory { + public getScannerResults_argsStandardScheme getScheme() { + return new getScannerResults_argsStandardScheme(); + } + } + + private static class getScannerResults_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerResults_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TSCAN + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tscan = new TScan(); + struct.tscan.read(iprot); + struct.setTscanIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NUM_ROWS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.numRows = iprot.readI32(); + struct.setNumRowsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getScannerResults_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.tscan != null) { + oprot.writeFieldBegin(TSCAN_FIELD_DESC); + struct.tscan.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC); + oprot.writeI32(struct.numRows); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getScannerResults_argsTupleSchemeFactory implements SchemeFactory { + public getScannerResults_argsTupleScheme getScheme() { + return new getScannerResults_argsTupleScheme(); + } + } + + private static class getScannerResults_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getScannerResults_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + struct.tscan.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetNumRows()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetNumRows()) { + oprot.writeI32(struct.numRows); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getScannerResults_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + struct.tscan = new TScan(); + struct.tscan.read(iprot); + struct.setTscanIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.numRows = iprot.readI32(); + struct.setNumRowsIsSet(true); + } + } + } + + } + + public static class getScannerResults_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScannerResults_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getScannerResults_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getScannerResults_resultTupleSchemeFactory()); + } + + public List success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScannerResults_result.class, metaDataMap); + } + + public getScannerResults_result() { + } + + public getScannerResults_result( + List success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getScannerResults_result(getScannerResults_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (TResult other_element : other.success) { + __this__success.add(new TResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public getScannerResults_result deepCopy() { + return new getScannerResults_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getScannerResults_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public getScannerResults_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getScannerResults_result) + return this.equals((getScannerResults_result)that); + return false; + } + + public boolean equals(getScannerResults_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(getScannerResults_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getScannerResults_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getScannerResults_resultStandardSchemeFactory implements SchemeFactory { + public getScannerResults_resultStandardScheme getScheme() { + return new getScannerResults_resultStandardScheme(); + } + } + + private static class getScannerResults_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerResults_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list254 = iprot.readListBegin(); + struct.success = new ArrayList(_list254.size); + TResult _elem255; + for (int _i256 = 0; _i256 < _list254.size; ++_i256) + { + _elem255 = new TResult(); + _elem255.read(iprot); + struct.success.add(_elem255); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getScannerResults_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TResult _iter257 : struct.success) + { + _iter257.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getScannerResults_resultTupleSchemeFactory implements SchemeFactory { + public getScannerResults_resultTupleScheme getScheme() { + return new getScannerResults_resultTupleScheme(); + } + } + + private static class getScannerResults_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getScannerResults_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TResult _iter258 : struct.success) + { + _iter258.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getScannerResults_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list259 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list259.size); + TResult _elem260; + for (int _i261 = 0; _i261 < _list259.size; ++_i261) + { + _elem260 = new TResult(); + _elem260.read(iprot); + struct.success.add(_elem260); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getRegionLocation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRegionLocation_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField RELOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("reload", org.apache.thrift.protocol.TType.BOOL, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRegionLocation_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRegionLocation_argsTupleSchemeFactory()); + } + + public ByteBuffer table; // required + public ByteBuffer row; // required + public boolean reload; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE((short)1, "table"), + ROW((short)2, "row"), + RELOAD((short)3, "reload"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // ROW + return ROW; + case 3: // RELOAD + return RELOAD; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __RELOAD_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.RELOAD, new org.apache.thrift.meta_data.FieldMetaData("reload", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRegionLocation_args.class, metaDataMap); + } + + public getRegionLocation_args() { + } + + public getRegionLocation_args( + ByteBuffer table, + ByteBuffer row, + boolean reload) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.row = org.apache.thrift.TBaseHelper.copyBinary(row); + this.reload = reload; + setReloadIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public getRegionLocation_args(getRegionLocation_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetRow()) { + this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); + } + this.reload = other.reload; + } + + public getRegionLocation_args deepCopy() { + return new getRegionLocation_args(this); + } + + @Override + public void clear() { + this.table = null; + this.row = null; + setReloadIsSet(false); + this.reload = false; + } + + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + public getRegionLocation_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public getRegionLocation_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return org.apache.thrift.TBaseHelper.copyBinary(row); + } + + public getRegionLocation_args setRow(byte[] row) { + this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length)); + return this; + } + + public getRegionLocation_args setRow(ByteBuffer row) { + this.row = org.apache.thrift.TBaseHelper.copyBinary(row); + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public boolean isReload() { + return this.reload; + } + + public getRegionLocation_args setReload(boolean reload) { + this.reload = reload; + setReloadIsSet(true); + return this; + } + + public void unsetReload() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RELOAD_ISSET_ID); + } + + /** Returns true if field reload is set (has been assigned a value) and false otherwise */ + public boolean isSetReload() { + return EncodingUtils.testBit(__isset_bitfield, __RELOAD_ISSET_ID); + } + + public void setReloadIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELOAD_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case RELOAD: + if (value == null) { + unsetReload(); + } else { + setReload((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case ROW: + return getRow(); + + case RELOAD: + return isReload(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case ROW: + return isSetRow(); + case RELOAD: + return isSetReload(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRegionLocation_args) + return this.equals((getRegionLocation_args)that); + return false; + } + + public boolean equals(getRegionLocation_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_reload = true; + boolean that_present_reload = true; + if (this_present_reload || that_present_reload) { + if (!(this_present_reload && that_present_reload)) + return false; + if (this.reload != that.reload) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_row = true && (isSetRow()); + list.add(present_row); + if (present_row) + list.add(row); + + boolean present_reload = true; + list.add(present_reload); + if (present_reload) + list.add(reload); + + return list.hashCode(); + } + + @Override + public int compareTo(getRegionLocation_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetReload()).compareTo(other.isSetReload()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReload()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reload, other.reload); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRegionLocation_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.row, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("reload:"); + sb.append(this.reload); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (row == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRegionLocation_argsStandardSchemeFactory implements SchemeFactory { + public getRegionLocation_argsStandardScheme getScheme() { + return new getRegionLocation_argsStandardScheme(); + } + } + + private static class getRegionLocation_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRegionLocation_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // RELOAD + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.reload = iprot.readBool(); + struct.setReloadIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRegionLocation_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(RELOAD_FIELD_DESC); + oprot.writeBool(struct.reload); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRegionLocation_argsTupleSchemeFactory implements SchemeFactory { + public getRegionLocation_argsTupleScheme getScheme() { + return new getRegionLocation_argsTupleScheme(); + } + } + + private static class getRegionLocation_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + oprot.writeBinary(struct.row); + BitSet optionals = new BitSet(); + if (struct.isSetReload()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReload()) { + oprot.writeBool(struct.reload); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.reload = iprot.readBool(); + struct.setReloadIsSet(true); + } + } + } + + } + + public static class getRegionLocation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRegionLocation_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRegionLocation_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRegionLocation_resultTupleSchemeFactory()); + } + + public THRegionLocation success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THRegionLocation.class))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRegionLocation_result.class, metaDataMap); + } + + public getRegionLocation_result() { + } + + public getRegionLocation_result( + THRegionLocation success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getRegionLocation_result(getRegionLocation_result other) { + if (other.isSetSuccess()) { + this.success = new THRegionLocation(other.success); + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public getRegionLocation_result deepCopy() { + return new getRegionLocation_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public THRegionLocation getSuccess() { + return this.success; + } + + public getRegionLocation_result setSuccess(THRegionLocation success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public getRegionLocation_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((THRegionLocation)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRegionLocation_result) + return this.equals((getRegionLocation_result)that); + return false; + } + + public boolean equals(getRegionLocation_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(getRegionLocation_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRegionLocation_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRegionLocation_resultStandardSchemeFactory implements SchemeFactory { + public getRegionLocation_resultStandardScheme getScheme() { + return new getRegionLocation_resultStandardScheme(); + } + } + + private static class getRegionLocation_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRegionLocation_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new THRegionLocation(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRegionLocation_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRegionLocation_resultTupleSchemeFactory implements SchemeFactory { + public getRegionLocation_resultTupleScheme getScheme() { + return new getRegionLocation_resultTupleScheme(); + } + } + + private static class getRegionLocation_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new THRegionLocation(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getAllRegionLocations_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllRegionLocations_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getAllRegionLocations_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllRegionLocations_argsTupleSchemeFactory()); + } + + public ByteBuffer table; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE((short)1, "table"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllRegionLocations_args.class, metaDataMap); + } + + public getAllRegionLocations_args() { + } + + public getAllRegionLocations_args( + ByteBuffer table) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * Performs a deep copy on other. + */ + public getAllRegionLocations_args(getAllRegionLocations_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + } + + public getAllRegionLocations_args deepCopy() { + return new getAllRegionLocations_args(this); + } + + @Override + public void clear() { + this.table = null; + } + + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + public getAllRegionLocations_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public getAllRegionLocations_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getAllRegionLocations_args) + return this.equals((getAllRegionLocations_args)that); + return false; + } + + public boolean equals(getAllRegionLocations_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + return list.hashCode(); + } + + @Override + public int compareTo(getAllRegionLocations_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getAllRegionLocations_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getAllRegionLocations_argsStandardSchemeFactory implements SchemeFactory { + public getAllRegionLocations_argsStandardScheme getScheme() { + return new getAllRegionLocations_argsStandardScheme(); + } + } + + private static class getAllRegionLocations_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllRegionLocations_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getAllRegionLocations_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getAllRegionLocations_argsTupleSchemeFactory implements SchemeFactory { + public getAllRegionLocations_argsTupleScheme getScheme() { + return new getAllRegionLocations_argsTupleScheme(); + } + } + + private static class getAllRegionLocations_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getAllRegionLocations_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getAllRegionLocations_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } + } + + } + + public static class getAllRegionLocations_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllRegionLocations_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getAllRegionLocations_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllRegionLocations_resultTupleSchemeFactory()); + } + + public List success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THRegionLocation.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllRegionLocations_result.class, metaDataMap); + } + + public getAllRegionLocations_result() { + } + + public getAllRegionLocations_result( + List success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getAllRegionLocations_result(getAllRegionLocations_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (THRegionLocation other_element : other.success) { + __this__success.add(new THRegionLocation(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public getAllRegionLocations_result deepCopy() { + return new getAllRegionLocations_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(THRegionLocation elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getAllRegionLocations_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public getAllRegionLocations_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getAllRegionLocations_result) + return this.equals((getAllRegionLocations_result)that); + return false; + } + + public boolean equals(getAllRegionLocations_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(getAllRegionLocations_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getAllRegionLocations_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getAllRegionLocations_resultStandardSchemeFactory implements SchemeFactory { + public getAllRegionLocations_resultStandardScheme getScheme() { + return new getAllRegionLocations_resultStandardScheme(); + } + } + + private static class getAllRegionLocations_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllRegionLocations_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list262 = iprot.readListBegin(); + struct.success = new ArrayList(_list262.size); + THRegionLocation _elem263; + for (int _i264 = 0; _i264 < _list262.size; ++_i264) + { + _elem263 = new THRegionLocation(); + _elem263.read(iprot); + struct.success.add(_elem263); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getAllRegionLocations_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (THRegionLocation _iter265 : struct.success) + { + _iter265.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getAllRegionLocations_resultTupleSchemeFactory implements SchemeFactory { + public getAllRegionLocations_resultTupleScheme getScheme() { + return new getAllRegionLocations_resultTupleScheme(); + } + } + + private static class getAllRegionLocations_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getAllRegionLocations_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (THRegionLocation _iter266 : struct.success) + { + _iter266.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getAllRegionLocations_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list267 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list267.size); + THRegionLocation _elem268; + for (int _i269 = 0; _i269 < _list267.size; ++_i269) + { + _elem268 = new THRegionLocation(); + _elem268.read(iprot); + struct.success.add(_elem268); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class checkAndMutate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndMutate_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField COMPARE_OP_FIELD_DESC = new org.apache.thrift.protocol.TField("compareOp", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField ROW_MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("rowMutations", org.apache.thrift.protocol.TType.STRUCT, (short)7); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new checkAndMutate_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new checkAndMutate_argsTupleSchemeFactory()); + } + + /** + * to check in and delete from + */ + public ByteBuffer table; // required + /** + * row to check + */ + public ByteBuffer row; // required + /** + * column family to check + */ + public ByteBuffer family; // required + /** + * column qualifier to check + */ + public ByteBuffer qualifier; // required + /** + * comparison to make on the value + * + * @see TCompareOp + */ + public TCompareOp compareOp; // required + /** + * the expected value to be compared against, if not provided the + * check is for the non-existence of the column in question + */ + public ByteBuffer value; // required + /** + * row mutations to execute if the value matches + */ + public TRowMutations rowMutations; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * to check in and delete from + */ + TABLE((short)1, "table"), + /** + * row to check + */ + ROW((short)2, "row"), + /** + * column family to check + */ + FAMILY((short)3, "family"), + /** + * column qualifier to check + */ + QUALIFIER((short)4, "qualifier"), + /** + * comparison to make on the value + * + * @see TCompareOp + */ + COMPARE_OP((short)5, "compareOp"), + /** + * the expected value to be compared against, if not provided the + * check is for the non-existence of the column in question + */ + VALUE((short)6, "value"), + /** + * row mutations to execute if the value matches + */ + ROW_MUTATIONS((short)7, "rowMutations"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // ROW + return ROW; + case 3: // FAMILY + return FAMILY; + case 4: // QUALIFIER + return QUALIFIER; + case 5: // COMPARE_OP + return COMPARE_OP; + case 6: // VALUE + return VALUE; + case 7: // ROW_MUTATIONS + return ROW_MUTATIONS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.FAMILY, new org.apache.thrift.meta_data.FieldMetaData("family", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.COMPARE_OP, new org.apache.thrift.meta_data.FieldMetaData("compareOp", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TCompareOp.class))); + tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.ROW_MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("rowMutations", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowMutations.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndMutate_args.class, metaDataMap); + } + + public checkAndMutate_args() { + } + + public checkAndMutate_args( + ByteBuffer table, + ByteBuffer row, + ByteBuffer family, + ByteBuffer qualifier, + TCompareOp compareOp, + ByteBuffer value, + TRowMutations rowMutations) + { + this(); + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.row = org.apache.thrift.TBaseHelper.copyBinary(row); + this.family = org.apache.thrift.TBaseHelper.copyBinary(family); + this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); + this.compareOp = compareOp; + this.value = org.apache.thrift.TBaseHelper.copyBinary(value); + this.rowMutations = rowMutations; + } + + /** + * Performs a deep copy on other. + */ + public checkAndMutate_args(checkAndMutate_args other) { + if (other.isSetTable()) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + } + if (other.isSetRow()) { + this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); + } + if (other.isSetFamily()) { + this.family = org.apache.thrift.TBaseHelper.copyBinary(other.family); + } + if (other.isSetQualifier()) { + this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier); + } + if (other.isSetCompareOp()) { + this.compareOp = other.compareOp; + } + if (other.isSetValue()) { + this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); + } + if (other.isSetRowMutations()) { + this.rowMutations = new TRowMutations(other.rowMutations); + } + } + + public checkAndMutate_args deepCopy() { + return new checkAndMutate_args(this); + } + + @Override + public void clear() { + this.table = null; + this.row = null; + this.family = null; + this.qualifier = null; + this.compareOp = null; + this.value = null; + this.rowMutations = null; + } + + /** + * to check in and delete from + */ + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return org.apache.thrift.TBaseHelper.copyBinary(table); + } + + /** + * to check in and delete from + */ + public checkAndMutate_args setTable(byte[] table) { + this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + return this; + } + + public checkAndMutate_args setTable(ByteBuffer table) { + this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + /** + * row to check + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return org.apache.thrift.TBaseHelper.copyBinary(row); + } + + /** + * row to check + */ + public checkAndMutate_args setRow(byte[] row) { + this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length)); + return this; + } + + public checkAndMutate_args setRow(ByteBuffer row) { + this.row = org.apache.thrift.TBaseHelper.copyBinary(row); + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + /** + * column family to check + */ + public byte[] getFamily() { + setFamily(org.apache.thrift.TBaseHelper.rightSize(family)); + return family == null ? null : family.array(); + } + + public ByteBuffer bufferForFamily() { + return org.apache.thrift.TBaseHelper.copyBinary(family); + } + + /** + * column family to check + */ + public checkAndMutate_args setFamily(byte[] family) { + this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length)); + return this; + } + + public checkAndMutate_args setFamily(ByteBuffer family) { + this.family = org.apache.thrift.TBaseHelper.copyBinary(family); + return this; + } + + public void unsetFamily() { + this.family = null; + } + + /** Returns true if field family is set (has been assigned a value) and false otherwise */ + public boolean isSetFamily() { + return this.family != null; + } + + public void setFamilyIsSet(boolean value) { + if (!value) { + this.family = null; + } + } + + /** + * column qualifier to check + */ + public byte[] getQualifier() { + setQualifier(org.apache.thrift.TBaseHelper.rightSize(qualifier)); + return qualifier == null ? null : qualifier.array(); + } + + public ByteBuffer bufferForQualifier() { + return org.apache.thrift.TBaseHelper.copyBinary(qualifier); + } + + /** + * column qualifier to check + */ + public checkAndMutate_args setQualifier(byte[] qualifier) { + this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length)); + return this; + } + + public checkAndMutate_args setQualifier(ByteBuffer qualifier) { + this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); + return this; + } + + public void unsetQualifier() { + this.qualifier = null; + } + + /** Returns true if field qualifier is set (has been assigned a value) and false otherwise */ + public boolean isSetQualifier() { + return this.qualifier != null; + } + + public void setQualifierIsSet(boolean value) { + if (!value) { + this.qualifier = null; + } + } + + /** + * comparison to make on the value + * + * @see TCompareOp + */ + public TCompareOp getCompareOp() { + return this.compareOp; + } + + /** + * comparison to make on the value + * + * @see TCompareOp + */ + public checkAndMutate_args setCompareOp(TCompareOp compareOp) { + this.compareOp = compareOp; + return this; + } + + public void unsetCompareOp() { + this.compareOp = null; + } + + /** Returns true if field compareOp is set (has been assigned a value) and false otherwise */ + public boolean isSetCompareOp() { + return this.compareOp != null; + } + + public void setCompareOpIsSet(boolean value) { + if (!value) { + this.compareOp = null; + } + } + + /** + * the expected value to be compared against, if not provided the + * check is for the non-existence of the column in question + */ + public byte[] getValue() { + setValue(org.apache.thrift.TBaseHelper.rightSize(value)); + return value == null ? null : value.array(); + } + + public ByteBuffer bufferForValue() { + return org.apache.thrift.TBaseHelper.copyBinary(value); + } + + /** + * the expected value to be compared against, if not provided the + * check is for the non-existence of the column in question + */ + public checkAndMutate_args setValue(byte[] value) { + this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length)); + return this; + } + + public checkAndMutate_args setValue(ByteBuffer value) { + this.value = org.apache.thrift.TBaseHelper.copyBinary(value); + return this; + } + + public void unsetValue() { + this.value = null; + } + + /** Returns true if field value is set (has been assigned a value) and false otherwise */ + public boolean isSetValue() { + return this.value != null; + } + + public void setValueIsSet(boolean value) { + if (!value) { + this.value = null; + } + } + + /** + * row mutations to execute if the value matches + */ + public TRowMutations getRowMutations() { + return this.rowMutations; + } + + /** + * row mutations to execute if the value matches + */ + public checkAndMutate_args setRowMutations(TRowMutations rowMutations) { + this.rowMutations = rowMutations; + return this; + } + + public void unsetRowMutations() { + this.rowMutations = null; + } + + /** Returns true if field rowMutations is set (has been assigned a value) and false otherwise */ + public boolean isSetRowMutations() { + return this.rowMutations != null; + } + + public void setRowMutationsIsSet(boolean value) { + if (!value) { + this.rowMutations = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case FAMILY: + if (value == null) { + unsetFamily(); + } else { + setFamily((ByteBuffer)value); + } + break; + + case QUALIFIER: + if (value == null) { + unsetQualifier(); + } else { + setQualifier((ByteBuffer)value); + } + break; + + case COMPARE_OP: + if (value == null) { + unsetCompareOp(); + } else { + setCompareOp((TCompareOp)value); + } + break; + + case VALUE: + if (value == null) { + unsetValue(); + } else { + setValue((ByteBuffer)value); + } + break; + + case ROW_MUTATIONS: + if (value == null) { + unsetRowMutations(); + } else { + setRowMutations((TRowMutations)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case ROW: + return getRow(); + + case FAMILY: + return getFamily(); + + case QUALIFIER: + return getQualifier(); + + case COMPARE_OP: + return getCompareOp(); + + case VALUE: + return getValue(); + + case ROW_MUTATIONS: + return getRowMutations(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case ROW: + return isSetRow(); + case FAMILY: + return isSetFamily(); + case QUALIFIER: + return isSetQualifier(); + case COMPARE_OP: + return isSetCompareOp(); + case VALUE: + return isSetValue(); + case ROW_MUTATIONS: + return isSetRowMutations(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof checkAndMutate_args) + return this.equals((checkAndMutate_args)that); + return false; + } + + public boolean equals(checkAndMutate_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_family = true && this.isSetFamily(); + boolean that_present_family = true && that.isSetFamily(); + if (this_present_family || that_present_family) { + if (!(this_present_family && that_present_family)) + return false; + if (!this.family.equals(that.family)) + return false; + } + + boolean this_present_qualifier = true && this.isSetQualifier(); + boolean that_present_qualifier = true && that.isSetQualifier(); + if (this_present_qualifier || that_present_qualifier) { + if (!(this_present_qualifier && that_present_qualifier)) + return false; + if (!this.qualifier.equals(that.qualifier)) + return false; + } + + boolean this_present_compareOp = true && this.isSetCompareOp(); + boolean that_present_compareOp = true && that.isSetCompareOp(); + if (this_present_compareOp || that_present_compareOp) { + if (!(this_present_compareOp && that_present_compareOp)) + return false; + if (!this.compareOp.equals(that.compareOp)) + return false; + } + + 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; + if (!this.value.equals(that.value)) + return false; + } + + boolean this_present_rowMutations = true && this.isSetRowMutations(); + boolean that_present_rowMutations = true && that.isSetRowMutations(); + if (this_present_rowMutations || that_present_rowMutations) { + if (!(this_present_rowMutations && that_present_rowMutations)) + return false; + if (!this.rowMutations.equals(that.rowMutations)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + boolean present_row = true && (isSetRow()); + list.add(present_row); + if (present_row) + list.add(row); + + boolean present_family = true && (isSetFamily()); + list.add(present_family); + if (present_family) + list.add(family); + + boolean present_qualifier = true && (isSetQualifier()); + list.add(present_qualifier); + if (present_qualifier) + list.add(qualifier); + + boolean present_compareOp = true && (isSetCompareOp()); + list.add(present_compareOp); + if (present_compareOp) + list.add(compareOp.getValue()); + + boolean present_value = true && (isSetValue()); + list.add(present_value); + if (present_value) + list.add(value); + + boolean present_rowMutations = true && (isSetRowMutations()); + list.add(present_rowMutations); + if (present_rowMutations) + list.add(rowMutations); + + return list.hashCode(); + } + + @Override + public int compareTo(checkAndMutate_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFamily()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, other.family); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQualifier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCompareOp()).compareTo(other.isSetCompareOp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCompareOp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compareOp, other.compareOp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRowMutations()).compareTo(other.isSetRowMutations()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRowMutations()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rowMutations, other.rowMutations); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("checkAndMutate_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.table, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.row, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("family:"); + if (this.family == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.family, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("qualifier:"); + if (this.qualifier == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.qualifier, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("compareOp:"); + if (this.compareOp == null) { + sb.append("null"); + } else { + sb.append(this.compareOp); + } + first = false; + if (!first) sb.append(", "); + sb.append("value:"); + if (this.value == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.value, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("rowMutations:"); + if (this.rowMutations == null) { + sb.append("null"); + } else { + sb.append(this.rowMutations); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + if (row == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString()); + } + if (family == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'family' was not present! Struct: " + toString()); + } + if (qualifier == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifier' was not present! Struct: " + toString()); + } + if (compareOp == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'compareOp' was not present! Struct: " + toString()); + } + if (rowMutations == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'rowMutations' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (rowMutations != null) { + rowMutations.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class checkAndMutate_argsStandardSchemeFactory implements SchemeFactory { + public checkAndMutate_argsStandardScheme getScheme() { + return new checkAndMutate_argsStandardScheme(); + } + } + + private static class checkAndMutate_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndMutate_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FAMILY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.family = iprot.readBinary(); + struct.setFamilyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // QUALIFIER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.qualifier = iprot.readBinary(); + struct.setQualifierIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // COMPARE_OP + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.compareOp = org.apache.hadoop.hbase.thrift2.generated.TCompareOp.findByValue(iprot.readI32()); + struct.setCompareOpIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.value = iprot.readBinary(); + struct.setValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // ROW_MUTATIONS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rowMutations = new TRowMutations(); + struct.rowMutations.read(iprot); + struct.setRowMutationsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndMutate_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.family != null) { + oprot.writeFieldBegin(FAMILY_FIELD_DESC); + oprot.writeBinary(struct.family); + oprot.writeFieldEnd(); + } + if (struct.qualifier != null) { + oprot.writeFieldBegin(QUALIFIER_FIELD_DESC); + oprot.writeBinary(struct.qualifier); + oprot.writeFieldEnd(); + } + if (struct.compareOp != null) { + oprot.writeFieldBegin(COMPARE_OP_FIELD_DESC); + oprot.writeI32(struct.compareOp.getValue()); + oprot.writeFieldEnd(); + } + if (struct.value != null) { + oprot.writeFieldBegin(VALUE_FIELD_DESC); + oprot.writeBinary(struct.value); + oprot.writeFieldEnd(); + } + if (struct.rowMutations != null) { + oprot.writeFieldBegin(ROW_MUTATIONS_FIELD_DESC); + struct.rowMutations.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class checkAndMutate_argsTupleSchemeFactory implements SchemeFactory { + public checkAndMutate_argsTupleScheme getScheme() { + return new checkAndMutate_argsTupleScheme(); + } + } + + private static class checkAndMutate_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, checkAndMutate_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.table); + oprot.writeBinary(struct.row); + oprot.writeBinary(struct.family); + oprot.writeBinary(struct.qualifier); + oprot.writeI32(struct.compareOp.getValue()); + struct.rowMutations.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetValue()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetValue()) { + oprot.writeBinary(struct.value); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, checkAndMutate_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + struct.family = iprot.readBinary(); + struct.setFamilyIsSet(true); + struct.qualifier = iprot.readBinary(); + struct.setQualifierIsSet(true); + struct.compareOp = org.apache.hadoop.hbase.thrift2.generated.TCompareOp.findByValue(iprot.readI32()); + struct.setCompareOpIsSet(true); + struct.rowMutations = new TRowMutations(); + struct.rowMutations.read(iprot); + struct.setRowMutationsIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.value = iprot.readBinary(); + struct.setValueIsSet(true); + } + } + } + + } + + public static class checkAndMutate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndMutate_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new checkAndMutate_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new checkAndMutate_resultTupleSchemeFactory()); + } + + public boolean success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndMutate_result.class, metaDataMap); + } + + public checkAndMutate_result() { + } + + public checkAndMutate_result( + boolean success, + TIOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public checkAndMutate_result(checkAndMutate_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public checkAndMutate_result deepCopy() { + return new checkAndMutate_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.io = null; + } + + public boolean isSuccess() { + return this.success; + } + + public checkAndMutate_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public TIOError getIo() { + return this.io; + } + + public checkAndMutate_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof checkAndMutate_result) + return this.equals((checkAndMutate_result)that); + return false; + } + + public boolean equals(checkAndMutate_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(checkAndMutate_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("checkAndMutate_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class checkAndMutate_resultStandardSchemeFactory implements SchemeFactory { + public checkAndMutate_resultStandardScheme getScheme() { + return new checkAndMutate_resultStandardScheme(); + } + } + + private static class checkAndMutate_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndMutate_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndMutate_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class checkAndMutate_resultTupleSchemeFactory implements SchemeFactory { + public checkAndMutate_resultTupleScheme getScheme() { + return new checkAndMutate_resultTupleScheme(); + } + } + + private static class checkAndMutate_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, checkAndMutate_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, checkAndMutate_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getTableDescriptor_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableDescriptor_args"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableDescriptor_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableDescriptor_argsTupleSchemeFactory()); + } + + public TTableName table; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE((short)1, "table"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableDescriptor_args.class, metaDataMap); + } + + public getTableDescriptor_args() { + } + + public getTableDescriptor_args( + TTableName table) + { + this(); + this.table = table; + } + + /** + * Performs a deep copy on other. + */ + public getTableDescriptor_args(getTableDescriptor_args other) { + if (other.isSetTable()) { + this.table = new TTableName(other.table); + } + } + + public getTableDescriptor_args deepCopy() { + return new getTableDescriptor_args(this); + } + + @Override + public void clear() { + this.table = null; + } + + public TTableName getTable() { + return this.table; + } + + public getTableDescriptor_args setTable(TTableName table) { + this.table = table; + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((TTableName)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableDescriptor_args) + return this.equals((getTableDescriptor_args)that); + return false; + } + + public boolean equals(getTableDescriptor_args that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + return list.hashCode(); + } + + @Override + public int compareTo(getTableDescriptor_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableDescriptor_args("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + sb.append(this.table); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (table == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (table != null) { + table.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableDescriptor_argsStandardSchemeFactory implements SchemeFactory { + public getTableDescriptor_argsStandardScheme getScheme() { + return new getTableDescriptor_argsStandardScheme(); + } + } + + private static class getTableDescriptor_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableDescriptor_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.table = new TTableName(); + struct.table.read(iprot); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableDescriptor_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + struct.table.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableDescriptor_argsTupleSchemeFactory implements SchemeFactory { + public getTableDescriptor_argsTupleScheme getScheme() { + return new getTableDescriptor_argsTupleScheme(); + } + } + + private static class getTableDescriptor_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableDescriptor_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.table.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableDescriptor_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = new TTableName(); + struct.table.read(iprot); + struct.setTableIsSet(true); + } + } + + } + + public static class getTableDescriptor_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableDescriptor_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableDescriptor_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableDescriptor_resultTupleSchemeFactory()); + } + + public TTableDescriptor success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDescriptor.class))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableDescriptor_result.class, metaDataMap); + } + + public getTableDescriptor_result() { + } + + public getTableDescriptor_result( + TTableDescriptor success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getTableDescriptor_result(getTableDescriptor_result other) { + if (other.isSetSuccess()) { + this.success = new TTableDescriptor(other.success); + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public getTableDescriptor_result deepCopy() { + return new getTableDescriptor_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public TTableDescriptor getSuccess() { + return this.success; + } + + public getTableDescriptor_result setSuccess(TTableDescriptor success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public getTableDescriptor_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TTableDescriptor)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableDescriptor_result) + return this.equals((getTableDescriptor_result)that); + return false; + } + + public boolean equals(getTableDescriptor_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(getTableDescriptor_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableDescriptor_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableDescriptor_resultStandardSchemeFactory implements SchemeFactory { + public getTableDescriptor_resultStandardScheme getScheme() { + return new getTableDescriptor_resultStandardScheme(); + } + } + + private static class getTableDescriptor_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableDescriptor_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TTableDescriptor(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableDescriptor_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableDescriptor_resultTupleSchemeFactory implements SchemeFactory { + public getTableDescriptor_resultTupleScheme getScheme() { + return new getTableDescriptor_resultTupleScheme(); + } + } + + private static class getTableDescriptor_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableDescriptor_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableDescriptor_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new TTableDescriptor(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getTableDescriptors_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableDescriptors_args"); + + private static final org.apache.thrift.protocol.TField TABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("tables", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableDescriptors_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableDescriptors_argsTupleSchemeFactory()); + } + + public List tables; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLES((short)1, "tables"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLES + return TABLES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLES, new org.apache.thrift.meta_data.FieldMetaData("tables", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableDescriptors_args.class, metaDataMap); + } + + public getTableDescriptors_args() { + } + + public getTableDescriptors_args( + List tables) + { + this(); + this.tables = tables; + } + + /** + * Performs a deep copy on other. + */ + public getTableDescriptors_args(getTableDescriptors_args other) { + if (other.isSetTables()) { + List __this__tables = new ArrayList(other.tables.size()); + for (TTableName other_element : other.tables) { + __this__tables.add(new TTableName(other_element)); + } + this.tables = __this__tables; + } + } + + public getTableDescriptors_args deepCopy() { + return new getTableDescriptors_args(this); + } + + @Override + public void clear() { + this.tables = null; + } + + public int getTablesSize() { + return (this.tables == null) ? 0 : this.tables.size(); + } + + public java.util.Iterator getTablesIterator() { + return (this.tables == null) ? null : this.tables.iterator(); + } + + public void addToTables(TTableName elem) { + if (this.tables == null) { + this.tables = new ArrayList(); + } + this.tables.add(elem); + } + + public List getTables() { + return this.tables; + } + + public getTableDescriptors_args setTables(List tables) { + this.tables = tables; + return this; + } + + public void unsetTables() { + this.tables = null; + } + + /** Returns true if field tables is set (has been assigned a value) and false otherwise */ + public boolean isSetTables() { + return this.tables != null; + } + + public void setTablesIsSet(boolean value) { + if (!value) { + this.tables = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLES: + if (value == null) { + unsetTables(); + } else { + setTables((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLES: + return getTables(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLES: + return isSetTables(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableDescriptors_args) + return this.equals((getTableDescriptors_args)that); + return false; + } + + public boolean equals(getTableDescriptors_args that) { + if (that == null) + return false; + + boolean this_present_tables = true && this.isSetTables(); + boolean that_present_tables = true && that.isSetTables(); + if (this_present_tables || that_present_tables) { + if (!(this_present_tables && that_present_tables)) + return false; + if (!this.tables.equals(that.tables)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_tables = true && (isSetTables()); + list.add(present_tables); + if (present_tables) + list.add(tables); + + return list.hashCode(); + } + + @Override + public int compareTo(getTableDescriptors_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTables()).compareTo(other.isSetTables()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTables()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tables, other.tables); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableDescriptors_args("); + boolean first = true; + + sb.append("tables:"); + if (this.tables == null) { + sb.append("null"); + } else { + sb.append(this.tables); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (tables == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tables' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableDescriptors_argsStandardSchemeFactory implements SchemeFactory { + public getTableDescriptors_argsStandardScheme getScheme() { + return new getTableDescriptors_argsStandardScheme(); + } + } + + private static class getTableDescriptors_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableDescriptors_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list270 = iprot.readListBegin(); + struct.tables = new ArrayList(_list270.size); + TTableName _elem271; + for (int _i272 = 0; _i272 < _list270.size; ++_i272) + { + _elem271 = new TTableName(); + _elem271.read(iprot); + struct.tables.add(_elem271); + } + iprot.readListEnd(); + } + struct.setTablesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableDescriptors_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tables != null) { + oprot.writeFieldBegin(TABLES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tables.size())); + for (TTableName _iter273 : struct.tables) + { + _iter273.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableDescriptors_argsTupleSchemeFactory implements SchemeFactory { + public getTableDescriptors_argsTupleScheme getScheme() { + return new getTableDescriptors_argsTupleScheme(); + } + } + + private static class getTableDescriptors_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableDescriptors_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.tables.size()); + for (TTableName _iter274 : struct.tables) + { + _iter274.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableDescriptors_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list275 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.tables = new ArrayList(_list275.size); + TTableName _elem276; + for (int _i277 = 0; _i277 < _list275.size; ++_i277) + { + _elem276 = new TTableName(); + _elem276.read(iprot); + struct.tables.add(_elem276); + } + } + struct.setTablesIsSet(true); + } + } + + } + + public static class getTableDescriptors_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableDescriptors_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableDescriptors_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableDescriptors_resultTupleSchemeFactory()); + } + + public List success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDescriptor.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableDescriptors_result.class, metaDataMap); + } + + public getTableDescriptors_result() { + } + + public getTableDescriptors_result( + List success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getTableDescriptors_result(getTableDescriptors_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (TTableDescriptor other_element : other.success) { + __this__success.add(new TTableDescriptor(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public getTableDescriptors_result deepCopy() { + return new getTableDescriptors_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TTableDescriptor elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getTableDescriptors_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public getTableDescriptors_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableDescriptors_result) + return this.equals((getTableDescriptors_result)that); + return false; + } + + public boolean equals(getTableDescriptors_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(getTableDescriptors_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableDescriptors_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableDescriptors_resultStandardSchemeFactory implements SchemeFactory { + public getTableDescriptors_resultStandardScheme getScheme() { + return new getTableDescriptors_resultStandardScheme(); + } + } + + private static class getTableDescriptors_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableDescriptors_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list278 = iprot.readListBegin(); + struct.success = new ArrayList(_list278.size); + TTableDescriptor _elem279; + for (int _i280 = 0; _i280 < _list278.size; ++_i280) + { + _elem279 = new TTableDescriptor(); + _elem279.read(iprot); + struct.success.add(_elem279); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableDescriptors_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TTableDescriptor _iter281 : struct.success) + { + _iter281.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableDescriptors_resultTupleSchemeFactory implements SchemeFactory { + public getTableDescriptors_resultTupleScheme getScheme() { + return new getTableDescriptors_resultTupleScheme(); + } + } + + private static class getTableDescriptors_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableDescriptors_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TTableDescriptor _iter282 : struct.success) + { + _iter282.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableDescriptors_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list283 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list283.size); + TTableDescriptor _elem284; + for (int _i285 = 0; _i285 < _list283.size; ++_i285) + { + _elem284 = new TTableDescriptor(); + _elem284.read(iprot); + struct.success.add(_elem284); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class tableExists_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("tableExists_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new tableExists_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new tableExists_argsTupleSchemeFactory()); + } + + public TTableName tableName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE_NAME((short)1, "tableName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(tableExists_args.class, metaDataMap); + } + + public tableExists_args() { + } + + public tableExists_args( + TTableName tableName) + { + this(); + this.tableName = tableName; + } + + /** + * Performs a deep copy on other. + */ + public tableExists_args(tableExists_args other) { + if (other.isSetTableName()) { + this.tableName = new TTableName(other.tableName); + } + } + + public tableExists_args deepCopy() { + return new tableExists_args(this); + } + + @Override + public void clear() { + this.tableName = null; + } + + public TTableName getTableName() { + return this.tableName; + } + + public tableExists_args setTableName(TTableName tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((TTableName)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof tableExists_args) + return this.equals((tableExists_args)that); + return false; + } + + public boolean equals(tableExists_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); + + return list.hashCode(); + } + + @Override + public int compareTo(tableExists_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("tableExists_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (tableName != null) { + tableName.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class tableExists_argsStandardSchemeFactory implements SchemeFactory { + public tableExists_argsStandardScheme getScheme() { + return new tableExists_argsStandardScheme(); + } + } + + private static class tableExists_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, tableExists_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, tableExists_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + struct.tableName.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class tableExists_argsTupleSchemeFactory implements SchemeFactory { + public tableExists_argsTupleScheme getScheme() { + return new tableExists_argsTupleScheme(); + } + } + + private static class tableExists_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, tableExists_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTableName()) { + struct.tableName.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, tableExists_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); + } + } + } + + } + + public static class tableExists_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("tableExists_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new tableExists_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new tableExists_resultTupleSchemeFactory()); + } + + public boolean success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(tableExists_result.class, metaDataMap); + } + + public tableExists_result() { + } + + public tableExists_result( + boolean success, + TIOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public tableExists_result(tableExists_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public tableExists_result deepCopy() { + return new tableExists_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.io = null; + } + + public boolean isSuccess() { + return this.success; + } + + public tableExists_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public TIOError getIo() { + return this.io; + } + + public tableExists_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof tableExists_result) + return this.equals((tableExists_result)that); + return false; + } + + public boolean equals(tableExists_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(tableExists_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("tableExists_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class tableExists_resultStandardSchemeFactory implements SchemeFactory { + public tableExists_resultStandardScheme getScheme() { + return new tableExists_resultStandardScheme(); + } + } + + private static class tableExists_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, tableExists_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, tableExists_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class tableExists_resultTupleSchemeFactory implements SchemeFactory { + public tableExists_resultTupleScheme getScheme() { + return new tableExists_resultTupleScheme(); + } + } + + private static class tableExists_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, tableExists_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, tableExists_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getTableDescriptorsByPattern_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableDescriptorsByPattern_args"); + + private static final org.apache.thrift.protocol.TField REGEX_FIELD_DESC = new org.apache.thrift.protocol.TField("regex", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField INCLUDE_SYS_TABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("includeSysTables", org.apache.thrift.protocol.TType.BOOL, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableDescriptorsByPattern_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableDescriptorsByPattern_argsTupleSchemeFactory()); + } + + public String regex; // required + public boolean includeSysTables; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REGEX((short)1, "regex"), + INCLUDE_SYS_TABLES((short)2, "includeSysTables"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REGEX + return REGEX; + case 2: // INCLUDE_SYS_TABLES + return INCLUDE_SYS_TABLES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __INCLUDESYSTABLES_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.REGEX, new org.apache.thrift.meta_data.FieldMetaData("regex", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.INCLUDE_SYS_TABLES, new org.apache.thrift.meta_data.FieldMetaData("includeSysTables", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableDescriptorsByPattern_args.class, metaDataMap); + } + + public getTableDescriptorsByPattern_args() { + } + + public getTableDescriptorsByPattern_args( + String regex, + boolean includeSysTables) + { + this(); + this.regex = regex; + this.includeSysTables = includeSysTables; + setIncludeSysTablesIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public getTableDescriptorsByPattern_args(getTableDescriptorsByPattern_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetRegex()) { + this.regex = other.regex; + } + this.includeSysTables = other.includeSysTables; + } + + public getTableDescriptorsByPattern_args deepCopy() { + return new getTableDescriptorsByPattern_args(this); + } + + @Override + public void clear() { + this.regex = null; + setIncludeSysTablesIsSet(false); + this.includeSysTables = false; + } + + public String getRegex() { + return this.regex; + } + + public getTableDescriptorsByPattern_args setRegex(String regex) { + this.regex = regex; + return this; + } + + public void unsetRegex() { + this.regex = null; + } + + /** Returns true if field regex is set (has been assigned a value) and false otherwise */ + public boolean isSetRegex() { + return this.regex != null; + } + + public void setRegexIsSet(boolean value) { + if (!value) { + this.regex = null; + } + } + + public boolean isIncludeSysTables() { + return this.includeSysTables; + } + + public getTableDescriptorsByPattern_args setIncludeSysTables(boolean includeSysTables) { + this.includeSysTables = includeSysTables; + setIncludeSysTablesIsSet(true); + return this; + } + + public void unsetIncludeSysTables() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INCLUDESYSTABLES_ISSET_ID); + } + + /** Returns true if field includeSysTables is set (has been assigned a value) and false otherwise */ + public boolean isSetIncludeSysTables() { + return EncodingUtils.testBit(__isset_bitfield, __INCLUDESYSTABLES_ISSET_ID); + } + + public void setIncludeSysTablesIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INCLUDESYSTABLES_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REGEX: + if (value == null) { + unsetRegex(); + } else { + setRegex((String)value); + } + break; + + case INCLUDE_SYS_TABLES: + if (value == null) { + unsetIncludeSysTables(); + } else { + setIncludeSysTables((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REGEX: + return getRegex(); + + case INCLUDE_SYS_TABLES: + return isIncludeSysTables(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REGEX: + return isSetRegex(); + case INCLUDE_SYS_TABLES: + return isSetIncludeSysTables(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableDescriptorsByPattern_args) + return this.equals((getTableDescriptorsByPattern_args)that); + return false; + } + + public boolean equals(getTableDescriptorsByPattern_args that) { + if (that == null) + return false; + + boolean this_present_regex = true && this.isSetRegex(); + boolean that_present_regex = true && that.isSetRegex(); + if (this_present_regex || that_present_regex) { + if (!(this_present_regex && that_present_regex)) + return false; + if (!this.regex.equals(that.regex)) + return false; + } + + boolean this_present_includeSysTables = true; + boolean that_present_includeSysTables = true; + if (this_present_includeSysTables || that_present_includeSysTables) { + if (!(this_present_includeSysTables && that_present_includeSysTables)) + return false; + if (this.includeSysTables != that.includeSysTables) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_regex = true && (isSetRegex()); + list.add(present_regex); + if (present_regex) + list.add(regex); + + boolean present_includeSysTables = true; + list.add(present_includeSysTables); + if (present_includeSysTables) + list.add(includeSysTables); + + return list.hashCode(); + } + + @Override + public int compareTo(getTableDescriptorsByPattern_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRegex()).compareTo(other.isSetRegex()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRegex()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.regex, other.regex); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIncludeSysTables()).compareTo(other.isSetIncludeSysTables()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIncludeSysTables()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.includeSysTables, other.includeSysTables); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableDescriptorsByPattern_args("); + boolean first = true; + + sb.append("regex:"); + if (this.regex == null) { + sb.append("null"); + } else { + sb.append(this.regex); + } + first = false; + if (!first) sb.append(", "); + sb.append("includeSysTables:"); + sb.append(this.includeSysTables); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (regex == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'regex' was not present! Struct: " + toString()); + } + // alas, we cannot check 'includeSysTables' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableDescriptorsByPattern_argsStandardSchemeFactory implements SchemeFactory { + public getTableDescriptorsByPattern_argsStandardScheme getScheme() { + return new getTableDescriptorsByPattern_argsStandardScheme(); + } + } + + private static class getTableDescriptorsByPattern_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableDescriptorsByPattern_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REGEX + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.regex = iprot.readString(); + struct.setRegexIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // INCLUDE_SYS_TABLES + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.includeSysTables = iprot.readBool(); + struct.setIncludeSysTablesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetIncludeSysTables()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'includeSysTables' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableDescriptorsByPattern_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.regex != null) { + oprot.writeFieldBegin(REGEX_FIELD_DESC); + oprot.writeString(struct.regex); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(INCLUDE_SYS_TABLES_FIELD_DESC); + oprot.writeBool(struct.includeSysTables); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableDescriptorsByPattern_argsTupleSchemeFactory implements SchemeFactory { + public getTableDescriptorsByPattern_argsTupleScheme getScheme() { + return new getTableDescriptorsByPattern_argsTupleScheme(); + } + } + + private static class getTableDescriptorsByPattern_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableDescriptorsByPattern_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.regex); + oprot.writeBool(struct.includeSysTables); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableDescriptorsByPattern_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.regex = iprot.readString(); + struct.setRegexIsSet(true); + struct.includeSysTables = iprot.readBool(); + struct.setIncludeSysTablesIsSet(true); + } + } + + } + + public static class getTableDescriptorsByPattern_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableDescriptorsByPattern_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableDescriptorsByPattern_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableDescriptorsByPattern_resultTupleSchemeFactory()); + } + + public List success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDescriptor.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableDescriptorsByPattern_result.class, metaDataMap); + } + + public getTableDescriptorsByPattern_result() { + } + + public getTableDescriptorsByPattern_result( + List success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getTableDescriptorsByPattern_result(getTableDescriptorsByPattern_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (TTableDescriptor other_element : other.success) { + __this__success.add(new TTableDescriptor(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public getTableDescriptorsByPattern_result deepCopy() { + return new getTableDescriptorsByPattern_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TTableDescriptor elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getTableDescriptorsByPattern_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public getTableDescriptorsByPattern_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableDescriptorsByPattern_result) + return this.equals((getTableDescriptorsByPattern_result)that); + return false; + } + + public boolean equals(getTableDescriptorsByPattern_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(getTableDescriptorsByPattern_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableDescriptorsByPattern_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableDescriptorsByPattern_resultStandardSchemeFactory implements SchemeFactory { + public getTableDescriptorsByPattern_resultStandardScheme getScheme() { + return new getTableDescriptorsByPattern_resultStandardScheme(); + } + } + + private static class getTableDescriptorsByPattern_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableDescriptorsByPattern_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list286 = iprot.readListBegin(); + struct.success = new ArrayList(_list286.size); + TTableDescriptor _elem287; + for (int _i288 = 0; _i288 < _list286.size; ++_i288) + { + _elem287 = new TTableDescriptor(); + _elem287.read(iprot); + struct.success.add(_elem287); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableDescriptorsByPattern_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TTableDescriptor _iter289 : struct.success) + { + _iter289.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableDescriptorsByPattern_resultTupleSchemeFactory implements SchemeFactory { + public getTableDescriptorsByPattern_resultTupleScheme getScheme() { + return new getTableDescriptorsByPattern_resultTupleScheme(); + } + } + + private static class getTableDescriptorsByPattern_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableDescriptorsByPattern_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TTableDescriptor _iter290 : struct.success) + { + _iter290.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableDescriptorsByPattern_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list291 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list291.size); + TTableDescriptor _elem292; + for (int _i293 = 0; _i293 < _list291.size; ++_i293) + { + _elem292 = new TTableDescriptor(); + _elem292.read(iprot); + struct.success.add(_elem292); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getTableDescriptorsByNamespace_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableDescriptorsByNamespace_args"); + + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableDescriptorsByNamespace_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableDescriptorsByNamespace_argsTupleSchemeFactory()); + } + + public String name; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)1, "name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableDescriptorsByNamespace_args.class, metaDataMap); + } + + public getTableDescriptorsByNamespace_args() { + } + + public getTableDescriptorsByNamespace_args( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public getTableDescriptorsByNamespace_args(getTableDescriptorsByNamespace_args other) { + if (other.isSetName()) { + this.name = other.name; + } + } + + public getTableDescriptorsByNamespace_args deepCopy() { + return new getTableDescriptorsByNamespace_args(this); + } + + @Override + public void clear() { + this.name = null; + } + + public String getName() { + return this.name; + } + + public getTableDescriptorsByNamespace_args setName(String name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableDescriptorsByNamespace_args) + return this.equals((getTableDescriptorsByNamespace_args)that); + return false; + } + + public boolean equals(getTableDescriptorsByNamespace_args that) { + if (that == null) + return false; + + 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; + if (!this.name.equals(that.name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + return list.hashCode(); + } + + @Override + public int compareTo(getTableDescriptorsByNamespace_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableDescriptorsByNamespace_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (name == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableDescriptorsByNamespace_argsStandardSchemeFactory implements SchemeFactory { + public getTableDescriptorsByNamespace_argsStandardScheme getScheme() { + return new getTableDescriptorsByNamespace_argsStandardScheme(); + } + } + + private static class getTableDescriptorsByNamespace_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableDescriptorsByNamespace_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableDescriptorsByNamespace_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableDescriptorsByNamespace_argsTupleSchemeFactory implements SchemeFactory { + public getTableDescriptorsByNamespace_argsTupleScheme getScheme() { + return new getTableDescriptorsByNamespace_argsTupleScheme(); + } + } + + private static class getTableDescriptorsByNamespace_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableDescriptorsByNamespace_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.name); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableDescriptorsByNamespace_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + } + + } + + public static class getTableDescriptorsByNamespace_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableDescriptorsByNamespace_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableDescriptorsByNamespace_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableDescriptorsByNamespace_resultTupleSchemeFactory()); + } + + public List success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDescriptor.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableDescriptorsByNamespace_result.class, metaDataMap); + } + + public getTableDescriptorsByNamespace_result() { + } + + public getTableDescriptorsByNamespace_result( + List success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getTableDescriptorsByNamespace_result(getTableDescriptorsByNamespace_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (TTableDescriptor other_element : other.success) { + __this__success.add(new TTableDescriptor(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public getTableDescriptorsByNamespace_result deepCopy() { + return new getTableDescriptorsByNamespace_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TTableDescriptor elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getTableDescriptorsByNamespace_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public getTableDescriptorsByNamespace_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableDescriptorsByNamespace_result) + return this.equals((getTableDescriptorsByNamespace_result)that); + return false; + } + + public boolean equals(getTableDescriptorsByNamespace_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(getTableDescriptorsByNamespace_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableDescriptorsByNamespace_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableDescriptorsByNamespace_resultStandardSchemeFactory implements SchemeFactory { + public getTableDescriptorsByNamespace_resultStandardScheme getScheme() { + return new getTableDescriptorsByNamespace_resultStandardScheme(); + } + } + + private static class getTableDescriptorsByNamespace_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableDescriptorsByNamespace_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list294 = iprot.readListBegin(); + struct.success = new ArrayList(_list294.size); + TTableDescriptor _elem295; + for (int _i296 = 0; _i296 < _list294.size; ++_i296) + { + _elem295 = new TTableDescriptor(); + _elem295.read(iprot); + struct.success.add(_elem295); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableDescriptorsByNamespace_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TTableDescriptor _iter297 : struct.success) + { + _iter297.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableDescriptorsByNamespace_resultTupleSchemeFactory implements SchemeFactory { + public getTableDescriptorsByNamespace_resultTupleScheme getScheme() { + return new getTableDescriptorsByNamespace_resultTupleScheme(); + } + } + + private static class getTableDescriptorsByNamespace_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableDescriptorsByNamespace_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TTableDescriptor _iter298 : struct.success) + { + _iter298.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableDescriptorsByNamespace_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list299 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list299.size); + TTableDescriptor _elem300; + for (int _i301 = 0; _i301 < _list299.size; ++_i301) + { + _elem300 = new TTableDescriptor(); + _elem300.read(iprot); + struct.success.add(_elem300); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getTableNamesByPattern_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableNamesByPattern_args"); + + private static final org.apache.thrift.protocol.TField REGEX_FIELD_DESC = new org.apache.thrift.protocol.TField("regex", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField INCLUDE_SYS_TABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("includeSysTables", org.apache.thrift.protocol.TType.BOOL, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableNamesByPattern_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableNamesByPattern_argsTupleSchemeFactory()); + } + + public String regex; // required + public boolean includeSysTables; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REGEX((short)1, "regex"), + INCLUDE_SYS_TABLES((short)2, "includeSysTables"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REGEX + return REGEX; + case 2: // INCLUDE_SYS_TABLES + return INCLUDE_SYS_TABLES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __INCLUDESYSTABLES_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.REGEX, new org.apache.thrift.meta_data.FieldMetaData("regex", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.INCLUDE_SYS_TABLES, new org.apache.thrift.meta_data.FieldMetaData("includeSysTables", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableNamesByPattern_args.class, metaDataMap); + } + + public getTableNamesByPattern_args() { + } + + public getTableNamesByPattern_args( + String regex, + boolean includeSysTables) + { + this(); + this.regex = regex; + this.includeSysTables = includeSysTables; + setIncludeSysTablesIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public getTableNamesByPattern_args(getTableNamesByPattern_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetRegex()) { + this.regex = other.regex; + } + this.includeSysTables = other.includeSysTables; + } + + public getTableNamesByPattern_args deepCopy() { + return new getTableNamesByPattern_args(this); + } + + @Override + public void clear() { + this.regex = null; + setIncludeSysTablesIsSet(false); + this.includeSysTables = false; + } + + public String getRegex() { + return this.regex; + } + + public getTableNamesByPattern_args setRegex(String regex) { + this.regex = regex; + return this; + } + + public void unsetRegex() { + this.regex = null; + } + + /** Returns true if field regex is set (has been assigned a value) and false otherwise */ + public boolean isSetRegex() { + return this.regex != null; + } + + public void setRegexIsSet(boolean value) { + if (!value) { + this.regex = null; + } + } + + public boolean isIncludeSysTables() { + return this.includeSysTables; + } + + public getTableNamesByPattern_args setIncludeSysTables(boolean includeSysTables) { + this.includeSysTables = includeSysTables; + setIncludeSysTablesIsSet(true); + return this; + } + + public void unsetIncludeSysTables() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INCLUDESYSTABLES_ISSET_ID); + } + + /** Returns true if field includeSysTables is set (has been assigned a value) and false otherwise */ + public boolean isSetIncludeSysTables() { + return EncodingUtils.testBit(__isset_bitfield, __INCLUDESYSTABLES_ISSET_ID); + } + + public void setIncludeSysTablesIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INCLUDESYSTABLES_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REGEX: + if (value == null) { + unsetRegex(); + } else { + setRegex((String)value); + } + break; + + case INCLUDE_SYS_TABLES: + if (value == null) { + unsetIncludeSysTables(); + } else { + setIncludeSysTables((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REGEX: + return getRegex(); + + case INCLUDE_SYS_TABLES: + return isIncludeSysTables(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REGEX: + return isSetRegex(); + case INCLUDE_SYS_TABLES: + return isSetIncludeSysTables(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableNamesByPattern_args) + return this.equals((getTableNamesByPattern_args)that); + return false; + } + + public boolean equals(getTableNamesByPattern_args that) { + if (that == null) + return false; + + boolean this_present_regex = true && this.isSetRegex(); + boolean that_present_regex = true && that.isSetRegex(); + if (this_present_regex || that_present_regex) { + if (!(this_present_regex && that_present_regex)) + return false; + if (!this.regex.equals(that.regex)) + return false; + } + + boolean this_present_includeSysTables = true; + boolean that_present_includeSysTables = true; + if (this_present_includeSysTables || that_present_includeSysTables) { + if (!(this_present_includeSysTables && that_present_includeSysTables)) + return false; + if (this.includeSysTables != that.includeSysTables) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_regex = true && (isSetRegex()); + list.add(present_regex); + if (present_regex) + list.add(regex); + + boolean present_includeSysTables = true; + list.add(present_includeSysTables); + if (present_includeSysTables) + list.add(includeSysTables); + + return list.hashCode(); + } + + @Override + public int compareTo(getTableNamesByPattern_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRegex()).compareTo(other.isSetRegex()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRegex()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.regex, other.regex); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIncludeSysTables()).compareTo(other.isSetIncludeSysTables()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIncludeSysTables()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.includeSysTables, other.includeSysTables); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableNamesByPattern_args("); + boolean first = true; + + sb.append("regex:"); + if (this.regex == null) { + sb.append("null"); + } else { + sb.append(this.regex); + } + first = false; + if (!first) sb.append(", "); + sb.append("includeSysTables:"); + sb.append(this.includeSysTables); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (regex == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'regex' was not present! Struct: " + toString()); + } + // alas, we cannot check 'includeSysTables' because it's a primitive and you chose the non-beans generator. + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableNamesByPattern_argsStandardSchemeFactory implements SchemeFactory { + public getTableNamesByPattern_argsStandardScheme getScheme() { + return new getTableNamesByPattern_argsStandardScheme(); + } + } + + private static class getTableNamesByPattern_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableNamesByPattern_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // REGEX + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.regex = iprot.readString(); + struct.setRegexIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // INCLUDE_SYS_TABLES + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.includeSysTables = iprot.readBool(); + struct.setIncludeSysTablesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetIncludeSysTables()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'includeSysTables' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableNamesByPattern_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.regex != null) { + oprot.writeFieldBegin(REGEX_FIELD_DESC); + oprot.writeString(struct.regex); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(INCLUDE_SYS_TABLES_FIELD_DESC); + oprot.writeBool(struct.includeSysTables); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableNamesByPattern_argsTupleSchemeFactory implements SchemeFactory { + public getTableNamesByPattern_argsTupleScheme getScheme() { + return new getTableNamesByPattern_argsTupleScheme(); + } + } + + private static class getTableNamesByPattern_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableNamesByPattern_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.regex); + oprot.writeBool(struct.includeSysTables); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableNamesByPattern_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.regex = iprot.readString(); + struct.setRegexIsSet(true); + struct.includeSysTables = iprot.readBool(); + struct.setIncludeSysTablesIsSet(true); + } + } + + } + + public static class getTableNamesByPattern_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableNamesByPattern_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableNamesByPattern_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableNamesByPattern_resultTupleSchemeFactory()); + } + + public List success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableNamesByPattern_result.class, metaDataMap); + } + + public getTableNamesByPattern_result() { + } + + public getTableNamesByPattern_result( + List success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getTableNamesByPattern_result(getTableNamesByPattern_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (TTableName other_element : other.success) { + __this__success.add(new TTableName(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public getTableNamesByPattern_result deepCopy() { + return new getTableNamesByPattern_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TTableName elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getTableNamesByPattern_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public getTableNamesByPattern_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableNamesByPattern_result) + return this.equals((getTableNamesByPattern_result)that); + return false; + } + + public boolean equals(getTableNamesByPattern_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(getTableNamesByPattern_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableNamesByPattern_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableNamesByPattern_resultStandardSchemeFactory implements SchemeFactory { + public getTableNamesByPattern_resultStandardScheme getScheme() { + return new getTableNamesByPattern_resultStandardScheme(); + } + } + + private static class getTableNamesByPattern_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableNamesByPattern_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list302 = iprot.readListBegin(); + struct.success = new ArrayList(_list302.size); + TTableName _elem303; + for (int _i304 = 0; _i304 < _list302.size; ++_i304) + { + _elem303 = new TTableName(); + _elem303.read(iprot); + struct.success.add(_elem303); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableNamesByPattern_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TTableName _iter305 : struct.success) + { + _iter305.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableNamesByPattern_resultTupleSchemeFactory implements SchemeFactory { + public getTableNamesByPattern_resultTupleScheme getScheme() { + return new getTableNamesByPattern_resultTupleScheme(); + } + } + + private static class getTableNamesByPattern_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableNamesByPattern_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TTableName _iter306 : struct.success) + { + _iter306.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableNamesByPattern_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list307 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list307.size); + TTableName _elem308; + for (int _i309 = 0; _i309 < _list307.size; ++_i309) + { + _elem308 = new TTableName(); + _elem308.read(iprot); + struct.success.add(_elem308); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getTableNamesByNamespace_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableNamesByNamespace_args"); + + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableNamesByNamespace_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableNamesByNamespace_argsTupleSchemeFactory()); + } + + public String name; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)1, "name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableNamesByNamespace_args.class, metaDataMap); + } + + public getTableNamesByNamespace_args() { + } + + public getTableNamesByNamespace_args( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public getTableNamesByNamespace_args(getTableNamesByNamespace_args other) { + if (other.isSetName()) { + this.name = other.name; + } + } + + public getTableNamesByNamespace_args deepCopy() { + return new getTableNamesByNamespace_args(this); + } + + @Override + public void clear() { + this.name = null; + } + + public String getName() { + return this.name; + } + + public getTableNamesByNamespace_args setName(String name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableNamesByNamespace_args) + return this.equals((getTableNamesByNamespace_args)that); + return false; + } + + public boolean equals(getTableNamesByNamespace_args that) { + if (that == null) + return false; + + 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; + if (!this.name.equals(that.name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + return list.hashCode(); + } + + @Override + public int compareTo(getTableNamesByNamespace_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableNamesByNamespace_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (name == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableNamesByNamespace_argsStandardSchemeFactory implements SchemeFactory { + public getTableNamesByNamespace_argsStandardScheme getScheme() { + return new getTableNamesByNamespace_argsStandardScheme(); + } + } + + private static class getTableNamesByNamespace_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableNamesByNamespace_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableNamesByNamespace_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableNamesByNamespace_argsTupleSchemeFactory implements SchemeFactory { + public getTableNamesByNamespace_argsTupleScheme getScheme() { + return new getTableNamesByNamespace_argsTupleScheme(); + } + } + + private static class getTableNamesByNamespace_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableNamesByNamespace_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.name); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableNamesByNamespace_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + } + + } + + public static class getTableNamesByNamespace_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableNamesByNamespace_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableNamesByNamespace_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableNamesByNamespace_resultTupleSchemeFactory()); + } + + public List success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableNamesByNamespace_result.class, metaDataMap); + } + + public getTableNamesByNamespace_result() { + } + + public getTableNamesByNamespace_result( + List success, + TIOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getTableNamesByNamespace_result(getTableNamesByNamespace_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (TTableName other_element : other.success) { + __this__success.add(new TTableName(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public getTableNamesByNamespace_result deepCopy() { + return new getTableNamesByNamespace_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TTableName elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getTableNamesByNamespace_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TIOError getIo() { + return this.io; + } + + public getTableNamesByNamespace_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableNamesByNamespace_result) + return this.equals((getTableNamesByNamespace_result)that); + return false; + } + + public boolean equals(getTableNamesByNamespace_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(getTableNamesByNamespace_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableNamesByNamespace_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableNamesByNamespace_resultStandardSchemeFactory implements SchemeFactory { + public getTableNamesByNamespace_resultStandardScheme getScheme() { + return new getTableNamesByNamespace_resultStandardScheme(); + } + } + + private static class getTableNamesByNamespace_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableNamesByNamespace_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list310 = iprot.readListBegin(); + struct.success = new ArrayList(_list310.size); + TTableName _elem311; + for (int _i312 = 0; _i312 < _list310.size; ++_i312) + { + _elem311 = new TTableName(); + _elem311.read(iprot); + struct.success.add(_elem311); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableNamesByNamespace_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TTableName _iter313 : struct.success) + { + _iter313.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableNamesByNamespace_resultTupleSchemeFactory implements SchemeFactory { + public getTableNamesByNamespace_resultTupleScheme getScheme() { + return new getTableNamesByNamespace_resultTupleScheme(); + } + } + + private static class getTableNamesByNamespace_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableNamesByNamespace_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TTableName _iter314 : struct.success) + { + _iter314.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableNamesByNamespace_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list315 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list315.size); + TTableName _elem316; + for (int _i317 = 0; _i317 < _list315.size; ++_i317) + { + _elem316 = new TTableName(); + _elem316.read(iprot); + struct.success.add(_elem316); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class createTable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTable_args"); + + private static final org.apache.thrift.protocol.TField DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("desc", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField SPLIT_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("splitKeys", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new createTable_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createTable_argsTupleSchemeFactory()); + } + + public TTableDescriptor desc; // required + public List splitKeys; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DESC((short)1, "desc"), + SPLIT_KEYS((short)2, "splitKeys"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DESC + return DESC; + case 2: // SPLIT_KEYS + return SPLIT_KEYS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DESC, new org.apache.thrift.meta_data.FieldMetaData("desc", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDescriptor.class))); + tmpMap.put(_Fields.SPLIT_KEYS, new org.apache.thrift.meta_data.FieldMetaData("splitKeys", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTable_args.class, metaDataMap); + } + + public createTable_args() { + } + + public createTable_args( + TTableDescriptor desc, + List splitKeys) + { + this(); + this.desc = desc; + this.splitKeys = splitKeys; + } + + /** + * Performs a deep copy on other. + */ + public createTable_args(createTable_args other) { + if (other.isSetDesc()) { + this.desc = new TTableDescriptor(other.desc); + } + if (other.isSetSplitKeys()) { + List __this__splitKeys = new ArrayList(other.splitKeys); + this.splitKeys = __this__splitKeys; + } + } + + public createTable_args deepCopy() { + return new createTable_args(this); + } + + @Override + public void clear() { + this.desc = null; + this.splitKeys = null; + } + + public TTableDescriptor getDesc() { + return this.desc; + } + + public createTable_args setDesc(TTableDescriptor desc) { + this.desc = desc; return this; } - public void unsetIo() { - this.io = null; + public void unsetDesc() { + this.desc = null; } - /** Returns true if field io is set (has been assigned a value) and false otherwise */ - public boolean isSetIo() { - return this.io != null; + /** Returns true if field desc is set (has been assigned a value) and false otherwise */ + public boolean isSetDesc() { + return this.desc != null; } - public void setIoIsSet(boolean value) { + public void setDescIsSet(boolean value) { if (!value) { - this.io = null; + this.desc = null; + } + } + + public int getSplitKeysSize() { + return (this.splitKeys == null) ? 0 : this.splitKeys.size(); + } + + public java.util.Iterator getSplitKeysIterator() { + return (this.splitKeys == null) ? null : this.splitKeys.iterator(); + } + + public void addToSplitKeys(ByteBuffer elem) { + if (this.splitKeys == null) { + this.splitKeys = new ArrayList(); + } + this.splitKeys.add(elem); + } + + public List getSplitKeys() { + return this.splitKeys; + } + + public createTable_args setSplitKeys(List splitKeys) { + this.splitKeys = splitKeys; + return this; + } + + public void unsetSplitKeys() { + this.splitKeys = null; + } + + /** Returns true if field splitKeys is set (has been assigned a value) and false otherwise */ + public boolean isSetSplitKeys() { + return this.splitKeys != null; + } + + public void setSplitKeysIsSet(boolean value) { + if (!value) { + this.splitKeys = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DESC: if (value == null) { - unsetSuccess(); + unsetDesc(); } else { - setSuccess((Boolean)value); + setDesc((TTableDescriptor)value); } break; - case IO: + case SPLIT_KEYS: if (value == null) { - unsetIo(); + unsetSplitKeys(); } else { - setIo((TIOError)value); + setSplitKeys((List)value); } break; @@ -4051,11 +34991,11 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return isSuccess(); + case DESC: + return getDesc(); - case IO: - return getIo(); + case SPLIT_KEYS: + return getSplitKeys(); } throw new IllegalStateException(); @@ -4068,10 +35008,10 @@ public class THBaseService { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case IO: - return isSetIo(); + case DESC: + return isSetDesc(); + case SPLIT_KEYS: + return isSetSplitKeys(); } throw new IllegalStateException(); } @@ -4080,30 +35020,30 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof exists_result) - return this.equals((exists_result)that); + if (that instanceof createTable_args) + return this.equals((createTable_args)that); return false; } - public boolean equals(exists_result that) { + public boolean equals(createTable_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_desc = true && this.isSetDesc(); + boolean that_present_desc = true && that.isSetDesc(); + if (this_present_desc || that_present_desc) { + if (!(this_present_desc && that_present_desc)) return false; - if (this.success != that.success) + if (!this.desc.equals(that.desc)) return false; } - boolean this_present_io = true && this.isSetIo(); - boolean that_present_io = true && that.isSetIo(); - if (this_present_io || that_present_io) { - if (!(this_present_io && that_present_io)) + boolean this_present_splitKeys = true && this.isSetSplitKeys(); + boolean that_present_splitKeys = true && that.isSetSplitKeys(); + if (this_present_splitKeys || that_present_splitKeys) { + if (!(this_present_splitKeys && that_present_splitKeys)) return false; - if (!this.io.equals(that.io)) + if (!this.splitKeys.equals(that.splitKeys)) return false; } @@ -4114,37 +35054,455 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); + boolean present_desc = true && (isSetDesc()); + list.add(present_desc); + if (present_desc) + list.add(desc); - boolean present_io = true && (isSetIo()); - list.add(present_io); - if (present_io) - list.add(io); + boolean present_splitKeys = true && (isSetSplitKeys()); + list.add(present_splitKeys); + if (present_splitKeys) + list.add(splitKeys); return list.hashCode(); } @Override - public int compareTo(exists_result other) { + public int compareTo(createTable_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetDesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSplitKeys()).compareTo(other.isSetSplitKeys()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSplitKeys()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.splitKeys, other.splitKeys); if (lastComparison != 0) { return lastComparison; } } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("createTable_args("); + boolean first = true; + + sb.append("desc:"); + if (this.desc == null) { + sb.append("null"); + } else { + sb.append(this.desc); + } + first = false; + if (!first) sb.append(", "); + sb.append("splitKeys:"); + if (this.splitKeys == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.splitKeys, sb); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (desc == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'desc' was not present! Struct: " + toString()); + } + if (splitKeys == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'splitKeys' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (desc != null) { + desc.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class createTable_argsStandardSchemeFactory implements SchemeFactory { + public createTable_argsStandardScheme getScheme() { + return new createTable_argsStandardScheme(); + } + } + + private static class createTable_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, createTable_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DESC + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.desc = new TTableDescriptor(); + struct.desc.read(iprot); + struct.setDescIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // SPLIT_KEYS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list318 = iprot.readListBegin(); + struct.splitKeys = new ArrayList(_list318.size); + ByteBuffer _elem319; + for (int _i320 = 0; _i320 < _list318.size; ++_i320) + { + _elem319 = iprot.readBinary(); + struct.splitKeys.add(_elem319); + } + iprot.readListEnd(); + } + struct.setSplitKeysIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, createTable_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.desc != null) { + oprot.writeFieldBegin(DESC_FIELD_DESC); + struct.desc.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.splitKeys != null) { + oprot.writeFieldBegin(SPLIT_KEYS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.splitKeys.size())); + for (ByteBuffer _iter321 : struct.splitKeys) + { + oprot.writeBinary(_iter321); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createTable_argsTupleSchemeFactory implements SchemeFactory { + public createTable_argsTupleScheme getScheme() { + return new createTable_argsTupleScheme(); + } + } + + private static class createTable_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createTable_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.desc.write(oprot); + { + oprot.writeI32(struct.splitKeys.size()); + for (ByteBuffer _iter322 : struct.splitKeys) + { + oprot.writeBinary(_iter322); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createTable_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.desc = new TTableDescriptor(); + struct.desc.read(iprot); + struct.setDescIsSet(true); + { + org.apache.thrift.protocol.TList _list323 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.splitKeys = new ArrayList(_list323.size); + ByteBuffer _elem324; + for (int _i325 = 0; _i325 < _list323.size; ++_i325) + { + _elem324 = iprot.readBinary(); + struct.splitKeys.add(_elem324); + } + } + struct.setSplitKeysIsSet(true); + } + } + + } + + public static class createTable_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTable_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new createTable_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createTable_resultTupleSchemeFactory()); + } + + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTable_result.class, metaDataMap); + } + + public createTable_result() { + } + + public createTable_result( + TIOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public createTable_result(createTable_result other) { + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public createTable_result deepCopy() { + return new createTable_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public TIOError getIo() { + return this.io; + } + + public createTable_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof createTable_result) + return this.equals((createTable_result)that); + return false; + } + + public boolean equals(createTable_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); + } + + @Override + public int compareTo(createTable_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); if (lastComparison != 0) { return lastComparison; @@ -4172,13 +35530,9 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("exists_result("); + StringBuilder sb = new StringBuilder("createTable_result("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); sb.append("io:"); if (this.io == null) { sb.append("null"); @@ -4205,23 +35559,21 @@ public class THBaseService { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class exists_resultStandardSchemeFactory implements SchemeFactory { - public exists_resultStandardScheme getScheme() { - return new exists_resultStandardScheme(); + private static class createTable_resultStandardSchemeFactory implements SchemeFactory { + public createTable_resultStandardScheme getScheme() { + return new createTable_resultStandardScheme(); } } - private static class exists_resultStandardScheme extends StandardScheme { + private static class createTable_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, exists_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, createTable_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -4231,14 +35583,6 @@ public class THBaseService { break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; case 1: // IO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.io = new TIOError(); @@ -4259,15 +35603,10 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, exists_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, createTable_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } if (struct.io != null) { oprot.writeFieldBegin(IO_FIELD_DESC); struct.io.write(oprot); @@ -4279,42 +35618,32 @@ public class THBaseService { } - private static class exists_resultTupleSchemeFactory implements SchemeFactory { - public exists_resultTupleScheme getScheme() { - return new exists_resultTupleScheme(); + private static class createTable_resultTupleSchemeFactory implements SchemeFactory { + public createTable_resultTupleScheme getScheme() { + return new createTable_resultTupleScheme(); } } - private static class exists_resultTupleScheme extends TupleScheme { + private static class createTable_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, createTable_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } if (struct.isSetIo()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); + optionals.set(0); } + oprot.writeBitSet(optionals, 1); if (struct.isSetIo()) { struct.io.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, createTable_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { struct.io = new TIOError(); struct.io.read(iprot); struct.setIoIsSet(true); @@ -4324,37 +35653,22 @@ public class THBaseService { } - public static class existsAll_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("existsAll_args"); + public static class deleteTable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteTable_args"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TGETS_FIELD_DESC = new org.apache.thrift.protocol.TField("tgets", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new existsAll_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new existsAll_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new deleteTable_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteTable_argsTupleSchemeFactory()); } - /** - * the table to check on - */ - public ByteBuffer table; // required - /** - * a list of TGets to check for - */ - public List tgets; // required + public TTableName tableName; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the table to check on - */ - TABLE((short)1, "table"), - /** - * a list of TGets to check for - */ - TGETS((short)2, "tgets"); + TABLE_NAME((short)1, "tableName"); private static final Map byName = new HashMap(); @@ -4369,10 +35683,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // TGETS - return TGETS; + case 1: // TABLE_NAME + return TABLE_NAME; default: return null; } @@ -4416,153 +35728,71 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TGETS, new org.apache.thrift.meta_data.FieldMetaData("tgets", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGet.class)))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(existsAll_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteTable_args.class, metaDataMap); } - public existsAll_args() { + public deleteTable_args() { } - public existsAll_args( - ByteBuffer table, - List tgets) + public deleteTable_args( + TTableName tableName) { this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.tgets = tgets; + this.tableName = tableName; } /** * Performs a deep copy on other. */ - public existsAll_args(existsAll_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetTgets()) { - List __this__tgets = new ArrayList(other.tgets.size()); - for (TGet other_element : other.tgets) { - __this__tgets.add(new TGet(other_element)); - } - this.tgets = __this__tgets; + public deleteTable_args(deleteTable_args other) { + if (other.isSetTableName()) { + this.tableName = new TTableName(other.tableName); } } - public existsAll_args deepCopy() { - return new existsAll_args(this); + public deleteTable_args deepCopy() { + return new deleteTable_args(this); } @Override public void clear() { - this.table = null; - this.tgets = null; - } - - /** - * the table to check on - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); - } - - /** - * the table to check on - */ - public existsAll_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; - } - - public existsAll_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; - } - - public void unsetTable() { - this.table = null; - } - - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; - } - - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } - } - - public int getTgetsSize() { - return (this.tgets == null) ? 0 : this.tgets.size(); - } - - public java.util.Iterator getTgetsIterator() { - return (this.tgets == null) ? null : this.tgets.iterator(); - } - - public void addToTgets(TGet elem) { - if (this.tgets == null) { - this.tgets = new ArrayList(); - } - this.tgets.add(elem); + this.tableName = null; } - /** - * a list of TGets to check for - */ - public List getTgets() { - return this.tgets; + public TTableName getTableName() { + return this.tableName; } - /** - * a list of TGets to check for - */ - public existsAll_args setTgets(List tgets) { - this.tgets = tgets; + public deleteTable_args setTableName(TTableName tableName) { + this.tableName = tableName; return this; } - public void unsetTgets() { - this.tgets = null; + public void unsetTableName() { + this.tableName = null; } - /** Returns true if field tgets is set (has been assigned a value) and false otherwise */ - public boolean isSetTgets() { - return this.tgets != null; + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; } - public void setTgetsIsSet(boolean value) { + public void setTableNameIsSet(boolean value) { if (!value) { - this.tgets = null; + this.tableName = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; - - case TGETS: + case TABLE_NAME: if (value == null) { - unsetTgets(); + unsetTableName(); } else { - setTgets((List)value); + setTableName((TTableName)value); } break; @@ -4571,11 +35801,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); - - case TGETS: - return getTgets(); + case TABLE_NAME: + return getTableName(); } throw new IllegalStateException(); @@ -4588,10 +35815,8 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case TGETS: - return isSetTgets(); + case TABLE_NAME: + return isSetTableName(); } throw new IllegalStateException(); } @@ -4600,30 +35825,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof existsAll_args) - return this.equals((existsAll_args)that); + if (that instanceof deleteTable_args) + return this.equals((deleteTable_args)that); return false; } - public boolean equals(existsAll_args that) { + public boolean equals(deleteTable_args that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; - } - - boolean this_present_tgets = true && this.isSetTgets(); - boolean that_present_tgets = true && that.isSetTgets(); - if (this_present_tgets || that_present_tgets) { - if (!(this_present_tgets && that_present_tgets)) + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) return false; - if (!this.tgets.equals(that.tgets)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -4634,43 +35850,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - boolean present_tgets = true && (isSetTgets()); - list.add(present_tgets); - if (present_tgets) - list.add(tgets); + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); return list.hashCode(); } @Override - public int compareTo(existsAll_args other) { + public int compareTo(deleteTable_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTgets()).compareTo(other.isSetTgets()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - if (isSetTgets()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tgets, other.tgets); + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } @@ -4692,22 +35893,14 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("existsAll_args("); + StringBuilder sb = new StringBuilder("deleteTable_args("); boolean first = true; - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("tgets:"); - if (this.tgets == null) { + sb.append("tableName:"); + if (this.tableName == null) { sb.append("null"); } else { - sb.append(this.tgets); + sb.append(this.tableName); } first = false; sb.append(")"); @@ -4716,13 +35909,13 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (tgets == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tgets' was not present! Struct: " + toString()); + if (tableName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString()); } // check for sub-struct validity + if (tableName != null) { + tableName.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -4741,15 +35934,15 @@ public class THBaseService { } } - private static class existsAll_argsStandardSchemeFactory implements SchemeFactory { - public existsAll_argsStandardScheme getScheme() { - return new existsAll_argsStandardScheme(); + private static class deleteTable_argsStandardSchemeFactory implements SchemeFactory { + public deleteTable_argsStandardScheme getScheme() { + return new deleteTable_argsStandardScheme(); } } - private static class existsAll_argsStandardScheme extends StandardScheme { + private static class deleteTable_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, existsAll_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteTable_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -4759,29 +35952,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TGETS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list142 = iprot.readListBegin(); - struct.tgets = new ArrayList(_list142.size); - TGet _elem143; - for (int _i144 = 0; _i144 < _list142.size; ++_i144) - { - _elem143 = new TGet(); - _elem143.read(iprot); - struct.tgets.add(_elem143); - } - iprot.readListEnd(); - } - struct.setTgetsIsSet(true); + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -4797,25 +35972,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, existsAll_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteTable_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.tgets != null) { - oprot.writeFieldBegin(TGETS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tgets.size())); - for (TGet _iter145 : struct.tgets) - { - _iter145.write(oprot); - } - oprot.writeListEnd(); - } + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + struct.tableName.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -4824,67 +35987,46 @@ public class THBaseService { } - private static class existsAll_argsTupleSchemeFactory implements SchemeFactory { - public existsAll_argsTupleScheme getScheme() { - return new existsAll_argsTupleScheme(); + private static class deleteTable_argsTupleSchemeFactory implements SchemeFactory { + public deleteTable_argsTupleScheme getScheme() { + return new deleteTable_argsTupleScheme(); } } - private static class existsAll_argsTupleScheme extends TupleScheme { + private static class deleteTable_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, existsAll_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, deleteTable_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - { - oprot.writeI32(struct.tgets.size()); - for (TGet _iter146 : struct.tgets) - { - _iter146.write(oprot); - } - } + struct.tableName.write(oprot); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, existsAll_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, deleteTable_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - { - org.apache.thrift.protocol.TList _list147 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.tgets = new ArrayList(_list147.size); - TGet _elem148; - for (int _i149 = 0; _i149 < _list147.size; ++_i149) - { - _elem148 = new TGet(); - _elem148.read(iprot); - struct.tgets.add(_elem148); - } - } - struct.setTgetsIsSet(true); + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } } } - public static class existsAll_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("existsAll_result"); + public static class deleteTable_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteTable_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new existsAll_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new existsAll_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new deleteTable_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteTable_resultTupleSchemeFactory()); } - public List success; // required public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), IO((short)1, "io"); private static final Map byName = new HashMap(); @@ -4900,8 +36042,6 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; case 1: // IO return IO; default: @@ -4947,94 +36087,45 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)))); tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(existsAll_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteTable_result.class, metaDataMap); } - public existsAll_result() { + public deleteTable_result() { } - public existsAll_result( - List success, + public deleteTable_result( TIOError io) { this(); - this.success = success; this.io = io; } /** * Performs a deep copy on other. */ - public existsAll_result(existsAll_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } + public deleteTable_result(deleteTable_result other) { if (other.isSetIo()) { this.io = new TIOError(other.io); } } - public existsAll_result deepCopy() { - return new existsAll_result(this); + public deleteTable_result deepCopy() { + return new deleteTable_result(this); } @Override public void clear() { - this.success = null; this.io = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(boolean elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public existsAll_result setSuccess(List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - public TIOError getIo() { return this.io; } - public existsAll_result setIo(TIOError io) { + public deleteTable_result setIo(TIOError io) { this.io = io; return this; } @@ -5056,14 +36147,6 @@ public class THBaseService { public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - case IO: if (value == null) { unsetIo(); @@ -5077,9 +36160,6 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - case IO: return getIo(); @@ -5094,8 +36174,6 @@ public class THBaseService { } switch (field) { - case SUCCESS: - return isSetSuccess(); case IO: return isSetIo(); } @@ -5106,24 +36184,15 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof existsAll_result) - return this.equals((existsAll_result)that); + if (that instanceof deleteTable_result) + return this.equals((deleteTable_result)that); return false; } - public boolean equals(existsAll_result that) { + public boolean equals(deleteTable_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - boolean this_present_io = true && this.isSetIo(); boolean that_present_io = true && that.isSetIo(); if (this_present_io || that_present_io) { @@ -5140,11 +36209,6 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - boolean present_io = true && (isSetIo()); list.add(present_io); if (present_io) @@ -5154,23 +36218,13 @@ public class THBaseService { } @Override - public int compareTo(existsAll_result other) { + public int compareTo(deleteTable_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); if (lastComparison != 0) { return lastComparison; @@ -5198,17 +36252,9 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("existsAll_result("); + StringBuilder sb = new StringBuilder("deleteTable_result("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); sb.append("io:"); if (this.io == null) { sb.append("null"); @@ -5241,15 +36287,15 @@ public class THBaseService { } } - private static class existsAll_resultStandardSchemeFactory implements SchemeFactory { - public existsAll_resultStandardScheme getScheme() { - return new existsAll_resultStandardScheme(); + private static class deleteTable_resultStandardSchemeFactory implements SchemeFactory { + public deleteTable_resultStandardScheme getScheme() { + return new deleteTable_resultStandardScheme(); } } - private static class existsAll_resultStandardScheme extends StandardScheme { + private static class deleteTable_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, existsAll_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteTable_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -5259,24 +36305,6 @@ public class THBaseService { break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list150 = iprot.readListBegin(); - struct.success = new ArrayList(_list150.size); - boolean _elem151; - for (int _i152 = 0; _i152 < _list150.size; ++_i152) - { - _elem151 = iprot.readBool(); - struct.success.add(_elem151); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; case 1: // IO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.io = new TIOError(); @@ -5297,22 +36325,10 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, existsAll_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteTable_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, struct.success.size())); - for (boolean _iter153 : struct.success) - { - oprot.writeBool(_iter153); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } if (struct.io != null) { oprot.writeFieldBegin(IO_FIELD_DESC); struct.io.write(oprot); @@ -5324,57 +36340,32 @@ public class THBaseService { } - private static class existsAll_resultTupleSchemeFactory implements SchemeFactory { - public existsAll_resultTupleScheme getScheme() { - return new existsAll_resultTupleScheme(); + private static class deleteTable_resultTupleSchemeFactory implements SchemeFactory { + public deleteTable_resultTupleScheme getScheme() { + return new deleteTable_resultTupleScheme(); } } - private static class existsAll_resultTupleScheme extends TupleScheme { + private static class deleteTable_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, existsAll_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, deleteTable_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } if (struct.isSetIo()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (boolean _iter154 : struct.success) - { - oprot.writeBool(_iter154); - } - } + optionals.set(0); } + oprot.writeBitSet(optionals, 1); if (struct.isSetIo()) { struct.io.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, existsAll_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, deleteTable_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list155 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, iprot.readI32()); - struct.success = new ArrayList(_list155.size); - boolean _elem156; - for (int _i157 = 0; _i157 < _list155.size; ++_i157) - { - _elem156 = iprot.readBool(); - struct.success.add(_elem156); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { struct.io = new TIOError(); struct.io.read(iprot); struct.setIoIsSet(true); @@ -5384,37 +36375,22 @@ public class THBaseService { } - public static class get_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_args"); + public static class deleteTableByPattern_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteTableByPattern_args"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TGET_FIELD_DESC = new org.apache.thrift.protocol.TField("tget", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField REGEX_FIELD_DESC = new org.apache.thrift.protocol.TField("regex", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new get_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new deleteTableByPattern_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteTableByPattern_argsTupleSchemeFactory()); } - /** - * the table to get from - */ - public ByteBuffer table; // required - /** - * the TGet to fetch - */ - public TGet tget; // required + public String regex; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the table to get from - */ - TABLE((short)1, "table"), - /** - * the TGet to fetch - */ - TGET((short)2, "tget"); + REGEX((short)1, "regex"); private static final Map byName = new HashMap(); @@ -5429,10 +36405,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // TGET - return TGET; + case 1: // REGEX + return REGEX; default: return null; } @@ -5476,133 +36450,71 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TGET, new org.apache.thrift.meta_data.FieldMetaData("tget", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGet.class))); + tmpMap.put(_Fields.REGEX, new org.apache.thrift.meta_data.FieldMetaData("regex", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteTableByPattern_args.class, metaDataMap); } - public get_args() { + public deleteTableByPattern_args() { } - public get_args( - ByteBuffer table, - TGet tget) + public deleteTableByPattern_args( + String regex) { this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.tget = tget; + this.regex = regex; } /** * Performs a deep copy on other. */ - public get_args(get_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetTget()) { - this.tget = new TGet(other.tget); + public deleteTableByPattern_args(deleteTableByPattern_args other) { + if (other.isSetRegex()) { + this.regex = other.regex; } } - public get_args deepCopy() { - return new get_args(this); + public deleteTableByPattern_args deepCopy() { + return new deleteTableByPattern_args(this); } @Override public void clear() { - this.table = null; - this.tget = null; + this.regex = null; } - /** - * the table to get from - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); + public String getRegex() { + return this.regex; } - /** - * the table to get from - */ - public get_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; - } - - public get_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; - } - - public void unsetTable() { - this.table = null; - } - - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; - } - - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } - } - - /** - * the TGet to fetch - */ - public TGet getTget() { - return this.tget; - } - - /** - * the TGet to fetch - */ - public get_args setTget(TGet tget) { - this.tget = tget; + public deleteTableByPattern_args setRegex(String regex) { + this.regex = regex; return this; } - public void unsetTget() { - this.tget = null; + public void unsetRegex() { + this.regex = null; } - /** Returns true if field tget is set (has been assigned a value) and false otherwise */ - public boolean isSetTget() { - return this.tget != null; + /** Returns true if field regex is set (has been assigned a value) and false otherwise */ + public boolean isSetRegex() { + return this.regex != null; } - public void setTgetIsSet(boolean value) { + public void setRegexIsSet(boolean value) { if (!value) { - this.tget = null; + this.regex = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; - - case TGET: + case REGEX: if (value == null) { - unsetTget(); + unsetRegex(); } else { - setTget((TGet)value); + setRegex((String)value); } break; @@ -5611,11 +36523,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); - - case TGET: - return getTget(); + case REGEX: + return getRegex(); } throw new IllegalStateException(); @@ -5628,10 +36537,8 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case TGET: - return isSetTget(); + case REGEX: + return isSetRegex(); } throw new IllegalStateException(); } @@ -5640,30 +36547,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_args) - return this.equals((get_args)that); + if (that instanceof deleteTableByPattern_args) + return this.equals((deleteTableByPattern_args)that); return false; } - public boolean equals(get_args that) { + public boolean equals(deleteTableByPattern_args that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) + boolean this_present_regex = true && this.isSetRegex(); + boolean that_present_regex = true && that.isSetRegex(); + if (this_present_regex || that_present_regex) { + if (!(this_present_regex && that_present_regex)) return false; - if (!this.table.equals(that.table)) - return false; - } - - boolean this_present_tget = true && this.isSetTget(); - boolean that_present_tget = true && that.isSetTget(); - if (this_present_tget || that_present_tget) { - if (!(this_present_tget && that_present_tget)) - return false; - if (!this.tget.equals(that.tget)) + if (!this.regex.equals(that.regex)) return false; } @@ -5674,43 +36572,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - boolean present_tget = true && (isSetTget()); - list.add(present_tget); - if (present_tget) - list.add(tget); + boolean present_regex = true && (isSetRegex()); + list.add(present_regex); + if (present_regex) + list.add(regex); return list.hashCode(); } @Override - public int compareTo(get_args other) { + public int compareTo(deleteTableByPattern_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + lastComparison = Boolean.valueOf(isSetRegex()).compareTo(other.isSetRegex()); if (lastComparison != 0) { return lastComparison; } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTget()).compareTo(other.isSetTget()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTget()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tget, other.tget); + if (isSetRegex()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.regex, other.regex); if (lastComparison != 0) { return lastComparison; } @@ -5732,22 +36615,14 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("get_args("); + StringBuilder sb = new StringBuilder("deleteTableByPattern_args("); boolean first = true; - sb.append("table:"); - if (this.table == null) { + sb.append("regex:"); + if (this.regex == null) { sb.append("null"); } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("tget:"); - if (this.tget == null) { - sb.append("null"); - } else { - sb.append(this.tget); + sb.append(this.regex); } first = false; sb.append(")"); @@ -5756,16 +36631,10 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (tget == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tget' was not present! Struct: " + toString()); + if (regex == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'regex' was not present! Struct: " + toString()); } // check for sub-struct validity - if (tget != null) { - tget.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -5784,15 +36653,15 @@ public class THBaseService { } } - private static class get_argsStandardSchemeFactory implements SchemeFactory { - public get_argsStandardScheme getScheme() { - return new get_argsStandardScheme(); + private static class deleteTableByPattern_argsStandardSchemeFactory implements SchemeFactory { + public deleteTableByPattern_argsStandardScheme getScheme() { + return new deleteTableByPattern_argsStandardScheme(); } } - private static class get_argsStandardScheme extends StandardScheme { + private static class deleteTableByPattern_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, get_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteTableByPattern_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -5802,19 +36671,10 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE + case 1: // REGEX if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TGET - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tget = new TGet(); - struct.tget.read(iprot); - struct.setTgetIsSet(true); + struct.regex = iprot.readString(); + struct.setRegexIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -5830,18 +36690,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, get_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteTableByPattern_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.tget != null) { - oprot.writeFieldBegin(TGET_FIELD_DESC); - struct.tget.write(oprot); + if (struct.regex != null) { + oprot.writeFieldBegin(REGEX_FIELD_DESC); + oprot.writeString(struct.regex); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -5850,47 +36705,43 @@ public class THBaseService { } - private static class get_argsTupleSchemeFactory implements SchemeFactory { - public get_argsTupleScheme getScheme() { - return new get_argsTupleScheme(); + private static class deleteTableByPattern_argsTupleSchemeFactory implements SchemeFactory { + public deleteTableByPattern_argsTupleScheme getScheme() { + return new deleteTableByPattern_argsTupleScheme(); } } - private static class get_argsTupleScheme extends TupleScheme { + private static class deleteTableByPattern_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, deleteTableByPattern_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - struct.tget.write(oprot); + oprot.writeString(struct.regex); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, deleteTableByPattern_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - struct.tget = new TGet(); - struct.tget.read(iprot); - struct.setTgetIsSet(true); + struct.regex = iprot.readString(); + struct.setRegexIsSet(true); } } } - public static class get_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_result"); + public static class deleteTableByPattern_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteTableByPattern_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new get_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new deleteTableByPattern_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteTableByPattern_resultTupleSchemeFactory()); } - public TResult success; // required + public List success; // required public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -5959,18 +36810,19 @@ public class THBaseService { static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class))); + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDescriptor.class)))); tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteTableByPattern_result.class, metaDataMap); } - public get_result() { + public deleteTableByPattern_result() { } - public get_result( - TResult success, + public deleteTableByPattern_result( + List success, TIOError io) { this(); @@ -5981,17 +36833,21 @@ public class THBaseService { /** * Performs a deep copy on other. */ - public get_result(get_result other) { + public deleteTableByPattern_result(deleteTableByPattern_result other) { if (other.isSetSuccess()) { - this.success = new TResult(other.success); + List __this__success = new ArrayList(other.success.size()); + for (TTableDescriptor other_element : other.success) { + __this__success.add(new TTableDescriptor(other_element)); + } + this.success = __this__success; } if (other.isSetIo()) { this.io = new TIOError(other.io); } } - public get_result deepCopy() { - return new get_result(this); + public deleteTableByPattern_result deepCopy() { + return new deleteTableByPattern_result(this); } @Override @@ -6000,11 +36856,26 @@ public class THBaseService { this.io = null; } - public TResult getSuccess() { + 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(TTableDescriptor elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { return this.success; } - public get_result setSuccess(TResult success) { + public deleteTableByPattern_result setSuccess(List success) { this.success = success; return this; } @@ -6028,7 +36899,7 @@ public class THBaseService { return this.io; } - public get_result setIo(TIOError io) { + public deleteTableByPattern_result setIo(TIOError io) { this.io = io; return this; } @@ -6054,7 +36925,7 @@ public class THBaseService { if (value == null) { unsetSuccess(); } else { - setSuccess((TResult)value); + setSuccess((List)value); } break; @@ -6100,12 +36971,12 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_result) - return this.equals((get_result)that); + if (that instanceof deleteTableByPattern_result) + return this.equals((deleteTableByPattern_result)that); return false; } - public boolean equals(get_result that) { + public boolean equals(deleteTableByPattern_result that) { if (that == null) return false; @@ -6148,7 +37019,7 @@ public class THBaseService { } @Override - public int compareTo(get_result other) { + public int compareTo(deleteTableByPattern_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -6192,7 +37063,7 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("get_result("); + StringBuilder sb = new StringBuilder("deleteTableByPattern_result("); boolean first = true; sb.append("success:"); @@ -6217,9 +37088,6 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (success != null) { - success.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -6238,15 +37106,15 @@ public class THBaseService { } } - private static class get_resultStandardSchemeFactory implements SchemeFactory { - public get_resultStandardScheme getScheme() { - return new get_resultStandardScheme(); + private static class deleteTableByPattern_resultStandardSchemeFactory implements SchemeFactory { + public deleteTableByPattern_resultStandardScheme getScheme() { + return new deleteTableByPattern_resultStandardScheme(); } } - private static class get_resultStandardScheme extends StandardScheme { + private static class deleteTableByPattern_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, get_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteTableByPattern_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -6257,9 +37125,19 @@ public class THBaseService { } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TResult(); - struct.success.read(iprot); + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list326 = iprot.readListBegin(); + struct.success = new ArrayList(_list326.size); + TTableDescriptor _elem327; + for (int _i328 = 0; _i328 < _list326.size; ++_i328) + { + _elem327 = new TTableDescriptor(); + _elem327.read(iprot); + struct.success.add(_elem327); + } + iprot.readListEnd(); + } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -6285,13 +37163,20 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, get_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteTableByPattern_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TTableDescriptor _iter329 : struct.success) + { + _iter329.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } if (struct.io != null) { @@ -6305,16 +37190,16 @@ public class THBaseService { } - private static class get_resultTupleSchemeFactory implements SchemeFactory { - public get_resultTupleScheme getScheme() { - return new get_resultTupleScheme(); + private static class deleteTableByPattern_resultTupleSchemeFactory implements SchemeFactory { + public deleteTableByPattern_resultTupleScheme getScheme() { + return new deleteTableByPattern_resultTupleScheme(); } } - private static class get_resultTupleScheme extends TupleScheme { + private static class deleteTableByPattern_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, deleteTableByPattern_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -6325,7 +37210,13 @@ public class THBaseService { } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { - struct.success.write(oprot); + { + oprot.writeI32(struct.success.size()); + for (TTableDescriptor _iter330 : struct.success) + { + _iter330.write(oprot); + } + } } if (struct.isSetIo()) { struct.io.write(oprot); @@ -6333,12 +37224,21 @@ public class THBaseService { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, deleteTableByPattern_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = new TResult(); - struct.success.read(iprot); + { + org.apache.thrift.protocol.TList _list331 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list331.size); + TTableDescriptor _elem332; + for (int _i333 = 0; _i333 < _list331.size; ++_i333) + { + _elem332 = new TTableDescriptor(); + _elem332.read(iprot); + struct.success.add(_elem332); + } + } struct.setSuccessIsSet(true); } if (incoming.get(1)) { @@ -6351,41 +37251,25 @@ public class THBaseService { } - public static class getMultiple_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMultiple_args"); + public static class truncateTable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("truncateTable_args"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TGETS_FIELD_DESC = new org.apache.thrift.protocol.TField("tgets", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField PRESERVE_SPLITS_FIELD_DESC = new org.apache.thrift.protocol.TField("preserveSplits", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getMultiple_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getMultiple_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new truncateTable_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new truncateTable_argsTupleSchemeFactory()); } - /** - * the table to get from - */ - public ByteBuffer table; // required - /** - * a list of TGets to fetch, the Result list - * will have the Results at corresponding positions - * or null if there was an error - */ - public List tgets; // required + public TTableName tableName; // required + public boolean preserveSplits; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the table to get from - */ - TABLE((short)1, "table"), - /** - * a list of TGets to fetch, the Result list - * will have the Results at corresponding positions - * or null if there was an error - */ - TGETS((short)2, "tgets"); + TABLE_NAME((short)1, "tableName"), + PRESERVE_SPLITS((short)2, "preserveSplits"); private static final Map byName = new HashMap(); @@ -6400,10 +37284,10 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // TGETS - return TGETS; + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // PRESERVE_SPLITS + return PRESERVE_SPLITS; default: return null; } @@ -6444,160 +37328,116 @@ public class THBaseService { } // isset id assignments + private static final int __PRESERVESPLITS_ISSET_ID = 0; + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TGETS, new org.apache.thrift.meta_data.FieldMetaData("tgets", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGet.class)))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); + tmpMap.put(_Fields.PRESERVE_SPLITS, new org.apache.thrift.meta_data.FieldMetaData("preserveSplits", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMultiple_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(truncateTable_args.class, metaDataMap); } - public getMultiple_args() { + public truncateTable_args() { } - public getMultiple_args( - ByteBuffer table, - List tgets) + public truncateTable_args( + TTableName tableName, + boolean preserveSplits) { this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.tgets = tgets; + this.tableName = tableName; + this.preserveSplits = preserveSplits; + setPreserveSplitsIsSet(true); } /** * Performs a deep copy on other. */ - public getMultiple_args(getMultiple_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetTgets()) { - List __this__tgets = new ArrayList(other.tgets.size()); - for (TGet other_element : other.tgets) { - __this__tgets.add(new TGet(other_element)); - } - this.tgets = __this__tgets; + public truncateTable_args(truncateTable_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetTableName()) { + this.tableName = new TTableName(other.tableName); } + this.preserveSplits = other.preserveSplits; } - public getMultiple_args deepCopy() { - return new getMultiple_args(this); + public truncateTable_args deepCopy() { + return new truncateTable_args(this); } @Override public void clear() { - this.table = null; - this.tgets = null; - } - - /** - * the table to get from - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); + this.tableName = null; + setPreserveSplitsIsSet(false); + this.preserveSplits = false; } - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); - } - - /** - * the table to get from - */ - public getMultiple_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; + public TTableName getTableName() { + return this.tableName; } - public getMultiple_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + public truncateTable_args setTableName(TTableName tableName) { + this.tableName = tableName; return this; } - public void unsetTable() { - this.table = null; + public void unsetTableName() { + this.tableName = null; } - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; } - public void setTableIsSet(boolean value) { + public void setTableNameIsSet(boolean value) { if (!value) { - this.table = null; - } - } - - public int getTgetsSize() { - return (this.tgets == null) ? 0 : this.tgets.size(); - } - - public java.util.Iterator getTgetsIterator() { - return (this.tgets == null) ? null : this.tgets.iterator(); - } - - public void addToTgets(TGet elem) { - if (this.tgets == null) { - this.tgets = new ArrayList(); + this.tableName = null; } - this.tgets.add(elem); } - /** - * a list of TGets to fetch, the Result list - * will have the Results at corresponding positions - * or null if there was an error - */ - public List getTgets() { - return this.tgets; + public boolean isPreserveSplits() { + return this.preserveSplits; } - /** - * a list of TGets to fetch, the Result list - * will have the Results at corresponding positions - * or null if there was an error - */ - public getMultiple_args setTgets(List tgets) { - this.tgets = tgets; + public truncateTable_args setPreserveSplits(boolean preserveSplits) { + this.preserveSplits = preserveSplits; + setPreserveSplitsIsSet(true); return this; } - public void unsetTgets() { - this.tgets = null; + public void unsetPreserveSplits() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PRESERVESPLITS_ISSET_ID); } - /** Returns true if field tgets is set (has been assigned a value) and false otherwise */ - public boolean isSetTgets() { - return this.tgets != null; + /** Returns true if field preserveSplits is set (has been assigned a value) and false otherwise */ + public boolean isSetPreserveSplits() { + return EncodingUtils.testBit(__isset_bitfield, __PRESERVESPLITS_ISSET_ID); } - public void setTgetsIsSet(boolean value) { - if (!value) { - this.tgets = null; - } + public void setPreserveSplitsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PRESERVESPLITS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: + case TABLE_NAME: if (value == null) { - unsetTable(); + unsetTableName(); } else { - setTable((ByteBuffer)value); + setTableName((TTableName)value); } break; - case TGETS: + case PRESERVE_SPLITS: if (value == null) { - unsetTgets(); + unsetPreserveSplits(); } else { - setTgets((List)value); + setPreserveSplits((Boolean)value); } break; @@ -6606,11 +37446,11 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); + case TABLE_NAME: + return getTableName(); - case TGETS: - return getTgets(); + case PRESERVE_SPLITS: + return isPreserveSplits(); } throw new IllegalStateException(); @@ -6623,10 +37463,10 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case TGETS: - return isSetTgets(); + case TABLE_NAME: + return isSetTableName(); + case PRESERVE_SPLITS: + return isSetPreserveSplits(); } throw new IllegalStateException(); } @@ -6635,30 +37475,30 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getMultiple_args) - return this.equals((getMultiple_args)that); + if (that instanceof truncateTable_args) + return this.equals((truncateTable_args)that); return false; } - public boolean equals(getMultiple_args that) { + public boolean equals(truncateTable_args that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) return false; - if (!this.table.equals(that.table)) + if (!this.tableName.equals(that.tableName)) return false; } - boolean this_present_tgets = true && this.isSetTgets(); - boolean that_present_tgets = true && that.isSetTgets(); - if (this_present_tgets || that_present_tgets) { - if (!(this_present_tgets && that_present_tgets)) + boolean this_present_preserveSplits = true; + boolean that_present_preserveSplits = true; + if (this_present_preserveSplits || that_present_preserveSplits) { + if (!(this_present_preserveSplits && that_present_preserveSplits)) return false; - if (!this.tgets.equals(that.tgets)) + if (this.preserveSplits != that.preserveSplits) return false; } @@ -6669,43 +37509,43 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); - boolean present_tgets = true && (isSetTgets()); - list.add(present_tgets); - if (present_tgets) - list.add(tgets); + boolean present_preserveSplits = true; + list.add(present_preserveSplits); + if (present_preserveSplits) + list.add(preserveSplits); return list.hashCode(); } @Override - public int compareTo(getMultiple_args other) { + public int compareTo(truncateTable_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTgets()).compareTo(other.isSetTgets()); + lastComparison = Boolean.valueOf(isSetPreserveSplits()).compareTo(other.isSetPreserveSplits()); if (lastComparison != 0) { return lastComparison; } - if (isSetTgets()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tgets, other.tgets); + if (isSetPreserveSplits()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preserveSplits, other.preserveSplits); if (lastComparison != 0) { return lastComparison; } @@ -6727,23 +37567,19 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("getMultiple_args("); + StringBuilder sb = new StringBuilder("truncateTable_args("); boolean first = true; - sb.append("table:"); - if (this.table == null) { + sb.append("tableName:"); + if (this.tableName == null) { sb.append("null"); } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); + sb.append(this.tableName); } first = false; if (!first) sb.append(", "); - sb.append("tgets:"); - if (this.tgets == null) { - sb.append("null"); - } else { - sb.append(this.tgets); - } + sb.append("preserveSplits:"); + sb.append(this.preserveSplits); first = false; sb.append(")"); return sb.toString(); @@ -6751,13 +37587,14 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (tgets == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tgets' was not present! Struct: " + toString()); + if (tableName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString()); } + // alas, we cannot check 'preserveSplits' because it's a primitive and you chose the non-beans generator. // check for sub-struct validity + if (tableName != null) { + tableName.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -6770,21 +37607,23 @@ public class THBaseService { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getMultiple_argsStandardSchemeFactory implements SchemeFactory { - public getMultiple_argsStandardScheme getScheme() { - return new getMultiple_argsStandardScheme(); + private static class truncateTable_argsStandardSchemeFactory implements SchemeFactory { + public truncateTable_argsStandardScheme getScheme() { + return new truncateTable_argsStandardScheme(); } } - private static class getMultiple_argsStandardScheme extends StandardScheme { + private static class truncateTable_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getMultiple_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, truncateTable_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -6794,29 +37633,19 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // TGETS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list158 = iprot.readListBegin(); - struct.tgets = new ArrayList(_list158.size); - TGet _elem159; - for (int _i160 = 0; _i160 < _list158.size; ++_i160) - { - _elem159 = new TGet(); - _elem159.read(iprot); - struct.tgets.add(_elem159); - } - iprot.readListEnd(); - } - struct.setTgetsIsSet(true); + case 2: // PRESERVE_SPLITS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.preserveSplits = iprot.readBool(); + struct.setPreserveSplitsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -6829,97 +37658,73 @@ public class THBaseService { iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetPreserveSplits()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'preserveSplits' was not found in serialized data! Struct: " + toString()); + } struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getMultiple_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, truncateTable_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.tgets != null) { - oprot.writeFieldBegin(TGETS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tgets.size())); - for (TGet _iter161 : struct.tgets) - { - _iter161.write(oprot); - } - oprot.writeListEnd(); - } + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + struct.tableName.write(oprot); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(PRESERVE_SPLITS_FIELD_DESC); + oprot.writeBool(struct.preserveSplits); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getMultiple_argsTupleSchemeFactory implements SchemeFactory { - public getMultiple_argsTupleScheme getScheme() { - return new getMultiple_argsTupleScheme(); + private static class truncateTable_argsTupleSchemeFactory implements SchemeFactory { + public truncateTable_argsTupleScheme getScheme() { + return new truncateTable_argsTupleScheme(); } } - private static class getMultiple_argsTupleScheme extends TupleScheme { + private static class truncateTable_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getMultiple_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, truncateTable_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - { - oprot.writeI32(struct.tgets.size()); - for (TGet _iter162 : struct.tgets) - { - _iter162.write(oprot); - } - } + struct.tableName.write(oprot); + oprot.writeBool(struct.preserveSplits); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getMultiple_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, truncateTable_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - { - org.apache.thrift.protocol.TList _list163 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.tgets = new ArrayList(_list163.size); - TGet _elem164; - for (int _i165 = 0; _i165 < _list163.size; ++_i165) - { - _elem164 = new TGet(); - _elem164.read(iprot); - struct.tgets.add(_elem164); - } - } - struct.setTgetsIsSet(true); + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); + struct.preserveSplits = iprot.readBool(); + struct.setPreserveSplitsIsSet(true); } } } - public static class getMultiple_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMultiple_result"); + public static class truncateTable_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("truncateTable_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getMultiple_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getMultiple_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new truncateTable_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new truncateTable_resultTupleSchemeFactory()); } - public List success; // required public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), IO((short)1, "io"); private static final Map byName = new HashMap(); @@ -6935,8 +37740,6 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; case 1: // IO return IO; default: @@ -6982,97 +37785,45 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class)))); tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMultiple_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(truncateTable_result.class, metaDataMap); } - public getMultiple_result() { + public truncateTable_result() { } - public getMultiple_result( - List success, + public truncateTable_result( TIOError io) { this(); - this.success = success; this.io = io; } /** * Performs a deep copy on other. */ - public getMultiple_result(getMultiple_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (TResult other_element : other.success) { - __this__success.add(new TResult(other_element)); - } - this.success = __this__success; - } + public truncateTable_result(truncateTable_result other) { if (other.isSetIo()) { this.io = new TIOError(other.io); } } - public getMultiple_result deepCopy() { - return new getMultiple_result(this); + public truncateTable_result deepCopy() { + return new truncateTable_result(this); } @Override public void clear() { - this.success = null; this.io = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(TResult elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public getMultiple_result setSuccess(List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - public TIOError getIo() { return this.io; } - public getMultiple_result setIo(TIOError io) { + public truncateTable_result setIo(TIOError io) { this.io = io; return this; } @@ -7094,14 +37845,6 @@ public class THBaseService { public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - case IO: if (value == null) { unsetIo(); @@ -7115,9 +37858,6 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - case IO: return getIo(); @@ -7132,8 +37872,6 @@ public class THBaseService { } switch (field) { - case SUCCESS: - return isSetSuccess(); case IO: return isSetIo(); } @@ -7144,24 +37882,15 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getMultiple_result) - return this.equals((getMultiple_result)that); + if (that instanceof truncateTable_result) + return this.equals((truncateTable_result)that); return false; } - public boolean equals(getMultiple_result that) { + public boolean equals(truncateTable_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - boolean this_present_io = true && this.isSetIo(); boolean that_present_io = true && that.isSetIo(); if (this_present_io || that_present_io) { @@ -7178,11 +37907,6 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - boolean present_io = true && (isSetIo()); list.add(present_io); if (present_io) @@ -7192,23 +37916,13 @@ public class THBaseService { } @Override - public int compareTo(getMultiple_result other) { + public int compareTo(truncateTable_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); if (lastComparison != 0) { return lastComparison; @@ -7236,17 +37950,9 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("getMultiple_result("); + StringBuilder sb = new StringBuilder("truncateTable_result("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); sb.append("io:"); if (this.io == null) { sb.append("null"); @@ -7279,15 +37985,15 @@ public class THBaseService { } } - private static class getMultiple_resultStandardSchemeFactory implements SchemeFactory { - public getMultiple_resultStandardScheme getScheme() { - return new getMultiple_resultStandardScheme(); + private static class truncateTable_resultStandardSchemeFactory implements SchemeFactory { + public truncateTable_resultStandardScheme getScheme() { + return new truncateTable_resultStandardScheme(); } } - private static class getMultiple_resultStandardScheme extends StandardScheme { + private static class truncateTable_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getMultiple_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, truncateTable_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -7297,25 +38003,6 @@ public class THBaseService { break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list166 = iprot.readListBegin(); - struct.success = new ArrayList(_list166.size); - TResult _elem167; - for (int _i168 = 0; _i168 < _list166.size; ++_i168) - { - _elem167 = new TResult(); - _elem167.read(iprot); - struct.success.add(_elem167); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; case 1: // IO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.io = new TIOError(); @@ -7336,22 +38023,10 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getMultiple_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, truncateTable_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (TResult _iter169 : struct.success) - { - _iter169.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } if (struct.io != null) { oprot.writeFieldBegin(IO_FIELD_DESC); struct.io.write(oprot); @@ -7363,58 +38038,32 @@ public class THBaseService { } - private static class getMultiple_resultTupleSchemeFactory implements SchemeFactory { - public getMultiple_resultTupleScheme getScheme() { - return new getMultiple_resultTupleScheme(); + private static class truncateTable_resultTupleSchemeFactory implements SchemeFactory { + public truncateTable_resultTupleScheme getScheme() { + return new truncateTable_resultTupleScheme(); } } - private static class getMultiple_resultTupleScheme extends TupleScheme { + private static class truncateTable_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getMultiple_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, truncateTable_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } if (struct.isSetIo()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (TResult _iter170 : struct.success) - { - _iter170.write(oprot); - } - } + optionals.set(0); } + oprot.writeBitSet(optionals, 1); if (struct.isSetIo()) { struct.io.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getMultiple_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, truncateTable_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list171 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list171.size); - TResult _elem172; - for (int _i173 = 0; _i173 < _list171.size; ++_i173) - { - _elem172 = new TResult(); - _elem172.read(iprot); - struct.success.add(_elem172); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { struct.io = new TIOError(); struct.io.read(iprot); struct.setIoIsSet(true); @@ -7424,37 +38073,22 @@ public class THBaseService { } - public static class put_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_args"); + public static class enableTable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableTable_args"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TPUT_FIELD_DESC = new org.apache.thrift.protocol.TField("tput", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new put_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new put_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new enableTable_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new enableTable_argsTupleSchemeFactory()); } - /** - * the table to put data in - */ - public ByteBuffer table; // required - /** - * the TPut to put - */ - public TPut tput; // required + public TTableName tableName; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the table to put data in - */ - TABLE((short)1, "table"), - /** - * the TPut to put - */ - TPUT((short)2, "tput"); + TABLE_NAME((short)1, "tableName"); private static final Map byName = new HashMap(); @@ -7469,10 +38103,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // TPUT - return TPUT; + case 1: // TABLE_NAME + return TABLE_NAME; default: return null; } @@ -7516,133 +38148,71 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TPUT, new org.apache.thrift.meta_data.FieldMetaData("tput", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPut.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_args.class, metaDataMap); - } - - public put_args() { - } - - public put_args( - ByteBuffer table, - TPut tput) - { - this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.tput = tput; - } - - /** - * Performs a deep copy on other. - */ - public put_args(put_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetTput()) { - this.tput = new TPut(other.tput); - } - } - - public put_args deepCopy() { - return new put_args(this); - } - - @Override - public void clear() { - this.table = null; - this.tput = null; - } - - /** - * the table to put data in - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); - } - - /** - * the table to put data in - */ - public put_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableTable_args.class, metaDataMap); } - public put_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; + public enableTable_args() { } - public void unsetTable() { - this.table = null; + public enableTable_args( + TTableName tableName) + { + this(); + this.tableName = tableName; } - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; + /** + * Performs a deep copy on other. + */ + public enableTable_args(enableTable_args other) { + if (other.isSetTableName()) { + this.tableName = new TTableName(other.tableName); + } } - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } + public enableTable_args deepCopy() { + return new enableTable_args(this); } - /** - * the TPut to put - */ - public TPut getTput() { - return this.tput; + @Override + public void clear() { + this.tableName = null; } - /** - * the TPut to put - */ - public put_args setTput(TPut tput) { - this.tput = tput; + public TTableName getTableName() { + return this.tableName; + } + + public enableTable_args setTableName(TTableName tableName) { + this.tableName = tableName; return this; } - public void unsetTput() { - this.tput = null; + public void unsetTableName() { + this.tableName = null; } - /** Returns true if field tput is set (has been assigned a value) and false otherwise */ - public boolean isSetTput() { - return this.tput != null; + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; } - public void setTputIsSet(boolean value) { + public void setTableNameIsSet(boolean value) { if (!value) { - this.tput = null; + this.tableName = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; - - case TPUT: + case TABLE_NAME: if (value == null) { - unsetTput(); + unsetTableName(); } else { - setTput((TPut)value); + setTableName((TTableName)value); } break; @@ -7651,11 +38221,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); - - case TPUT: - return getTput(); + case TABLE_NAME: + return getTableName(); } throw new IllegalStateException(); @@ -7668,10 +38235,8 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case TPUT: - return isSetTput(); + case TABLE_NAME: + return isSetTableName(); } throw new IllegalStateException(); } @@ -7680,30 +38245,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof put_args) - return this.equals((put_args)that); + if (that instanceof enableTable_args) + return this.equals((enableTable_args)that); return false; } - public boolean equals(put_args that) { + public boolean equals(enableTable_args that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; - } - - boolean this_present_tput = true && this.isSetTput(); - boolean that_present_tput = true && that.isSetTput(); - if (this_present_tput || that_present_tput) { - if (!(this_present_tput && that_present_tput)) + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) return false; - if (!this.tput.equals(that.tput)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -7714,43 +38270,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - boolean present_tput = true && (isSetTput()); - list.add(present_tput); - if (present_tput) - list.add(tput); + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); return list.hashCode(); } @Override - public int compareTo(put_args other) { + public int compareTo(enableTable_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTput()).compareTo(other.isSetTput()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - if (isSetTput()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tput, other.tput); + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } @@ -7772,22 +38313,14 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("put_args("); + StringBuilder sb = new StringBuilder("enableTable_args("); boolean first = true; - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("tput:"); - if (this.tput == null) { + sb.append("tableName:"); + if (this.tableName == null) { sb.append("null"); } else { - sb.append(this.tput); + sb.append(this.tableName); } first = false; sb.append(")"); @@ -7796,15 +38329,12 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (tput == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tput' was not present! Struct: " + toString()); + if (tableName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString()); } // check for sub-struct validity - if (tput != null) { - tput.validate(); + if (tableName != null) { + tableName.validate(); } } @@ -7824,15 +38354,15 @@ public class THBaseService { } } - private static class put_argsStandardSchemeFactory implements SchemeFactory { - public put_argsStandardScheme getScheme() { - return new put_argsStandardScheme(); + private static class enableTable_argsStandardSchemeFactory implements SchemeFactory { + public enableTable_argsStandardScheme getScheme() { + return new enableTable_argsStandardScheme(); } } - private static class put_argsStandardScheme extends StandardScheme { + private static class enableTable_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, put_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, enableTable_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -7842,19 +38372,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TPUT + case 1: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tput = new TPut(); - struct.tput.read(iprot); - struct.setTputIsSet(true); + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -7870,18 +38392,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, put_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, enableTable_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.tput != null) { - oprot.writeFieldBegin(TPUT_FIELD_DESC); - struct.tput.write(oprot); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + struct.tableName.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -7890,43 +38407,40 @@ public class THBaseService { } - private static class put_argsTupleSchemeFactory implements SchemeFactory { - public put_argsTupleScheme getScheme() { - return new put_argsTupleScheme(); + private static class enableTable_argsTupleSchemeFactory implements SchemeFactory { + public enableTable_argsTupleScheme getScheme() { + return new enableTable_argsTupleScheme(); } } - private static class put_argsTupleScheme extends TupleScheme { + private static class enableTable_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, put_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, enableTable_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - struct.tput.write(oprot); + struct.tableName.write(oprot); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, put_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, enableTable_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - struct.tput = new TPut(); - struct.tput.read(iprot); - struct.setTputIsSet(true); + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } } } - public static class put_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_result"); + public static class enableTable_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableTable_result"); private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new put_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new put_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new enableTable_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new enableTable_resultTupleSchemeFactory()); } public TIOError io; // required @@ -7996,13 +38510,13 @@ public class THBaseService { tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableTable_result.class, metaDataMap); } - public put_result() { + public enableTable_result() { } - public put_result( + public enableTable_result( TIOError io) { this(); @@ -8012,14 +38526,14 @@ public class THBaseService { /** * Performs a deep copy on other. */ - public put_result(put_result other) { + public enableTable_result(enableTable_result other) { if (other.isSetIo()) { this.io = new TIOError(other.io); } } - public put_result deepCopy() { - return new put_result(this); + public enableTable_result deepCopy() { + return new enableTable_result(this); } @Override @@ -8031,7 +38545,7 @@ public class THBaseService { return this.io; } - public put_result setIo(TIOError io) { + public enableTable_result setIo(TIOError io) { this.io = io; return this; } @@ -8090,12 +38604,12 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof put_result) - return this.equals((put_result)that); + if (that instanceof enableTable_result) + return this.equals((enableTable_result)that); return false; } - public boolean equals(put_result that) { + public boolean equals(enableTable_result that) { if (that == null) return false; @@ -8124,7 +38638,7 @@ public class THBaseService { } @Override - public int compareTo(put_result other) { + public int compareTo(enableTable_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -8158,7 +38672,7 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("put_result("); + StringBuilder sb = new StringBuilder("enableTable_result("); boolean first = true; sb.append("io:"); @@ -8193,15 +38707,15 @@ public class THBaseService { } } - private static class put_resultStandardSchemeFactory implements SchemeFactory { - public put_resultStandardScheme getScheme() { - return new put_resultStandardScheme(); + private static class enableTable_resultStandardSchemeFactory implements SchemeFactory { + public enableTable_resultStandardScheme getScheme() { + return new enableTable_resultStandardScheme(); } } - private static class put_resultStandardScheme extends StandardScheme { + private static class enableTable_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, put_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, enableTable_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -8231,7 +38745,7 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, put_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, enableTable_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -8246,16 +38760,16 @@ public class THBaseService { } - private static class put_resultTupleSchemeFactory implements SchemeFactory { - public put_resultTupleScheme getScheme() { - return new put_resultTupleScheme(); + private static class enableTable_resultTupleSchemeFactory implements SchemeFactory { + public enableTable_resultTupleScheme getScheme() { + return new enableTable_resultTupleScheme(); } } - private static class put_resultTupleScheme extends TupleScheme { + private static class enableTable_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, put_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, enableTable_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetIo()) { @@ -8268,7 +38782,7 @@ public class THBaseService { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, put_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, enableTable_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { @@ -8281,77 +38795,22 @@ public class THBaseService { } - public static class checkAndPut_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndPut_args"); + public static class enableTableByPattern_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableTableByPattern_args"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField TPUT_FIELD_DESC = new org.apache.thrift.protocol.TField("tput", org.apache.thrift.protocol.TType.STRUCT, (short)6); + private static final org.apache.thrift.protocol.TField REGEX_FIELD_DESC = new org.apache.thrift.protocol.TField("regex", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new checkAndPut_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new checkAndPut_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new enableTableByPattern_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new enableTableByPattern_argsTupleSchemeFactory()); } - /** - * to check in and put to - */ - public ByteBuffer table; // required - /** - * row to check - */ - public ByteBuffer row; // required - /** - * column family to check - */ - public ByteBuffer family; // required - /** - * column qualifier to check - */ - public ByteBuffer qualifier; // required - /** - * the expected value, if not provided the - * check is for the non-existence of the - * column in question - */ - public ByteBuffer value; // required - /** - * the TPut to put if the check succeeds - */ - public TPut tput; // required + public String regex; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * to check in and put to - */ - TABLE((short)1, "table"), - /** - * row to check - */ - ROW((short)2, "row"), - /** - * column family to check - */ - FAMILY((short)3, "family"), - /** - * column qualifier to check - */ - QUALIFIER((short)4, "qualifier"), - /** - * the expected value, if not provided the - * check is for the non-existence of the - * column in question - */ - VALUE((short)5, "value"), - /** - * the TPut to put if the check succeeds - */ - TPUT((short)6, "tput"); + REGEX((short)1, "regex"); private static final Map byName = new HashMap(); @@ -8366,18 +38825,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // ROW - return ROW; - case 3: // FAMILY - return FAMILY; - case 4: // QUALIFIER - return QUALIFIER; - case 5: // VALUE - return VALUE; - case 6: // TPUT - return TPUT; + case 1: // REGEX + return REGEX; default: return null; } @@ -8411,371 +38860,81 @@ public class THBaseService { public short getThriftFieldId() { return _thriftId; } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.FAMILY, new org.apache.thrift.meta_data.FieldMetaData("family", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TPUT, new org.apache.thrift.meta_data.FieldMetaData("tput", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPut.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndPut_args.class, metaDataMap); - } - - public checkAndPut_args() { - } - - public checkAndPut_args( - ByteBuffer table, - ByteBuffer row, - ByteBuffer family, - ByteBuffer qualifier, - ByteBuffer value, - TPut tput) - { - this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.row = org.apache.thrift.TBaseHelper.copyBinary(row); - this.family = org.apache.thrift.TBaseHelper.copyBinary(family); - this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - this.tput = tput; - } - - /** - * Performs a deep copy on other. - */ - public checkAndPut_args(checkAndPut_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetRow()) { - this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); - } - if (other.isSetFamily()) { - this.family = org.apache.thrift.TBaseHelper.copyBinary(other.family); - } - if (other.isSetQualifier()) { - this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier); - } - if (other.isSetValue()) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); - } - if (other.isSetTput()) { - this.tput = new TPut(other.tput); - } - } - - public checkAndPut_args deepCopy() { - return new checkAndPut_args(this); - } - - @Override - public void clear() { - this.table = null; - this.row = null; - this.family = null; - this.qualifier = null; - this.value = null; - this.tput = null; - } - - /** - * to check in and put to - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); - } - - /** - * to check in and put to - */ - public checkAndPut_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; - } - - public checkAndPut_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; - } - - public void unsetTable() { - this.table = null; - } - - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; - } - - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } - } - - /** - * row to check - */ - public byte[] getRow() { - setRow(org.apache.thrift.TBaseHelper.rightSize(row)); - return row == null ? null : row.array(); - } - - public ByteBuffer bufferForRow() { - return org.apache.thrift.TBaseHelper.copyBinary(row); - } - - /** - * row to check - */ - public checkAndPut_args setRow(byte[] row) { - this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length)); - return this; - } - - public checkAndPut_args setRow(ByteBuffer row) { - this.row = org.apache.thrift.TBaseHelper.copyBinary(row); - return this; - } - - public void unsetRow() { - this.row = null; - } - - /** Returns true if field row is set (has been assigned a value) and false otherwise */ - public boolean isSetRow() { - return this.row != null; - } - - public void setRowIsSet(boolean value) { - if (!value) { - this.row = null; - } - } - - /** - * column family to check - */ - public byte[] getFamily() { - setFamily(org.apache.thrift.TBaseHelper.rightSize(family)); - return family == null ? null : family.array(); - } - - public ByteBuffer bufferForFamily() { - return org.apache.thrift.TBaseHelper.copyBinary(family); - } - - /** - * column family to check - */ - public checkAndPut_args setFamily(byte[] family) { - this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length)); - return this; - } - - public checkAndPut_args setFamily(ByteBuffer family) { - this.family = org.apache.thrift.TBaseHelper.copyBinary(family); - return this; - } - - public void unsetFamily() { - this.family = null; - } - - /** Returns true if field family is set (has been assigned a value) and false otherwise */ - public boolean isSetFamily() { - return this.family != null; - } - - public void setFamilyIsSet(boolean value) { - if (!value) { - this.family = null; - } - } - - /** - * column qualifier to check - */ - public byte[] getQualifier() { - setQualifier(org.apache.thrift.TBaseHelper.rightSize(qualifier)); - return qualifier == null ? null : qualifier.array(); - } - - public ByteBuffer bufferForQualifier() { - return org.apache.thrift.TBaseHelper.copyBinary(qualifier); - } - - /** - * column qualifier to check - */ - public checkAndPut_args setQualifier(byte[] qualifier) { - this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length)); - return this; - } - - public checkAndPut_args setQualifier(ByteBuffer qualifier) { - this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); - return this; - } - - public void unsetQualifier() { - this.qualifier = null; - } - - /** Returns true if field qualifier is set (has been assigned a value) and false otherwise */ - public boolean isSetQualifier() { - return this.qualifier != null; - } - - public void setQualifierIsSet(boolean value) { - if (!value) { - this.qualifier = null; - } - } - - /** - * the expected value, if not provided the - * check is for the non-existence of the - * column in question - */ - public byte[] getValue() { - setValue(org.apache.thrift.TBaseHelper.rightSize(value)); - return value == null ? null : value.array(); + + public String getFieldName() { + return _fieldName; + } } - public ByteBuffer bufferForValue() { - return org.apache.thrift.TBaseHelper.copyBinary(value); + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.REGEX, new org.apache.thrift.meta_data.FieldMetaData("regex", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableTableByPattern_args.class, metaDataMap); } - /** - * the expected value, if not provided the - * check is for the non-existence of the - * column in question - */ - public checkAndPut_args setValue(byte[] value) { - this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length)); - return this; + public enableTableByPattern_args() { } - public checkAndPut_args setValue(ByteBuffer value) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - return this; + public enableTableByPattern_args( + String regex) + { + this(); + this.regex = regex; } - public void unsetValue() { - this.value = null; + /** + * Performs a deep copy on other. + */ + public enableTableByPattern_args(enableTableByPattern_args other) { + if (other.isSetRegex()) { + this.regex = other.regex; + } } - /** Returns true if field value is set (has been assigned a value) and false otherwise */ - public boolean isSetValue() { - return this.value != null; + public enableTableByPattern_args deepCopy() { + return new enableTableByPattern_args(this); } - public void setValueIsSet(boolean value) { - if (!value) { - this.value = null; - } + @Override + public void clear() { + this.regex = null; } - /** - * the TPut to put if the check succeeds - */ - public TPut getTput() { - return this.tput; + public String getRegex() { + return this.regex; } - /** - * the TPut to put if the check succeeds - */ - public checkAndPut_args setTput(TPut tput) { - this.tput = tput; + public enableTableByPattern_args setRegex(String regex) { + this.regex = regex; return this; } - public void unsetTput() { - this.tput = null; + public void unsetRegex() { + this.regex = null; } - /** Returns true if field tput is set (has been assigned a value) and false otherwise */ - public boolean isSetTput() { - return this.tput != null; + /** Returns true if field regex is set (has been assigned a value) and false otherwise */ + public boolean isSetRegex() { + return this.regex != null; } - public void setTputIsSet(boolean value) { + public void setRegexIsSet(boolean value) { if (!value) { - this.tput = null; + this.regex = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; - - case ROW: - if (value == null) { - unsetRow(); - } else { - setRow((ByteBuffer)value); - } - break; - - case FAMILY: - if (value == null) { - unsetFamily(); - } else { - setFamily((ByteBuffer)value); - } - break; - - case QUALIFIER: - if (value == null) { - unsetQualifier(); - } else { - setQualifier((ByteBuffer)value); - } - break; - - case VALUE: - if (value == null) { - unsetValue(); - } else { - setValue((ByteBuffer)value); - } - break; - - case TPUT: + case REGEX: if (value == null) { - unsetTput(); + unsetRegex(); } else { - setTput((TPut)value); + setRegex((String)value); } break; @@ -8784,23 +38943,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); - - case ROW: - return getRow(); - - case FAMILY: - return getFamily(); - - case QUALIFIER: - return getQualifier(); - - case VALUE: - return getValue(); - - case TPUT: - return getTput(); + case REGEX: + return getRegex(); } throw new IllegalStateException(); @@ -8813,18 +38957,8 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case ROW: - return isSetRow(); - case FAMILY: - return isSetFamily(); - case QUALIFIER: - return isSetQualifier(); - case VALUE: - return isSetValue(); - case TPUT: - return isSetTput(); + case REGEX: + return isSetRegex(); } throw new IllegalStateException(); } @@ -8833,66 +38967,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof checkAndPut_args) - return this.equals((checkAndPut_args)that); + if (that instanceof enableTableByPattern_args) + return this.equals((enableTableByPattern_args)that); return false; } - public boolean equals(checkAndPut_args that) { + public boolean equals(enableTableByPattern_args that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; - } - - boolean this_present_row = true && this.isSetRow(); - boolean that_present_row = true && that.isSetRow(); - if (this_present_row || that_present_row) { - if (!(this_present_row && that_present_row)) - return false; - if (!this.row.equals(that.row)) - return false; - } - - boolean this_present_family = true && this.isSetFamily(); - boolean that_present_family = true && that.isSetFamily(); - if (this_present_family || that_present_family) { - if (!(this_present_family && that_present_family)) - return false; - if (!this.family.equals(that.family)) - return false; - } - - boolean this_present_qualifier = true && this.isSetQualifier(); - boolean that_present_qualifier = true && that.isSetQualifier(); - if (this_present_qualifier || that_present_qualifier) { - if (!(this_present_qualifier && that_present_qualifier)) - return false; - if (!this.qualifier.equals(that.qualifier)) - return false; - } - - 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; - if (!this.value.equals(that.value)) - return false; - } - - boolean this_present_tput = true && this.isSetTput(); - boolean that_present_tput = true && that.isSetTput(); - if (this_present_tput || that_present_tput) { - if (!(this_present_tput && that_present_tput)) + boolean this_present_regex = true && this.isSetRegex(); + boolean that_present_regex = true && that.isSetRegex(); + if (this_present_regex || that_present_regex) { + if (!(this_present_regex && that_present_regex)) return false; - if (!this.tput.equals(that.tput)) + if (!this.regex.equals(that.regex)) return false; } @@ -8903,103 +38992,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - boolean present_row = true && (isSetRow()); - list.add(present_row); - if (present_row) - list.add(row); - - boolean present_family = true && (isSetFamily()); - list.add(present_family); - if (present_family) - list.add(family); - - boolean present_qualifier = true && (isSetQualifier()); - list.add(present_qualifier); - if (present_qualifier) - list.add(qualifier); - - boolean present_value = true && (isSetValue()); - list.add(present_value); - if (present_value) - list.add(value); - - boolean present_tput = true && (isSetTput()); - list.add(present_tput); - if (present_tput) - list.add(tput); + boolean present_regex = true && (isSetRegex()); + list.add(present_regex); + if (present_regex) + list.add(regex); return list.hashCode(); } @Override - public int compareTo(checkAndPut_args other) { + public int compareTo(enableTableByPattern_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRow()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFamily()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, other.family); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQualifier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTput()).compareTo(other.isSetTput()); + lastComparison = Boolean.valueOf(isSetRegex()).compareTo(other.isSetRegex()); if (lastComparison != 0) { return lastComparison; } - if (isSetTput()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tput, other.tput); + if (isSetRegex()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.regex, other.regex); if (lastComparison != 0) { return lastComparison; } @@ -9021,54 +39035,14 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("checkAndPut_args("); + StringBuilder sb = new StringBuilder("enableTableByPattern_args("); boolean first = true; - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("row:"); - if (this.row == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.row, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("family:"); - if (this.family == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.family, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("qualifier:"); - if (this.qualifier == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.qualifier, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("value:"); - if (this.value == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.value, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("tput:"); - if (this.tput == null) { + sb.append("regex:"); + if (this.regex == null) { sb.append("null"); } else { - sb.append(this.tput); + sb.append(this.regex); } first = false; sb.append(")"); @@ -9077,25 +39051,10 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (row == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString()); - } - if (family == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'family' was not present! Struct: " + toString()); - } - if (qualifier == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifier' was not present! Struct: " + toString()); - } - if (tput == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tput' was not present! Struct: " + toString()); + if (regex == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'regex' was not present! Struct: " + toString()); } // check for sub-struct validity - if (tput != null) { - tput.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -9114,15 +39073,15 @@ public class THBaseService { } } - private static class checkAndPut_argsStandardSchemeFactory implements SchemeFactory { - public checkAndPut_argsStandardScheme getScheme() { - return new checkAndPut_argsStandardScheme(); + private static class enableTableByPattern_argsStandardSchemeFactory implements SchemeFactory { + public enableTableByPattern_argsStandardScheme getScheme() { + return new enableTableByPattern_argsStandardScheme(); } } - private static class checkAndPut_argsStandardScheme extends StandardScheme { + private static class enableTableByPattern_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndPut_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, enableTableByPattern_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -9132,51 +39091,10 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // ROW - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.row = iprot.readBinary(); - struct.setRowIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // FAMILY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.family = iprot.readBinary(); - struct.setFamilyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // QUALIFIER - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.qualifier = iprot.readBinary(); - struct.setQualifierIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // VALUE + case 1: // REGEX if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // TPUT - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tput = new TPut(); - struct.tput.read(iprot); - struct.setTputIsSet(true); + struct.regex = iprot.readString(); + struct.setRegexIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -9192,38 +39110,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndPut_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, enableTableByPattern_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.row != null) { - oprot.writeFieldBegin(ROW_FIELD_DESC); - oprot.writeBinary(struct.row); - oprot.writeFieldEnd(); - } - if (struct.family != null) { - oprot.writeFieldBegin(FAMILY_FIELD_DESC); - oprot.writeBinary(struct.family); - oprot.writeFieldEnd(); - } - if (struct.qualifier != null) { - oprot.writeFieldBegin(QUALIFIER_FIELD_DESC); - oprot.writeBinary(struct.qualifier); - oprot.writeFieldEnd(); - } - if (struct.value != null) { - oprot.writeFieldBegin(VALUE_FIELD_DESC); - oprot.writeBinary(struct.value); - oprot.writeFieldEnd(); - } - if (struct.tput != null) { - oprot.writeFieldBegin(TPUT_FIELD_DESC); - struct.tput.write(oprot); + if (struct.regex != null) { + oprot.writeFieldBegin(REGEX_FIELD_DESC); + oprot.writeString(struct.regex); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -9232,69 +39125,43 @@ public class THBaseService { } - private static class checkAndPut_argsTupleSchemeFactory implements SchemeFactory { - public checkAndPut_argsTupleScheme getScheme() { - return new checkAndPut_argsTupleScheme(); + private static class enableTableByPattern_argsTupleSchemeFactory implements SchemeFactory { + public enableTableByPattern_argsTupleScheme getScheme() { + return new enableTableByPattern_argsTupleScheme(); } } - private static class checkAndPut_argsTupleScheme extends TupleScheme { + private static class enableTableByPattern_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, checkAndPut_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, enableTableByPattern_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - oprot.writeBinary(struct.row); - oprot.writeBinary(struct.family); - oprot.writeBinary(struct.qualifier); - struct.tput.write(oprot); - BitSet optionals = new BitSet(); - if (struct.isSetValue()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetValue()) { - oprot.writeBinary(struct.value); - } + oprot.writeString(struct.regex); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, checkAndPut_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, enableTableByPattern_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - struct.row = iprot.readBinary(); - struct.setRowIsSet(true); - struct.family = iprot.readBinary(); - struct.setFamilyIsSet(true); - struct.qualifier = iprot.readBinary(); - struct.setQualifierIsSet(true); - struct.tput = new TPut(); - struct.tput.read(iprot); - struct.setTputIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } + struct.regex = iprot.readString(); + struct.setRegexIsSet(true); } } } - public static class checkAndPut_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndPut_result"); + public static class enableTableByPattern_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableTableByPattern_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new checkAndPut_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new checkAndPut_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new enableTableByPattern_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new enableTableByPattern_resultTupleSchemeFactory()); } - public boolean success; // required + public List success; // required public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -9359,82 +39226,100 @@ public class THBaseService { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDescriptor.class)))); tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndPut_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableTableByPattern_result.class, metaDataMap); } - public checkAndPut_result() { + public enableTableByPattern_result() { } - public checkAndPut_result( - boolean success, + public enableTableByPattern_result( + List success, TIOError io) { this(); this.success = success; - setSuccessIsSet(true); this.io = io; } /** * Performs a deep copy on other. */ - public checkAndPut_result(checkAndPut_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; + public enableTableByPattern_result(enableTableByPattern_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (TTableDescriptor other_element : other.success) { + __this__success.add(new TTableDescriptor(other_element)); + } + this.success = __this__success; + } if (other.isSetIo()) { this.io = new TIOError(other.io); } } - public checkAndPut_result deepCopy() { - return new checkAndPut_result(this); + public enableTableByPattern_result deepCopy() { + return new enableTableByPattern_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; + this.success = null; this.io = null; } - public boolean isSuccess() { + 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(TTableDescriptor elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { return this.success; } - public checkAndPut_result setSuccess(boolean success) { + public enableTableByPattern_result setSuccess(List success) { this.success = success; - setSuccessIsSet(true); return this; } public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + return this.success != null; } public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + if (!value) { + this.success = null; + } } public TIOError getIo() { return this.io; } - public checkAndPut_result setIo(TIOError io) { + public enableTableByPattern_result setIo(TIOError io) { this.io = io; return this; } @@ -9460,7 +39345,7 @@ public class THBaseService { if (value == null) { unsetSuccess(); } else { - setSuccess((Boolean)value); + setSuccess((List)value); } break; @@ -9478,7 +39363,7 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return isSuccess(); + return getSuccess(); case IO: return getIo(); @@ -9506,21 +39391,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof checkAndPut_result) - return this.equals((checkAndPut_result)that); + if (that instanceof enableTableByPattern_result) + return this.equals((enableTableByPattern_result)that); return false; } - public boolean equals(checkAndPut_result that) { + public boolean equals(enableTableByPattern_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (this.success != that.success) + if (!this.success.equals(that.success)) return false; } @@ -9540,7 +39425,7 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; + boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); @@ -9554,7 +39439,7 @@ public class THBaseService { } @Override - public int compareTo(checkAndPut_result other) { + public int compareTo(enableTableByPattern_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -9598,11 +39483,15 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("checkAndPut_result("); + StringBuilder sb = new StringBuilder("enableTableByPattern_result("); boolean first = true; sb.append("success:"); - sb.append(this.success); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } first = false; if (!first) sb.append(", "); sb.append("io:"); @@ -9631,23 +39520,21 @@ public class THBaseService { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class checkAndPut_resultStandardSchemeFactory implements SchemeFactory { - public checkAndPut_resultStandardScheme getScheme() { - return new checkAndPut_resultStandardScheme(); + private static class enableTableByPattern_resultStandardSchemeFactory implements SchemeFactory { + public enableTableByPattern_resultStandardScheme getScheme() { + return new enableTableByPattern_resultStandardScheme(); } } - private static class checkAndPut_resultStandardScheme extends StandardScheme { + private static class enableTableByPattern_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndPut_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, enableTableByPattern_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -9658,8 +39545,19 @@ public class THBaseService { } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list334 = iprot.readListBegin(); + struct.success = new ArrayList(_list334.size); + TTableDescriptor _elem335; + for (int _i336 = 0; _i336 < _list334.size; ++_i336) + { + _elem335 = new TTableDescriptor(); + _elem335.read(iprot); + struct.success.add(_elem335); + } + iprot.readListEnd(); + } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -9685,13 +39583,20 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndPut_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, enableTableByPattern_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { + if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TTableDescriptor _iter337 : struct.success) + { + _iter337.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } if (struct.io != null) { @@ -9705,16 +39610,16 @@ public class THBaseService { } - private static class checkAndPut_resultTupleSchemeFactory implements SchemeFactory { - public checkAndPut_resultTupleScheme getScheme() { - return new checkAndPut_resultTupleScheme(); + private static class enableTableByPattern_resultTupleSchemeFactory implements SchemeFactory { + public enableTableByPattern_resultTupleScheme getScheme() { + return new enableTableByPattern_resultTupleScheme(); } } - private static class checkAndPut_resultTupleScheme extends TupleScheme { + private static class enableTableByPattern_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, checkAndPut_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, enableTableByPattern_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -9725,7 +39630,13 @@ public class THBaseService { } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); + { + oprot.writeI32(struct.success.size()); + for (TTableDescriptor _iter338 : struct.success) + { + _iter338.write(oprot); + } + } } if (struct.isSetIo()) { struct.io.write(oprot); @@ -9733,11 +39644,21 @@ public class THBaseService { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, checkAndPut_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, enableTableByPattern_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = iprot.readBool(); + { + org.apache.thrift.protocol.TList _list339 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list339.size); + TTableDescriptor _elem340; + for (int _i341 = 0; _i341 < _list339.size; ++_i341) + { + _elem340 = new TTableDescriptor(); + _elem340.read(iprot); + struct.success.add(_elem340); + } + } struct.setSuccessIsSet(true); } if (incoming.get(1)) { @@ -9750,37 +39671,22 @@ public class THBaseService { } - public static class putMultiple_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putMultiple_args"); + public static class disableTable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableTable_args"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("tputs", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new putMultiple_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new putMultiple_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new disableTable_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new disableTable_argsTupleSchemeFactory()); } - /** - * the table to put data in - */ - public ByteBuffer table; // required - /** - * a list of TPuts to commit - */ - public List tputs; // required + public TTableName tableName; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the table to put data in - */ - TABLE((short)1, "table"), - /** - * a list of TPuts to commit - */ - TPUTS((short)2, "tputs"); + TABLE_NAME((short)1, "tableName"); private static final Map byName = new HashMap(); @@ -9795,10 +39701,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // TPUTS - return TPUTS; + case 1: // TABLE_NAME + return TABLE_NAME; default: return null; } @@ -9842,153 +39746,71 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TPUTS, new org.apache.thrift.meta_data.FieldMetaData("tputs", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPut.class)))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putMultiple_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableTable_args.class, metaDataMap); } - public putMultiple_args() { + public disableTable_args() { } - public putMultiple_args( - ByteBuffer table, - List tputs) + public disableTable_args( + TTableName tableName) { this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.tputs = tputs; + this.tableName = tableName; } /** * Performs a deep copy on other. */ - public putMultiple_args(putMultiple_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetTputs()) { - List __this__tputs = new ArrayList(other.tputs.size()); - for (TPut other_element : other.tputs) { - __this__tputs.add(new TPut(other_element)); - } - this.tputs = __this__tputs; + public disableTable_args(disableTable_args other) { + if (other.isSetTableName()) { + this.tableName = new TTableName(other.tableName); } } - public putMultiple_args deepCopy() { - return new putMultiple_args(this); + public disableTable_args deepCopy() { + return new disableTable_args(this); } @Override public void clear() { - this.table = null; - this.tputs = null; + this.tableName = null; } - /** - * the table to put data in - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); + public TTableName getTableName() { + return this.tableName; } - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); - } - - /** - * the table to put data in - */ - public putMultiple_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); + public disableTable_args setTableName(TTableName tableName) { + this.tableName = tableName; return this; } - public putMultiple_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; - } - - public void unsetTable() { - this.table = null; + public void unsetTableName() { + this.tableName = null; } - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; } - public void setTableIsSet(boolean value) { + public void setTableNameIsSet(boolean value) { if (!value) { - this.table = null; - } - } - - public int getTputsSize() { - return (this.tputs == null) ? 0 : this.tputs.size(); - } - - public java.util.Iterator getTputsIterator() { - return (this.tputs == null) ? null : this.tputs.iterator(); - } - - public void addToTputs(TPut elem) { - if (this.tputs == null) { - this.tputs = new ArrayList(); - } - this.tputs.add(elem); - } - - /** - * a list of TPuts to commit - */ - public List getTputs() { - return this.tputs; - } - - /** - * a list of TPuts to commit - */ - public putMultiple_args setTputs(List tputs) { - this.tputs = tputs; - return this; - } - - public void unsetTputs() { - this.tputs = null; - } - - /** Returns true if field tputs is set (has been assigned a value) and false otherwise */ - public boolean isSetTputs() { - return this.tputs != null; - } - - public void setTputsIsSet(boolean value) { - if (!value) { - this.tputs = null; + this.tableName = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; - - case TPUTS: + case TABLE_NAME: if (value == null) { - unsetTputs(); + unsetTableName(); } else { - setTputs((List)value); + setTableName((TTableName)value); } break; @@ -9997,11 +39819,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); - - case TPUTS: - return getTputs(); + case TABLE_NAME: + return getTableName(); } throw new IllegalStateException(); @@ -10014,10 +39833,8 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case TPUTS: - return isSetTputs(); + case TABLE_NAME: + return isSetTableName(); } throw new IllegalStateException(); } @@ -10026,30 +39843,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof putMultiple_args) - return this.equals((putMultiple_args)that); + if (that instanceof disableTable_args) + return this.equals((disableTable_args)that); return false; } - public boolean equals(putMultiple_args that) { + public boolean equals(disableTable_args that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; - } - - boolean this_present_tputs = true && this.isSetTputs(); - boolean that_present_tputs = true && that.isSetTputs(); - if (this_present_tputs || that_present_tputs) { - if (!(this_present_tputs && that_present_tputs)) + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) return false; - if (!this.tputs.equals(that.tputs)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -10060,43 +39868,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - boolean present_tputs = true && (isSetTputs()); - list.add(present_tputs); - if (present_tputs) - list.add(tputs); + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); return list.hashCode(); } @Override - public int compareTo(putMultiple_args other) { + public int compareTo(disableTable_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTputs()).compareTo(other.isSetTputs()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - if (isSetTputs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tputs, other.tputs); + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } @@ -10118,22 +39911,14 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("putMultiple_args("); + StringBuilder sb = new StringBuilder("disableTable_args("); boolean first = true; - sb.append("table:"); - if (this.table == null) { + sb.append("tableName:"); + if (this.tableName == null) { sb.append("null"); } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("tputs:"); - if (this.tputs == null) { - sb.append("null"); - } else { - sb.append(this.tputs); + sb.append(this.tableName); } first = false; sb.append(")"); @@ -10142,13 +39927,13 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (tputs == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tputs' was not present! Struct: " + toString()); + if (tableName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString()); } // check for sub-struct validity + if (tableName != null) { + tableName.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -10167,15 +39952,15 @@ public class THBaseService { } } - private static class putMultiple_argsStandardSchemeFactory implements SchemeFactory { - public putMultiple_argsStandardScheme getScheme() { - return new putMultiple_argsStandardScheme(); + private static class disableTable_argsStandardSchemeFactory implements SchemeFactory { + public disableTable_argsStandardScheme getScheme() { + return new disableTable_argsStandardScheme(); } } - private static class putMultiple_argsStandardScheme extends StandardScheme { + private static class disableTable_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, putMultiple_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, disableTable_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -10185,29 +39970,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TPUTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list174 = iprot.readListBegin(); - struct.tputs = new ArrayList(_list174.size); - TPut _elem175; - for (int _i176 = 0; _i176 < _list174.size; ++_i176) - { - _elem175 = new TPut(); - _elem175.read(iprot); - struct.tputs.add(_elem175); - } - iprot.readListEnd(); - } - struct.setTputsIsSet(true); + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -10223,25 +39990,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, putMultiple_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, disableTable_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.tputs != null) { - oprot.writeFieldBegin(TPUTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tputs.size())); - for (TPut _iter177 : struct.tputs) - { - _iter177.write(oprot); - } - oprot.writeListEnd(); - } + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + struct.tableName.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -10250,58 +40005,40 @@ public class THBaseService { } - private static class putMultiple_argsTupleSchemeFactory implements SchemeFactory { - public putMultiple_argsTupleScheme getScheme() { - return new putMultiple_argsTupleScheme(); + private static class disableTable_argsTupleSchemeFactory implements SchemeFactory { + public disableTable_argsTupleScheme getScheme() { + return new disableTable_argsTupleScheme(); } } - private static class putMultiple_argsTupleScheme extends TupleScheme { + private static class disableTable_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, putMultiple_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, disableTable_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - { - oprot.writeI32(struct.tputs.size()); - for (TPut _iter178 : struct.tputs) - { - _iter178.write(oprot); - } - } + struct.tableName.write(oprot); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, putMultiple_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, disableTable_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - { - org.apache.thrift.protocol.TList _list179 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.tputs = new ArrayList(_list179.size); - TPut _elem180; - for (int _i181 = 0; _i181 < _list179.size; ++_i181) - { - _elem180 = new TPut(); - _elem180.read(iprot); - struct.tputs.add(_elem180); - } - } - struct.setTputsIsSet(true); + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } } } - public static class putMultiple_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("putMultiple_result"); + public static class disableTable_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableTable_result"); private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new putMultiple_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new putMultiple_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new disableTable_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new disableTable_resultTupleSchemeFactory()); } public TIOError io; // required @@ -10371,13 +40108,13 @@ public class THBaseService { tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(putMultiple_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableTable_result.class, metaDataMap); } - public putMultiple_result() { + public disableTable_result() { } - public putMultiple_result( + public disableTable_result( TIOError io) { this(); @@ -10387,14 +40124,14 @@ public class THBaseService { /** * Performs a deep copy on other. */ - public putMultiple_result(putMultiple_result other) { + public disableTable_result(disableTable_result other) { if (other.isSetIo()) { this.io = new TIOError(other.io); } } - public putMultiple_result deepCopy() { - return new putMultiple_result(this); + public disableTable_result deepCopy() { + return new disableTable_result(this); } @Override @@ -10406,7 +40143,7 @@ public class THBaseService { return this.io; } - public putMultiple_result setIo(TIOError io) { + public disableTable_result setIo(TIOError io) { this.io = io; return this; } @@ -10465,12 +40202,12 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof putMultiple_result) - return this.equals((putMultiple_result)that); + if (that instanceof disableTable_result) + return this.equals((disableTable_result)that); return false; } - public boolean equals(putMultiple_result that) { + public boolean equals(disableTable_result that) { if (that == null) return false; @@ -10499,7 +40236,7 @@ public class THBaseService { } @Override - public int compareTo(putMultiple_result other) { + public int compareTo(disableTable_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -10533,7 +40270,7 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("putMultiple_result("); + StringBuilder sb = new StringBuilder("disableTable_result("); boolean first = true; sb.append("io:"); @@ -10568,15 +40305,15 @@ public class THBaseService { } } - private static class putMultiple_resultStandardSchemeFactory implements SchemeFactory { - public putMultiple_resultStandardScheme getScheme() { - return new putMultiple_resultStandardScheme(); + private static class disableTable_resultStandardSchemeFactory implements SchemeFactory { + public disableTable_resultStandardScheme getScheme() { + return new disableTable_resultStandardScheme(); } } - private static class putMultiple_resultStandardScheme extends StandardScheme { + private static class disableTable_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, putMultiple_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, disableTable_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -10606,7 +40343,7 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, putMultiple_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, disableTable_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -10621,16 +40358,16 @@ public class THBaseService { } - private static class putMultiple_resultTupleSchemeFactory implements SchemeFactory { - public putMultiple_resultTupleScheme getScheme() { - return new putMultiple_resultTupleScheme(); + private static class disableTable_resultTupleSchemeFactory implements SchemeFactory { + public disableTable_resultTupleScheme getScheme() { + return new disableTable_resultTupleScheme(); } } - private static class putMultiple_resultTupleScheme extends TupleScheme { + private static class disableTable_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, putMultiple_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, disableTable_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetIo()) { @@ -10643,7 +40380,7 @@ public class THBaseService { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, putMultiple_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, disableTable_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { @@ -10656,37 +40393,22 @@ public class THBaseService { } - public static class deleteSingle_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteSingle_args"); + public static class disableTableByPattern_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableTableByPattern_args"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TDELETE_FIELD_DESC = new org.apache.thrift.protocol.TField("tdelete", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField REGEX_FIELD_DESC = new org.apache.thrift.protocol.TField("regex", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new deleteSingle_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new deleteSingle_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new disableTableByPattern_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new disableTableByPattern_argsTupleSchemeFactory()); } - /** - * the table to delete from - */ - public ByteBuffer table; // required - /** - * the TDelete to delete - */ - public TDelete tdelete; // required + public String regex; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the table to delete from - */ - TABLE((short)1, "table"), - /** - * the TDelete to delete - */ - TDELETE((short)2, "tdelete"); + REGEX((short)1, "regex"); private static final Map byName = new HashMap(); @@ -10701,10 +40423,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // TDELETE - return TDELETE; + case 1: // REGEX + return REGEX; default: return null; } @@ -10747,134 +40467,72 @@ public class THBaseService { // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TDELETE, new org.apache.thrift.meta_data.FieldMetaData("tdelete", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDelete.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteSingle_args.class, metaDataMap); - } - - public deleteSingle_args() { - } - - public deleteSingle_args( - ByteBuffer table, - TDelete tdelete) - { - this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.tdelete = tdelete; - } - - /** - * Performs a deep copy on other. - */ - public deleteSingle_args(deleteSingle_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetTdelete()) { - this.tdelete = new TDelete(other.tdelete); - } - } - - public deleteSingle_args deepCopy() { - return new deleteSingle_args(this); - } - - @Override - public void clear() { - this.table = null; - this.tdelete = null; - } - - /** - * the table to delete from - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.REGEX, new org.apache.thrift.meta_data.FieldMetaData("regex", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableTableByPattern_args.class, metaDataMap); } - /** - * the table to delete from - */ - public deleteSingle_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; + public disableTableByPattern_args() { } - public deleteSingle_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; + public disableTableByPattern_args( + String regex) + { + this(); + this.regex = regex; } - public void unsetTable() { - this.table = null; + /** + * Performs a deep copy on other. + */ + public disableTableByPattern_args(disableTableByPattern_args other) { + if (other.isSetRegex()) { + this.regex = other.regex; + } } - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; + public disableTableByPattern_args deepCopy() { + return new disableTableByPattern_args(this); } - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } + @Override + public void clear() { + this.regex = null; } - /** - * the TDelete to delete - */ - public TDelete getTdelete() { - return this.tdelete; + public String getRegex() { + return this.regex; } - /** - * the TDelete to delete - */ - public deleteSingle_args setTdelete(TDelete tdelete) { - this.tdelete = tdelete; + public disableTableByPattern_args setRegex(String regex) { + this.regex = regex; return this; } - public void unsetTdelete() { - this.tdelete = null; + public void unsetRegex() { + this.regex = null; } - /** Returns true if field tdelete is set (has been assigned a value) and false otherwise */ - public boolean isSetTdelete() { - return this.tdelete != null; + /** Returns true if field regex is set (has been assigned a value) and false otherwise */ + public boolean isSetRegex() { + return this.regex != null; } - public void setTdeleteIsSet(boolean value) { + public void setRegexIsSet(boolean value) { if (!value) { - this.tdelete = null; + this.regex = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; - - case TDELETE: + case REGEX: if (value == null) { - unsetTdelete(); + unsetRegex(); } else { - setTdelete((TDelete)value); + setRegex((String)value); } break; @@ -10883,11 +40541,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); - - case TDELETE: - return getTdelete(); + case REGEX: + return getRegex(); } throw new IllegalStateException(); @@ -10900,10 +40555,8 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case TDELETE: - return isSetTdelete(); + case REGEX: + return isSetRegex(); } throw new IllegalStateException(); } @@ -10912,30 +40565,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof deleteSingle_args) - return this.equals((deleteSingle_args)that); + if (that instanceof disableTableByPattern_args) + return this.equals((disableTableByPattern_args)that); return false; } - public boolean equals(deleteSingle_args that) { + public boolean equals(disableTableByPattern_args that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; - } - - boolean this_present_tdelete = true && this.isSetTdelete(); - boolean that_present_tdelete = true && that.isSetTdelete(); - if (this_present_tdelete || that_present_tdelete) { - if (!(this_present_tdelete && that_present_tdelete)) + boolean this_present_regex = true && this.isSetRegex(); + boolean that_present_regex = true && that.isSetRegex(); + if (this_present_regex || that_present_regex) { + if (!(this_present_regex && that_present_regex)) return false; - if (!this.tdelete.equals(that.tdelete)) + if (!this.regex.equals(that.regex)) return false; } @@ -10946,43 +40590,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - boolean present_tdelete = true && (isSetTdelete()); - list.add(present_tdelete); - if (present_tdelete) - list.add(tdelete); + boolean present_regex = true && (isSetRegex()); + list.add(present_regex); + if (present_regex) + list.add(regex); return list.hashCode(); } @Override - public int compareTo(deleteSingle_args other) { + public int compareTo(disableTableByPattern_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTdelete()).compareTo(other.isSetTdelete()); + lastComparison = Boolean.valueOf(isSetRegex()).compareTo(other.isSetRegex()); if (lastComparison != 0) { return lastComparison; } - if (isSetTdelete()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tdelete, other.tdelete); + if (isSetRegex()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.regex, other.regex); if (lastComparison != 0) { return lastComparison; } @@ -11004,22 +40633,14 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("deleteSingle_args("); + StringBuilder sb = new StringBuilder("disableTableByPattern_args("); boolean first = true; - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("tdelete:"); - if (this.tdelete == null) { + sb.append("regex:"); + if (this.regex == null) { sb.append("null"); } else { - sb.append(this.tdelete); + sb.append(this.regex); } first = false; sb.append(")"); @@ -11028,16 +40649,10 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (tdelete == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tdelete' was not present! Struct: " + toString()); + if (regex == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'regex' was not present! Struct: " + toString()); } // check for sub-struct validity - if (tdelete != null) { - tdelete.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -11056,15 +40671,15 @@ public class THBaseService { } } - private static class deleteSingle_argsStandardSchemeFactory implements SchemeFactory { - public deleteSingle_argsStandardScheme getScheme() { - return new deleteSingle_argsStandardScheme(); + private static class disableTableByPattern_argsStandardSchemeFactory implements SchemeFactory { + public disableTableByPattern_argsStandardScheme getScheme() { + return new disableTableByPattern_argsStandardScheme(); } } - private static class deleteSingle_argsStandardScheme extends StandardScheme { + private static class disableTableByPattern_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteSingle_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, disableTableByPattern_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -11074,19 +40689,10 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE + case 1: // REGEX if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TDELETE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tdelete = new TDelete(); - struct.tdelete.read(iprot); - struct.setTdeleteIsSet(true); + struct.regex = iprot.readString(); + struct.setRegexIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -11102,18 +40708,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteSingle_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, disableTableByPattern_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.tdelete != null) { - oprot.writeFieldBegin(TDELETE_FIELD_DESC); - struct.tdelete.write(oprot); + if (struct.regex != null) { + oprot.writeFieldBegin(REGEX_FIELD_DESC); + oprot.writeString(struct.regex); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -11122,49 +40723,48 @@ public class THBaseService { } - private static class deleteSingle_argsTupleSchemeFactory implements SchemeFactory { - public deleteSingle_argsTupleScheme getScheme() { - return new deleteSingle_argsTupleScheme(); + private static class disableTableByPattern_argsTupleSchemeFactory implements SchemeFactory { + public disableTableByPattern_argsTupleScheme getScheme() { + return new disableTableByPattern_argsTupleScheme(); } } - private static class deleteSingle_argsTupleScheme extends TupleScheme { + private static class disableTableByPattern_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteSingle_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, disableTableByPattern_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - struct.tdelete.write(oprot); + oprot.writeString(struct.regex); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteSingle_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, disableTableByPattern_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - struct.tdelete = new TDelete(); - struct.tdelete.read(iprot); - struct.setTdeleteIsSet(true); + struct.regex = iprot.readString(); + struct.setRegexIsSet(true); } } } - public static class deleteSingle_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteSingle_result"); + public static class disableTableByPattern_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableTableByPattern_result"); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new deleteSingle_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new deleteSingle_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new disableTableByPattern_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new disableTableByPattern_resultTupleSchemeFactory()); } + public List success; // required public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), IO((short)1, "io"); private static final Map byName = new HashMap(); @@ -11180,6 +40780,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; case 1: // IO return IO; default: @@ -11225,45 +40827,97 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDescriptor.class)))); tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteSingle_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableTableByPattern_result.class, metaDataMap); } - public deleteSingle_result() { + public disableTableByPattern_result() { } - public deleteSingle_result( + public disableTableByPattern_result( + List success, TIOError io) { this(); + this.success = success; this.io = io; } /** * Performs a deep copy on other. */ - public deleteSingle_result(deleteSingle_result other) { + public disableTableByPattern_result(disableTableByPattern_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (TTableDescriptor other_element : other.success) { + __this__success.add(new TTableDescriptor(other_element)); + } + this.success = __this__success; + } if (other.isSetIo()) { this.io = new TIOError(other.io); } } - public deleteSingle_result deepCopy() { - return new deleteSingle_result(this); + public disableTableByPattern_result deepCopy() { + return new disableTableByPattern_result(this); } @Override public void clear() { + this.success = null; this.io = null; } + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TTableDescriptor elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public disableTableByPattern_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + public TIOError getIo() { return this.io; } - public deleteSingle_result setIo(TIOError io) { + public disableTableByPattern_result setIo(TIOError io) { this.io = io; return this; } @@ -11285,6 +40939,14 @@ public class THBaseService { public void setFieldValue(_Fields field, Object value) { switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + case IO: if (value == null) { unsetIo(); @@ -11298,6 +40960,9 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { + case SUCCESS: + return getSuccess(); + case IO: return getIo(); @@ -11312,6 +40977,8 @@ public class THBaseService { } switch (field) { + case SUCCESS: + return isSetSuccess(); case IO: return isSetIo(); } @@ -11322,15 +40989,24 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof deleteSingle_result) - return this.equals((deleteSingle_result)that); + if (that instanceof disableTableByPattern_result) + return this.equals((disableTableByPattern_result)that); return false; } - public boolean equals(deleteSingle_result that) { + public boolean equals(disableTableByPattern_result that) { if (that == null) return false; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + boolean this_present_io = true && this.isSetIo(); boolean that_present_io = true && that.isSetIo(); if (this_present_io || that_present_io) { @@ -11347,6 +41023,11 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + boolean present_io = true && (isSetIo()); list.add(present_io); if (present_io) @@ -11356,13 +41037,23 @@ public class THBaseService { } @Override - public int compareTo(deleteSingle_result other) { + public int compareTo(disableTableByPattern_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); if (lastComparison != 0) { return lastComparison; @@ -11390,9 +41081,17 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("deleteSingle_result("); + StringBuilder sb = new StringBuilder("disableTableByPattern_result("); boolean first = true; + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); sb.append("io:"); if (this.io == null) { sb.append("null"); @@ -11425,15 +41124,15 @@ public class THBaseService { } } - private static class deleteSingle_resultStandardSchemeFactory implements SchemeFactory { - public deleteSingle_resultStandardScheme getScheme() { - return new deleteSingle_resultStandardScheme(); + private static class disableTableByPattern_resultStandardSchemeFactory implements SchemeFactory { + public disableTableByPattern_resultStandardScheme getScheme() { + return new disableTableByPattern_resultStandardScheme(); } } - private static class deleteSingle_resultStandardScheme extends StandardScheme { + private static class disableTableByPattern_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteSingle_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, disableTableByPattern_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -11443,6 +41142,25 @@ public class THBaseService { break; } switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list342 = iprot.readListBegin(); + struct.success = new ArrayList(_list342.size); + TTableDescriptor _elem343; + for (int _i344 = 0; _i344 < _list342.size; ++_i344) + { + _elem343 = new TTableDescriptor(); + _elem343.read(iprot); + struct.success.add(_elem343); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; case 1: // IO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.io = new TIOError(); @@ -11463,10 +41181,22 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteSingle_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, disableTableByPattern_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TTableDescriptor _iter345 : struct.success) + { + _iter345.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } if (struct.io != null) { oprot.writeFieldBegin(IO_FIELD_DESC); struct.io.write(oprot); @@ -11478,32 +41208,58 @@ public class THBaseService { } - private static class deleteSingle_resultTupleSchemeFactory implements SchemeFactory { - public deleteSingle_resultTupleScheme getScheme() { - return new deleteSingle_resultTupleScheme(); + private static class disableTableByPattern_resultTupleSchemeFactory implements SchemeFactory { + public disableTableByPattern_resultTupleScheme getScheme() { + return new disableTableByPattern_resultTupleScheme(); } } - private static class deleteSingle_resultTupleScheme extends TupleScheme { + private static class disableTableByPattern_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteSingle_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, disableTableByPattern_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetIo()) { + if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TTableDescriptor _iter346 : struct.success) + { + _iter346.write(oprot); + } + } + } if (struct.isSetIo()) { struct.io.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteSingle_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, disableTableByPattern_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list347 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list347.size); + TTableDescriptor _elem348; + for (int _i349 = 0; _i349 < _list347.size; ++_i349) + { + _elem348 = new TTableDescriptor(); + _elem348.read(iprot); + struct.success.add(_elem348); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { struct.io = new TIOError(); struct.io.read(iprot); struct.setIoIsSet(true); @@ -11513,37 +41269,22 @@ public class THBaseService { } - public static class deleteMultiple_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteMultiple_args"); + public static class isTableEnabled_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTableEnabled_args"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TDELETES_FIELD_DESC = new org.apache.thrift.protocol.TField("tdeletes", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new deleteMultiple_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new deleteMultiple_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new isTableEnabled_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isTableEnabled_argsTupleSchemeFactory()); } - /** - * the table to delete from - */ - public ByteBuffer table; // required - /** - * list of TDeletes to delete - */ - public List tdeletes; // required + public TTableName tableName; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the table to delete from - */ - TABLE((short)1, "table"), - /** - * list of TDeletes to delete - */ - TDELETES((short)2, "tdeletes"); + TABLE_NAME((short)1, "tableName"); private static final Map byName = new HashMap(); @@ -11558,10 +41299,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // TDELETES - return TDELETES; + case 1: // TABLE_NAME + return TABLE_NAME; default: return null; } @@ -11605,153 +41344,71 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TDELETES, new org.apache.thrift.meta_data.FieldMetaData("tdeletes", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDelete.class)))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteMultiple_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isTableEnabled_args.class, metaDataMap); } - public deleteMultiple_args() { + public isTableEnabled_args() { } - public deleteMultiple_args( - ByteBuffer table, - List tdeletes) + public isTableEnabled_args( + TTableName tableName) { this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.tdeletes = tdeletes; + this.tableName = tableName; } /** * Performs a deep copy on other. */ - public deleteMultiple_args(deleteMultiple_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetTdeletes()) { - List __this__tdeletes = new ArrayList(other.tdeletes.size()); - for (TDelete other_element : other.tdeletes) { - __this__tdeletes.add(new TDelete(other_element)); - } - this.tdeletes = __this__tdeletes; + public isTableEnabled_args(isTableEnabled_args other) { + if (other.isSetTableName()) { + this.tableName = new TTableName(other.tableName); } } - public deleteMultiple_args deepCopy() { - return new deleteMultiple_args(this); + public isTableEnabled_args deepCopy() { + return new isTableEnabled_args(this); } @Override public void clear() { - this.table = null; - this.tdeletes = null; - } - - /** - * the table to delete from - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); - } - - /** - * the table to delete from - */ - public deleteMultiple_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; - } - - public deleteMultiple_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; - } - - public void unsetTable() { - this.table = null; - } - - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; - } - - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } - } - - public int getTdeletesSize() { - return (this.tdeletes == null) ? 0 : this.tdeletes.size(); - } - - public java.util.Iterator getTdeletesIterator() { - return (this.tdeletes == null) ? null : this.tdeletes.iterator(); - } - - public void addToTdeletes(TDelete elem) { - if (this.tdeletes == null) { - this.tdeletes = new ArrayList(); - } - this.tdeletes.add(elem); + this.tableName = null; } - /** - * list of TDeletes to delete - */ - public List getTdeletes() { - return this.tdeletes; + public TTableName getTableName() { + return this.tableName; } - /** - * list of TDeletes to delete - */ - public deleteMultiple_args setTdeletes(List tdeletes) { - this.tdeletes = tdeletes; + public isTableEnabled_args setTableName(TTableName tableName) { + this.tableName = tableName; return this; } - public void unsetTdeletes() { - this.tdeletes = null; + public void unsetTableName() { + this.tableName = null; } - /** Returns true if field tdeletes is set (has been assigned a value) and false otherwise */ - public boolean isSetTdeletes() { - return this.tdeletes != null; + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; } - public void setTdeletesIsSet(boolean value) { + public void setTableNameIsSet(boolean value) { if (!value) { - this.tdeletes = null; + this.tableName = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; - - case TDELETES: + case TABLE_NAME: if (value == null) { - unsetTdeletes(); + unsetTableName(); } else { - setTdeletes((List)value); + setTableName((TTableName)value); } break; @@ -11760,11 +41417,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); - - case TDELETES: - return getTdeletes(); + case TABLE_NAME: + return getTableName(); } throw new IllegalStateException(); @@ -11777,10 +41431,8 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case TDELETES: - return isSetTdeletes(); + case TABLE_NAME: + return isSetTableName(); } throw new IllegalStateException(); } @@ -11789,30 +41441,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof deleteMultiple_args) - return this.equals((deleteMultiple_args)that); + if (that instanceof isTableEnabled_args) + return this.equals((isTableEnabled_args)that); return false; } - public boolean equals(deleteMultiple_args that) { + public boolean equals(isTableEnabled_args that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; - } - - boolean this_present_tdeletes = true && this.isSetTdeletes(); - boolean that_present_tdeletes = true && that.isSetTdeletes(); - if (this_present_tdeletes || that_present_tdeletes) { - if (!(this_present_tdeletes && that_present_tdeletes)) + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) return false; - if (!this.tdeletes.equals(that.tdeletes)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -11823,43 +41466,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - boolean present_tdeletes = true && (isSetTdeletes()); - list.add(present_tdeletes); - if (present_tdeletes) - list.add(tdeletes); + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); return list.hashCode(); } @Override - public int compareTo(deleteMultiple_args other) { + public int compareTo(isTableEnabled_args other) { if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } + return getClass().getName().compareTo(other.getClass().getName()); } - lastComparison = Boolean.valueOf(isSetTdeletes()).compareTo(other.isSetTdeletes()); + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - if (isSetTdeletes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tdeletes, other.tdeletes); + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } @@ -11881,22 +41509,14 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("deleteMultiple_args("); + StringBuilder sb = new StringBuilder("isTableEnabled_args("); boolean first = true; - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("tdeletes:"); - if (this.tdeletes == null) { + sb.append("tableName:"); + if (this.tableName == null) { sb.append("null"); } else { - sb.append(this.tdeletes); + sb.append(this.tableName); } first = false; sb.append(")"); @@ -11905,13 +41525,13 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (tdeletes == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tdeletes' was not present! Struct: " + toString()); + if (tableName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString()); } // check for sub-struct validity + if (tableName != null) { + tableName.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -11930,15 +41550,15 @@ public class THBaseService { } } - private static class deleteMultiple_argsStandardSchemeFactory implements SchemeFactory { - public deleteMultiple_argsStandardScheme getScheme() { - return new deleteMultiple_argsStandardScheme(); + private static class isTableEnabled_argsStandardSchemeFactory implements SchemeFactory { + public isTableEnabled_argsStandardScheme getScheme() { + return new isTableEnabled_argsStandardScheme(); } } - private static class deleteMultiple_argsStandardScheme extends StandardScheme { + private static class isTableEnabled_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteMultiple_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, isTableEnabled_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -11948,29 +41568,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TDELETES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list182 = iprot.readListBegin(); - struct.tdeletes = new ArrayList(_list182.size); - TDelete _elem183; - for (int _i184 = 0; _i184 < _list182.size; ++_i184) - { - _elem183 = new TDelete(); - _elem183.read(iprot); - struct.tdeletes.add(_elem183); - } - iprot.readListEnd(); - } - struct.setTdeletesIsSet(true); + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -11986,25 +41588,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteMultiple_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, isTableEnabled_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.tdeletes != null) { - oprot.writeFieldBegin(TDELETES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tdeletes.size())); - for (TDelete _iter185 : struct.tdeletes) - { - _iter185.write(oprot); - } - oprot.writeListEnd(); - } + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + struct.tableName.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -12013,62 +41603,44 @@ public class THBaseService { } - private static class deleteMultiple_argsTupleSchemeFactory implements SchemeFactory { - public deleteMultiple_argsTupleScheme getScheme() { - return new deleteMultiple_argsTupleScheme(); + private static class isTableEnabled_argsTupleSchemeFactory implements SchemeFactory { + public isTableEnabled_argsTupleScheme getScheme() { + return new isTableEnabled_argsTupleScheme(); } } - private static class deleteMultiple_argsTupleScheme extends TupleScheme { + private static class isTableEnabled_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteMultiple_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, isTableEnabled_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - { - oprot.writeI32(struct.tdeletes.size()); - for (TDelete _iter186 : struct.tdeletes) - { - _iter186.write(oprot); - } - } + struct.tableName.write(oprot); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteMultiple_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, isTableEnabled_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - { - org.apache.thrift.protocol.TList _list187 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.tdeletes = new ArrayList(_list187.size); - TDelete _elem188; - for (int _i189 = 0; _i189 < _list187.size; ++_i189) - { - _elem188 = new TDelete(); - _elem188.read(iprot); - struct.tdeletes.add(_elem188); - } - } - struct.setTdeletesIsSet(true); + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } } } - public static class deleteMultiple_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteMultiple_result"); + public static class isTableEnabled_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTableEnabled_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new deleteMultiple_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new deleteMultiple_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new isTableEnabled_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isTableEnabled_resultTupleSchemeFactory()); } - public List success; // required + public boolean success; // required public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -12133,100 +41705,82 @@ public class THBaseService { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDelete.class)))); + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteMultiple_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isTableEnabled_result.class, metaDataMap); } - public deleteMultiple_result() { + public isTableEnabled_result() { } - public deleteMultiple_result( - List success, + public isTableEnabled_result( + boolean success, TIOError io) { this(); this.success = success; + setSuccessIsSet(true); this.io = io; } /** * Performs a deep copy on other. */ - public deleteMultiple_result(deleteMultiple_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (TDelete other_element : other.success) { - __this__success.add(new TDelete(other_element)); - } - this.success = __this__success; - } + public isTableEnabled_result(isTableEnabled_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; if (other.isSetIo()) { this.io = new TIOError(other.io); } } - public deleteMultiple_result deepCopy() { - return new deleteMultiple_result(this); + public isTableEnabled_result deepCopy() { + return new isTableEnabled_result(this); } @Override public void clear() { - this.success = null; + setSuccessIsSet(false); + this.success = false; this.io = null; } - 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(TDelete elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { + public boolean isSuccess() { return this.success; } - public deleteMultiple_result setSuccess(List success) { + public isTableEnabled_result setSuccess(boolean success) { this.success = success; + setSuccessIsSet(true); return this; } public void unsetSuccess() { - this.success = null; + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.success != null; + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public TIOError getIo() { return this.io; } - public deleteMultiple_result setIo(TIOError io) { + public isTableEnabled_result setIo(TIOError io) { this.io = io; return this; } @@ -12252,7 +41806,7 @@ public class THBaseService { if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Boolean)value); } break; @@ -12270,7 +41824,7 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return isSuccess(); case IO: return getIo(); @@ -12298,21 +41852,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof deleteMultiple_result) - return this.equals((deleteMultiple_result)that); + if (that instanceof isTableEnabled_result) + return this.equals((isTableEnabled_result)that); return false; } - public boolean equals(deleteMultiple_result that) { + public boolean equals(isTableEnabled_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); + boolean this_present_success = true; + boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (!this.success.equals(that.success)) + if (this.success != that.success) return false; } @@ -12332,7 +41886,7 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); + boolean present_success = true; list.add(present_success); if (present_success) list.add(success); @@ -12346,7 +41900,7 @@ public class THBaseService { } @Override - public int compareTo(deleteMultiple_result other) { + public int compareTo(isTableEnabled_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -12390,15 +41944,11 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("deleteMultiple_result("); + StringBuilder sb = new StringBuilder("isTableEnabled_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("io:"); @@ -12427,21 +41977,23 @@ public class THBaseService { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class deleteMultiple_resultStandardSchemeFactory implements SchemeFactory { - public deleteMultiple_resultStandardScheme getScheme() { - return new deleteMultiple_resultStandardScheme(); + private static class isTableEnabled_resultStandardSchemeFactory implements SchemeFactory { + public isTableEnabled_resultStandardScheme getScheme() { + return new isTableEnabled_resultStandardScheme(); } } - private static class deleteMultiple_resultStandardScheme extends StandardScheme { + private static class isTableEnabled_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteMultiple_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, isTableEnabled_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -12452,19 +42004,8 @@ public class THBaseService { } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list190 = iprot.readListBegin(); - struct.success = new ArrayList(_list190.size); - TDelete _elem191; - for (int _i192 = 0; _i192 < _list190.size; ++_i192) - { - _elem191 = new TDelete(); - _elem191.read(iprot); - struct.success.add(_elem191); - } - iprot.readListEnd(); - } + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -12490,20 +42031,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteMultiple_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, isTableEnabled_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { + if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (TDelete _iter193 : struct.success) - { - _iter193.write(oprot); - } - oprot.writeListEnd(); - } + oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.io != null) { @@ -12517,16 +42051,16 @@ public class THBaseService { } - private static class deleteMultiple_resultTupleSchemeFactory implements SchemeFactory { - public deleteMultiple_resultTupleScheme getScheme() { - return new deleteMultiple_resultTupleScheme(); + private static class isTableEnabled_resultTupleSchemeFactory implements SchemeFactory { + public isTableEnabled_resultTupleScheme getScheme() { + return new isTableEnabled_resultTupleScheme(); } } - private static class deleteMultiple_resultTupleScheme extends TupleScheme { + private static class isTableEnabled_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteMultiple_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, isTableEnabled_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -12537,13 +42071,7 @@ public class THBaseService { } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (TDelete _iter194 : struct.success) - { - _iter194.write(oprot); - } - } + oprot.writeBool(struct.success); } if (struct.isSetIo()) { struct.io.write(oprot); @@ -12551,21 +42079,11 @@ public class THBaseService { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteMultiple_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, isTableEnabled_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list195 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list195.size); - TDelete _elem196; - for (int _i197 = 0; _i197 < _list195.size; ++_i197) - { - _elem196 = new TDelete(); - _elem196.read(iprot); - struct.success.add(_elem196); - } - } + struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { @@ -12578,501 +42096,146 @@ public class THBaseService { } - public static class checkAndDelete_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndDelete_args"); - - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField TDELETE_FIELD_DESC = new org.apache.thrift.protocol.TField("tdelete", org.apache.thrift.protocol.TType.STRUCT, (short)6); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new checkAndDelete_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new checkAndDelete_argsTupleSchemeFactory()); - } - - /** - * to check in and delete from - */ - public ByteBuffer table; // required - /** - * row to check - */ - public ByteBuffer row; // required - /** - * column family to check - */ - public ByteBuffer family; // required - /** - * column qualifier to check - */ - public ByteBuffer qualifier; // required - /** - * the expected value, if not provided the - * check is for the non-existence of the - * column in question - */ - public ByteBuffer value; // required - /** - * the TDelete to execute if the check succeeds - */ - public TDelete tdelete; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * to check in and delete from - */ - TABLE((short)1, "table"), - /** - * row to check - */ - ROW((short)2, "row"), - /** - * column family to check - */ - FAMILY((short)3, "family"), - /** - * column qualifier to check - */ - QUALIFIER((short)4, "qualifier"), - /** - * the expected value, if not provided the - * check is for the non-existence of the - * column in question - */ - VALUE((short)5, "value"), - /** - * the TDelete to execute if the check succeeds - */ - TDELETE((short)6, "tdelete"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // ROW - return ROW; - case 3: // FAMILY - return FAMILY; - case 4: // QUALIFIER - return QUALIFIER; - case 5: // VALUE - return VALUE; - case 6: // TDELETE - return TDELETE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.FAMILY, new org.apache.thrift.meta_data.FieldMetaData("family", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TDELETE, new org.apache.thrift.meta_data.FieldMetaData("tdelete", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDelete.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndDelete_args.class, metaDataMap); - } - - public checkAndDelete_args() { - } - - public checkAndDelete_args( - ByteBuffer table, - ByteBuffer row, - ByteBuffer family, - ByteBuffer qualifier, - ByteBuffer value, - TDelete tdelete) - { - this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.row = org.apache.thrift.TBaseHelper.copyBinary(row); - this.family = org.apache.thrift.TBaseHelper.copyBinary(family); - this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - this.tdelete = tdelete; - } - - /** - * Performs a deep copy on other. - */ - public checkAndDelete_args(checkAndDelete_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetRow()) { - this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); - } - if (other.isSetFamily()) { - this.family = org.apache.thrift.TBaseHelper.copyBinary(other.family); - } - if (other.isSetQualifier()) { - this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier); - } - if (other.isSetValue()) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); - } - if (other.isSetTdelete()) { - this.tdelete = new TDelete(other.tdelete); - } - } - - public checkAndDelete_args deepCopy() { - return new checkAndDelete_args(this); - } - - @Override - public void clear() { - this.table = null; - this.row = null; - this.family = null; - this.qualifier = null; - this.value = null; - this.tdelete = null; - } - - /** - * to check in and delete from - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); - } - - /** - * to check in and delete from - */ - public checkAndDelete_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; - } - - public checkAndDelete_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; - } - - public void unsetTable() { - this.table = null; - } - - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; - } - - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } - } - - /** - * row to check - */ - public byte[] getRow() { - setRow(org.apache.thrift.TBaseHelper.rightSize(row)); - return row == null ? null : row.array(); - } - - public ByteBuffer bufferForRow() { - return org.apache.thrift.TBaseHelper.copyBinary(row); - } - - /** - * row to check - */ - public checkAndDelete_args setRow(byte[] row) { - this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length)); - return this; - } - - public checkAndDelete_args setRow(ByteBuffer row) { - this.row = org.apache.thrift.TBaseHelper.copyBinary(row); - return this; - } - - public void unsetRow() { - this.row = null; - } - - /** Returns true if field row is set (has been assigned a value) and false otherwise */ - public boolean isSetRow() { - return this.row != null; - } - - public void setRowIsSet(boolean value) { - if (!value) { - this.row = null; - } - } - - /** - * column family to check - */ - public byte[] getFamily() { - setFamily(org.apache.thrift.TBaseHelper.rightSize(family)); - return family == null ? null : family.array(); - } + public static class isTableDisabled_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTableDisabled_args"); - public ByteBuffer bufferForFamily() { - return org.apache.thrift.TBaseHelper.copyBinary(family); - } + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1); - /** - * column family to check - */ - public checkAndDelete_args setFamily(byte[] family) { - this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length)); - return this; + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new isTableDisabled_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isTableDisabled_argsTupleSchemeFactory()); } - public checkAndDelete_args setFamily(ByteBuffer family) { - this.family = org.apache.thrift.TBaseHelper.copyBinary(family); - return this; - } + public TTableName tableName; // required - public void unsetFamily() { - this.family = null; - } + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE_NAME((short)1, "tableName"); - /** Returns true if field family is set (has been assigned a value) and false otherwise */ - public boolean isSetFamily() { - return this.family != null; - } + private static final Map byName = new HashMap(); - public void setFamilyIsSet(boolean value) { - if (!value) { - this.family = null; + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } } - } - - /** - * column qualifier to check - */ - public byte[] getQualifier() { - setQualifier(org.apache.thrift.TBaseHelper.rightSize(qualifier)); - return qualifier == null ? null : qualifier.array(); - } - public ByteBuffer bufferForQualifier() { - return org.apache.thrift.TBaseHelper.copyBinary(qualifier); - } + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } + } - /** - * column qualifier to check - */ - public checkAndDelete_args setQualifier(byte[] qualifier) { - this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length)); - return this; - } + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } - public checkAndDelete_args setQualifier(ByteBuffer qualifier) { - this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); - return this; - } + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } - public void unsetQualifier() { - this.qualifier = null; - } + private final short _thriftId; + private final String _fieldName; - /** Returns true if field qualifier is set (has been assigned a value) and false otherwise */ - public boolean isSetQualifier() { - return this.qualifier != null; - } + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } - public void setQualifierIsSet(boolean value) { - if (!value) { - this.qualifier = null; + public short getThriftFieldId() { + return _thriftId; } - } - /** - * the expected value, if not provided the - * check is for the non-existence of the - * column in question - */ - public byte[] getValue() { - setValue(org.apache.thrift.TBaseHelper.rightSize(value)); - return value == null ? null : value.array(); + public String getFieldName() { + return _fieldName; + } } - public ByteBuffer bufferForValue() { - return org.apache.thrift.TBaseHelper.copyBinary(value); + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isTableDisabled_args.class, metaDataMap); } - /** - * the expected value, if not provided the - * check is for the non-existence of the - * column in question - */ - public checkAndDelete_args setValue(byte[] value) { - this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length)); - return this; + public isTableDisabled_args() { } - public checkAndDelete_args setValue(ByteBuffer value) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - return this; + public isTableDisabled_args( + TTableName tableName) + { + this(); + this.tableName = tableName; } - public void unsetValue() { - this.value = null; + /** + * Performs a deep copy on other. + */ + public isTableDisabled_args(isTableDisabled_args other) { + if (other.isSetTableName()) { + this.tableName = new TTableName(other.tableName); + } } - /** Returns true if field value is set (has been assigned a value) and false otherwise */ - public boolean isSetValue() { - return this.value != null; + public isTableDisabled_args deepCopy() { + return new isTableDisabled_args(this); } - public void setValueIsSet(boolean value) { - if (!value) { - this.value = null; - } + @Override + public void clear() { + this.tableName = null; } - /** - * the TDelete to execute if the check succeeds - */ - public TDelete getTdelete() { - return this.tdelete; + public TTableName getTableName() { + return this.tableName; } - /** - * the TDelete to execute if the check succeeds - */ - public checkAndDelete_args setTdelete(TDelete tdelete) { - this.tdelete = tdelete; + public isTableDisabled_args setTableName(TTableName tableName) { + this.tableName = tableName; return this; } - public void unsetTdelete() { - this.tdelete = null; + public void unsetTableName() { + this.tableName = null; } - /** Returns true if field tdelete is set (has been assigned a value) and false otherwise */ - public boolean isSetTdelete() { - return this.tdelete != null; + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; } - public void setTdeleteIsSet(boolean value) { + public void setTableNameIsSet(boolean value) { if (!value) { - this.tdelete = null; + this.tableName = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; - - case ROW: - if (value == null) { - unsetRow(); - } else { - setRow((ByteBuffer)value); - } - break; - - case FAMILY: - if (value == null) { - unsetFamily(); - } else { - setFamily((ByteBuffer)value); - } - break; - - case QUALIFIER: - if (value == null) { - unsetQualifier(); - } else { - setQualifier((ByteBuffer)value); - } - break; - - case VALUE: - if (value == null) { - unsetValue(); - } else { - setValue((ByteBuffer)value); - } - break; - - case TDELETE: + case TABLE_NAME: if (value == null) { - unsetTdelete(); + unsetTableName(); } else { - setTdelete((TDelete)value); + setTableName((TTableName)value); } break; @@ -13081,23 +42244,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); - - case ROW: - return getRow(); - - case FAMILY: - return getFamily(); - - case QUALIFIER: - return getQualifier(); - - case VALUE: - return getValue(); - - case TDELETE: - return getTdelete(); + case TABLE_NAME: + return getTableName(); } throw new IllegalStateException(); @@ -13110,18 +42258,8 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case ROW: - return isSetRow(); - case FAMILY: - return isSetFamily(); - case QUALIFIER: - return isSetQualifier(); - case VALUE: - return isSetValue(); - case TDELETE: - return isSetTdelete(); + case TABLE_NAME: + return isSetTableName(); } throw new IllegalStateException(); } @@ -13130,66 +42268,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof checkAndDelete_args) - return this.equals((checkAndDelete_args)that); + if (that instanceof isTableDisabled_args) + return this.equals((isTableDisabled_args)that); return false; } - public boolean equals(checkAndDelete_args that) { + public boolean equals(isTableDisabled_args that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; - } - - boolean this_present_row = true && this.isSetRow(); - boolean that_present_row = true && that.isSetRow(); - if (this_present_row || that_present_row) { - if (!(this_present_row && that_present_row)) - return false; - if (!this.row.equals(that.row)) - return false; - } - - boolean this_present_family = true && this.isSetFamily(); - boolean that_present_family = true && that.isSetFamily(); - if (this_present_family || that_present_family) { - if (!(this_present_family && that_present_family)) - return false; - if (!this.family.equals(that.family)) - return false; - } - - boolean this_present_qualifier = true && this.isSetQualifier(); - boolean that_present_qualifier = true && that.isSetQualifier(); - if (this_present_qualifier || that_present_qualifier) { - if (!(this_present_qualifier && that_present_qualifier)) - return false; - if (!this.qualifier.equals(that.qualifier)) - return false; - } - - 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; - if (!this.value.equals(that.value)) - return false; - } - - boolean this_present_tdelete = true && this.isSetTdelete(); - boolean that_present_tdelete = true && that.isSetTdelete(); - if (this_present_tdelete || that_present_tdelete) { - if (!(this_present_tdelete && that_present_tdelete)) + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) return false; - if (!this.tdelete.equals(that.tdelete)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -13200,103 +42293,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - boolean present_row = true && (isSetRow()); - list.add(present_row); - if (present_row) - list.add(row); - - boolean present_family = true && (isSetFamily()); - list.add(present_family); - if (present_family) - list.add(family); - - boolean present_qualifier = true && (isSetQualifier()); - list.add(present_qualifier); - if (present_qualifier) - list.add(qualifier); - - boolean present_value = true && (isSetValue()); - list.add(present_value); - if (present_value) - list.add(value); - - boolean present_tdelete = true && (isSetTdelete()); - list.add(present_tdelete); - if (present_tdelete) - list.add(tdelete); + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); return list.hashCode(); } @Override - public int compareTo(checkAndDelete_args other) { + public int compareTo(isTableDisabled_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRow()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFamily()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, other.family); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQualifier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTdelete()).compareTo(other.isSetTdelete()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - if (isSetTdelete()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tdelete, other.tdelete); + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } @@ -13318,54 +42336,14 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("checkAndDelete_args("); + StringBuilder sb = new StringBuilder("isTableDisabled_args("); boolean first = true; - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("row:"); - if (this.row == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.row, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("family:"); - if (this.family == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.family, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("qualifier:"); - if (this.qualifier == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.qualifier, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("value:"); - if (this.value == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.value, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("tdelete:"); - if (this.tdelete == null) { + sb.append("tableName:"); + if (this.tableName == null) { sb.append("null"); } else { - sb.append(this.tdelete); + sb.append(this.tableName); } first = false; sb.append(")"); @@ -13374,24 +42352,12 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (row == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString()); - } - if (family == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'family' was not present! Struct: " + toString()); - } - if (qualifier == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifier' was not present! Struct: " + toString()); - } - if (tdelete == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tdelete' was not present! Struct: " + toString()); + if (tableName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString()); } // check for sub-struct validity - if (tdelete != null) { - tdelete.validate(); + if (tableName != null) { + tableName.validate(); } } @@ -13411,15 +42377,15 @@ public class THBaseService { } } - private static class checkAndDelete_argsStandardSchemeFactory implements SchemeFactory { - public checkAndDelete_argsStandardScheme getScheme() { - return new checkAndDelete_argsStandardScheme(); + private static class isTableDisabled_argsStandardSchemeFactory implements SchemeFactory { + public isTableDisabled_argsStandardScheme getScheme() { + return new isTableDisabled_argsStandardScheme(); } } - private static class checkAndDelete_argsStandardScheme extends StandardScheme { + private static class isTableDisabled_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndDelete_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, isTableDisabled_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -13429,51 +42395,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // ROW - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.row = iprot.readBinary(); - struct.setRowIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // FAMILY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.family = iprot.readBinary(); - struct.setFamilyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // QUALIFIER - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.qualifier = iprot.readBinary(); - struct.setQualifierIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // TDELETE + case 1: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tdelete = new TDelete(); - struct.tdelete.read(iprot); - struct.setTdeleteIsSet(true); + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -13489,106 +42415,56 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndDelete_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, isTableDisabled_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.row != null) { - oprot.writeFieldBegin(ROW_FIELD_DESC); - oprot.writeBinary(struct.row); - oprot.writeFieldEnd(); - } - if (struct.family != null) { - oprot.writeFieldBegin(FAMILY_FIELD_DESC); - oprot.writeBinary(struct.family); - oprot.writeFieldEnd(); - } - if (struct.qualifier != null) { - oprot.writeFieldBegin(QUALIFIER_FIELD_DESC); - oprot.writeBinary(struct.qualifier); - oprot.writeFieldEnd(); - } - if (struct.value != null) { - oprot.writeFieldBegin(VALUE_FIELD_DESC); - oprot.writeBinary(struct.value); - oprot.writeFieldEnd(); - } - if (struct.tdelete != null) { - oprot.writeFieldBegin(TDELETE_FIELD_DESC); - struct.tdelete.write(oprot); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + struct.tableName.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } - } - - private static class checkAndDelete_argsTupleSchemeFactory implements SchemeFactory { - public checkAndDelete_argsTupleScheme getScheme() { - return new checkAndDelete_argsTupleScheme(); + } + + private static class isTableDisabled_argsTupleSchemeFactory implements SchemeFactory { + public isTableDisabled_argsTupleScheme getScheme() { + return new isTableDisabled_argsTupleScheme(); } } - private static class checkAndDelete_argsTupleScheme extends TupleScheme { + private static class isTableDisabled_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, isTableDisabled_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - oprot.writeBinary(struct.row); - oprot.writeBinary(struct.family); - oprot.writeBinary(struct.qualifier); - struct.tdelete.write(oprot); - BitSet optionals = new BitSet(); - if (struct.isSetValue()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetValue()) { - oprot.writeBinary(struct.value); - } + struct.tableName.write(oprot); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, isTableDisabled_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - struct.row = iprot.readBinary(); - struct.setRowIsSet(true); - struct.family = iprot.readBinary(); - struct.setFamilyIsSet(true); - struct.qualifier = iprot.readBinary(); - struct.setQualifierIsSet(true); - struct.tdelete = new TDelete(); - struct.tdelete.read(iprot); - struct.setTdeleteIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } } } - public static class checkAndDelete_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndDelete_result"); + public static class isTableDisabled_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTableDisabled_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new checkAndDelete_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new checkAndDelete_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new isTableDisabled_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isTableDisabled_resultTupleSchemeFactory()); } public boolean success; // required @@ -13666,13 +42542,13 @@ public class THBaseService { tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndDelete_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isTableDisabled_result.class, metaDataMap); } - public checkAndDelete_result() { + public isTableDisabled_result() { } - public checkAndDelete_result( + public isTableDisabled_result( boolean success, TIOError io) { @@ -13685,7 +42561,7 @@ public class THBaseService { /** * Performs a deep copy on other. */ - public checkAndDelete_result(checkAndDelete_result other) { + public isTableDisabled_result(isTableDisabled_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetIo()) { @@ -13693,8 +42569,8 @@ public class THBaseService { } } - public checkAndDelete_result deepCopy() { - return new checkAndDelete_result(this); + public isTableDisabled_result deepCopy() { + return new isTableDisabled_result(this); } @Override @@ -13708,7 +42584,7 @@ public class THBaseService { return this.success; } - public checkAndDelete_result setSuccess(boolean success) { + public isTableDisabled_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; @@ -13731,7 +42607,7 @@ public class THBaseService { return this.io; } - public checkAndDelete_result setIo(TIOError io) { + public isTableDisabled_result setIo(TIOError io) { this.io = io; return this; } @@ -13803,12 +42679,12 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof checkAndDelete_result) - return this.equals((checkAndDelete_result)that); + if (that instanceof isTableDisabled_result) + return this.equals((isTableDisabled_result)that); return false; } - public boolean equals(checkAndDelete_result that) { + public boolean equals(isTableDisabled_result that) { if (that == null) return false; @@ -13851,7 +42727,7 @@ public class THBaseService { } @Override - public int compareTo(checkAndDelete_result other) { + public int compareTo(isTableDisabled_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -13895,7 +42771,7 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("checkAndDelete_result("); + StringBuilder sb = new StringBuilder("isTableDisabled_result("); boolean first = true; sb.append("success:"); @@ -13936,15 +42812,15 @@ public class THBaseService { } } - private static class checkAndDelete_resultStandardSchemeFactory implements SchemeFactory { - public checkAndDelete_resultStandardScheme getScheme() { - return new checkAndDelete_resultStandardScheme(); + private static class isTableDisabled_resultStandardSchemeFactory implements SchemeFactory { + public isTableDisabled_resultStandardScheme getScheme() { + return new isTableDisabled_resultStandardScheme(); } } - private static class checkAndDelete_resultStandardScheme extends StandardScheme { + private static class isTableDisabled_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndDelete_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, isTableDisabled_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -13982,7 +42858,7 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndDelete_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, isTableDisabled_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -14002,16 +42878,16 @@ public class THBaseService { } - private static class checkAndDelete_resultTupleSchemeFactory implements SchemeFactory { - public checkAndDelete_resultTupleScheme getScheme() { - return new checkAndDelete_resultTupleScheme(); + private static class isTableDisabled_resultTupleSchemeFactory implements SchemeFactory { + public isTableDisabled_resultTupleScheme getScheme() { + return new isTableDisabled_resultTupleScheme(); } } - private static class checkAndDelete_resultTupleScheme extends TupleScheme { + private static class isTableDisabled_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, isTableDisabled_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -14030,7 +42906,7 @@ public class THBaseService { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, isTableDisabled_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { @@ -14047,37 +42923,22 @@ public class THBaseService { } - public static class increment_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("increment_args"); + public static class isTableAvailable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTableAvailable_args"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TINCREMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("tincrement", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new increment_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new increment_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new isTableAvailable_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isTableAvailable_argsTupleSchemeFactory()); } - /** - * the table to increment the value on - */ - public ByteBuffer table; // required - /** - * the TIncrement to increment - */ - public TIncrement tincrement; // required + public TTableName tableName; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the table to increment the value on - */ - TABLE((short)1, "table"), - /** - * the TIncrement to increment - */ - TINCREMENT((short)2, "tincrement"); + TABLE_NAME((short)1, "tableName"); private static final Map byName = new HashMap(); @@ -14092,10 +42953,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // TINCREMENT - return TINCREMENT; + case 1: // TABLE_NAME + return TABLE_NAME; default: return null; } @@ -14139,133 +42998,477 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TINCREMENT, new org.apache.thrift.meta_data.FieldMetaData("tincrement", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TIncrement.class))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(increment_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isTableAvailable_args.class, metaDataMap); } - public increment_args() { + public isTableAvailable_args() { } - public increment_args( - ByteBuffer table, - TIncrement tincrement) + public isTableAvailable_args( + TTableName tableName) { this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.tincrement = tincrement; + this.tableName = tableName; } /** * Performs a deep copy on other. */ - public increment_args(increment_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetTincrement()) { - this.tincrement = new TIncrement(other.tincrement); + public isTableAvailable_args(isTableAvailable_args other) { + if (other.isSetTableName()) { + this.tableName = new TTableName(other.tableName); } } - public increment_args deepCopy() { - return new increment_args(this); + public isTableAvailable_args deepCopy() { + return new isTableAvailable_args(this); } @Override public void clear() { - this.table = null; - this.tincrement = null; + this.tableName = null; } - /** - * the table to increment the value on - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); + public TTableName getTableName() { + return this.tableName; } - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); + public isTableAvailable_args setTableName(TTableName tableName) { + this.tableName = tableName; + return this; } - /** - * the table to increment the value on - */ - public increment_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; + public void unsetTableName() { + this.tableName = null; } - public increment_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; } - public void unsetTable() { - this.table = null; + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } } - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((TTableName)value); + } + break; + + } } - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + } + throw new IllegalStateException(); } - /** - * the TIncrement to increment - */ - public TIncrement getTincrement() { - return this.tincrement; + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof isTableAvailable_args) + return this.equals((isTableAvailable_args)that); + return false; + } + + public boolean equals(isTableAvailable_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); + + return list.hashCode(); + } + + @Override + public int compareTo(isTableAvailable_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("isTableAvailable_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (tableName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (tableName != null) { + tableName.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class isTableAvailable_argsStandardSchemeFactory implements SchemeFactory { + public isTableAvailable_argsStandardScheme getScheme() { + return new isTableAvailable_argsStandardScheme(); + } + } + + private static class isTableAvailable_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, isTableAvailable_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, isTableAvailable_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + struct.tableName.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class isTableAvailable_argsTupleSchemeFactory implements SchemeFactory { + public isTableAvailable_argsTupleScheme getScheme() { + return new isTableAvailable_argsTupleScheme(); + } + } + + private static class isTableAvailable_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, isTableAvailable_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.tableName.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, isTableAvailable_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); + } + } + + } + + public static class isTableAvailable_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTableAvailable_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new isTableAvailable_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isTableAvailable_resultTupleSchemeFactory()); + } + + public boolean success; // required + public TIOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isTableAvailable_result.class, metaDataMap); + } + + public isTableAvailable_result() { + } + + public isTableAvailable_result( + boolean success, + TIOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; } /** - * the TIncrement to increment + * Performs a deep copy on other. */ - public increment_args setTincrement(TIncrement tincrement) { - this.tincrement = tincrement; + public isTableAvailable_result(isTableAvailable_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } + } + + public isTableAvailable_result deepCopy() { + return new isTableAvailable_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.io = null; + } + + public boolean isSuccess() { + return this.success; + } + + public isTableAvailable_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); return this; } - public void unsetTincrement() { - this.tincrement = null; + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - /** Returns true if field tincrement is set (has been assigned a value) and false otherwise */ - public boolean isSetTincrement() { - return this.tincrement != null; + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public void setTincrementIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public TIOError getIo() { + return this.io; + } + + public isTableAvailable_result setIo(TIOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { if (!value) { - this.tincrement = null; + this.io = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: + case SUCCESS: if (value == null) { - unsetTable(); + unsetSuccess(); } else { - setTable((ByteBuffer)value); + setSuccess((Boolean)value); } break; - case TINCREMENT: + case IO: if (value == null) { - unsetTincrement(); + unsetIo(); } else { - setTincrement((TIncrement)value); + setIo((TIOError)value); } break; @@ -14274,11 +43477,11 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); + case SUCCESS: + return isSuccess(); - case TINCREMENT: - return getTincrement(); + case IO: + return getIo(); } throw new IllegalStateException(); @@ -14291,10 +43494,10 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case TINCREMENT: - return isSetTincrement(); + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); } throw new IllegalStateException(); } @@ -14303,30 +43506,30 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof increment_args) - return this.equals((increment_args)that); + if (that instanceof isTableAvailable_result) + return this.equals((isTableAvailable_result)that); return false; } - public boolean equals(increment_args that) { + public boolean equals(isTableAvailable_result that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.table.equals(that.table)) + if (this.success != that.success) return false; - } - - boolean this_present_tincrement = true && this.isSetTincrement(); - boolean that_present_tincrement = true && that.isSetTincrement(); - if (this_present_tincrement || that_present_tincrement) { - if (!(this_present_tincrement && that_present_tincrement)) + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) return false; - if (!this.tincrement.equals(that.tincrement)) + if (!this.io.equals(that.io)) return false; } @@ -14337,43 +43540,43 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); - boolean present_tincrement = true && (isSetTincrement()); - list.add(present_tincrement); - if (present_tincrement) - list.add(tincrement); + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); return list.hashCode(); } @Override - public int compareTo(increment_args other) { + public int compareTo(isTableAvailable_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTincrement()).compareTo(other.isSetTincrement()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); if (lastComparison != 0) { return lastComparison; } - if (isSetTincrement()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tincrement, other.tincrement); + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); if (lastComparison != 0) { return lastComparison; } @@ -14391,26 +43594,22 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("increment_args("); + StringBuilder sb = new StringBuilder("isTableAvailable_result("); boolean first = true; - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("tincrement:"); - if (this.tincrement == null) { + sb.append("io:"); + if (this.io == null) { sb.append("null"); } else { - sb.append(this.tincrement); + sb.append(this.io); } first = false; sb.append(")"); @@ -14419,16 +43618,7 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (tincrement == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tincrement' was not present! Struct: " + toString()); - } // check for sub-struct validity - if (tincrement != null) { - tincrement.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -14441,21 +43631,23 @@ public class THBaseService { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class increment_argsStandardSchemeFactory implements SchemeFactory { - public increment_argsStandardScheme getScheme() { - return new increment_argsStandardScheme(); + private static class isTableAvailable_resultStandardSchemeFactory implements SchemeFactory { + public isTableAvailable_resultStandardScheme getScheme() { + return new isTableAvailable_resultStandardScheme(); } } - private static class increment_argsStandardScheme extends StandardScheme { + private static class isTableAvailable_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, increment_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, isTableAvailable_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -14465,19 +43657,19 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // TINCREMENT + case 1: // IO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tincrement = new TIncrement(); - struct.tincrement.read(iprot); - struct.setTincrementIsSet(true); + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -14493,18 +43685,18 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, increment_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, isTableAvailable_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); oprot.writeFieldEnd(); } - if (struct.tincrement != null) { - oprot.writeFieldBegin(TINCREMENT_FIELD_DESC); - struct.tincrement.write(oprot); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -14513,53 +43705,70 @@ public class THBaseService { } - private static class increment_argsTupleSchemeFactory implements SchemeFactory { - public increment_argsTupleScheme getScheme() { - return new increment_argsTupleScheme(); + private static class isTableAvailable_resultTupleSchemeFactory implements SchemeFactory { + public isTableAvailable_resultTupleScheme getScheme() { + return new isTableAvailable_resultTupleScheme(); } } - private static class increment_argsTupleScheme extends TupleScheme { + private static class isTableAvailable_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, increment_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, isTableAvailable_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - struct.tincrement.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, increment_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, isTableAvailable_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - struct.tincrement = new TIncrement(); - struct.tincrement.read(iprot); - struct.setTincrementIsSet(true); + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } } } } - public static class increment_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("increment_result"); + public static class isTableAvailableWithSplit_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTableAvailableWithSplit_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField SPLIT_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("splitKeys", org.apache.thrift.protocol.TType.LIST, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new increment_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new increment_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new isTableAvailableWithSplit_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isTableAvailableWithSplit_argsTupleSchemeFactory()); } - public TResult success; // required - public TIOError io; // required + public TTableName tableName; // required + public List splitKeys; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - IO((short)1, "io"); + TABLE_NAME((short)1, "tableName"), + SPLIT_KEYS((short)2, "splitKeys"); private static final Map byName = new HashMap(); @@ -14574,10 +43783,10 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // IO - return IO; + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // SPLIT_KEYS + return SPLIT_KEYS; default: return null; } @@ -14621,111 +43830,128 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class))); - tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); + tmpMap.put(_Fields.SPLIT_KEYS, new org.apache.thrift.meta_data.FieldMetaData("splitKeys", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(increment_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isTableAvailableWithSplit_args.class, metaDataMap); } - public increment_result() { + public isTableAvailableWithSplit_args() { } - public increment_result( - TResult success, - TIOError io) + public isTableAvailableWithSplit_args( + TTableName tableName, + List splitKeys) { this(); - this.success = success; - this.io = io; + this.tableName = tableName; + this.splitKeys = splitKeys; } /** * Performs a deep copy on other. */ - public increment_result(increment_result other) { - if (other.isSetSuccess()) { - this.success = new TResult(other.success); + public isTableAvailableWithSplit_args(isTableAvailableWithSplit_args other) { + if (other.isSetTableName()) { + this.tableName = new TTableName(other.tableName); } - if (other.isSetIo()) { - this.io = new TIOError(other.io); + if (other.isSetSplitKeys()) { + List __this__splitKeys = new ArrayList(other.splitKeys); + this.splitKeys = __this__splitKeys; } } - public increment_result deepCopy() { - return new increment_result(this); + public isTableAvailableWithSplit_args deepCopy() { + return new isTableAvailableWithSplit_args(this); } @Override public void clear() { - this.success = null; - this.io = null; + this.tableName = null; + this.splitKeys = null; } - public TResult getSuccess() { - return this.success; + public TTableName getTableName() { + return this.tableName; } - public increment_result setSuccess(TResult success) { - this.success = success; + public isTableAvailableWithSplit_args setTableName(TTableName tableName) { + this.tableName = tableName; return this; } - public void unsetSuccess() { - this.success = null; + public void unsetTableName() { + this.tableName = null; } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; } - public void setSuccessIsSet(boolean value) { + public void setTableNameIsSet(boolean value) { if (!value) { - this.success = null; + this.tableName = null; } } - public TIOError getIo() { - return this.io; + public int getSplitKeysSize() { + return (this.splitKeys == null) ? 0 : this.splitKeys.size(); } - public increment_result setIo(TIOError io) { - this.io = io; + public java.util.Iterator getSplitKeysIterator() { + return (this.splitKeys == null) ? null : this.splitKeys.iterator(); + } + + public void addToSplitKeys(ByteBuffer elem) { + if (this.splitKeys == null) { + this.splitKeys = new ArrayList(); + } + this.splitKeys.add(elem); + } + + public List getSplitKeys() { + return this.splitKeys; + } + + public isTableAvailableWithSplit_args setSplitKeys(List splitKeys) { + this.splitKeys = splitKeys; return this; } - public void unsetIo() { - this.io = null; + public void unsetSplitKeys() { + this.splitKeys = null; } - /** Returns true if field io is set (has been assigned a value) and false otherwise */ - public boolean isSetIo() { - return this.io != null; + /** Returns true if field splitKeys is set (has been assigned a value) and false otherwise */ + public boolean isSetSplitKeys() { + return this.splitKeys != null; } - public void setIoIsSet(boolean value) { + public void setSplitKeysIsSet(boolean value) { if (!value) { - this.io = null; + this.splitKeys = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case TABLE_NAME: if (value == null) { - unsetSuccess(); + unsetTableName(); } else { - setSuccess((TResult)value); + setTableName((TTableName)value); } break; - case IO: + case SPLIT_KEYS: if (value == null) { - unsetIo(); + unsetSplitKeys(); } else { - setIo((TIOError)value); + setSplitKeys((List)value); } break; @@ -14734,11 +43960,11 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case TABLE_NAME: + return getTableName(); - case IO: - return getIo(); + case SPLIT_KEYS: + return getSplitKeys(); } throw new IllegalStateException(); @@ -14751,10 +43977,10 @@ public class THBaseService { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case IO: - return isSetIo(); + case TABLE_NAME: + return isSetTableName(); + case SPLIT_KEYS: + return isSetSplitKeys(); } throw new IllegalStateException(); } @@ -14763,30 +43989,30 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof increment_result) - return this.equals((increment_result)that); + if (that instanceof isTableAvailableWithSplit_args) + return this.equals((isTableAvailableWithSplit_args)that); return false; } - public boolean equals(increment_result that) { + public boolean equals(isTableAvailableWithSplit_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) return false; - if (!this.success.equals(that.success)) + if (!this.tableName.equals(that.tableName)) return false; } - boolean this_present_io = true && this.isSetIo(); - boolean that_present_io = true && that.isSetIo(); - if (this_present_io || that_present_io) { - if (!(this_present_io && that_present_io)) + boolean this_present_splitKeys = true && this.isSetSplitKeys(); + boolean that_present_splitKeys = true && that.isSetSplitKeys(); + if (this_present_splitKeys || that_present_splitKeys) { + if (!(this_present_splitKeys && that_present_splitKeys)) return false; - if (!this.io.equals(that.io)) + if (!this.splitKeys.equals(that.splitKeys)) return false; } @@ -14797,43 +44023,43 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); - boolean present_io = true && (isSetIo()); - list.add(present_io); - if (present_io) - list.add(io); + boolean present_splitKeys = true && (isSetSplitKeys()); + list.add(present_splitKeys); + if (present_splitKeys) + list.add(splitKeys); return list.hashCode(); } @Override - public int compareTo(increment_result other) { + public int compareTo(isTableAvailableWithSplit_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + lastComparison = Boolean.valueOf(isSetSplitKeys()).compareTo(other.isSetSplitKeys()); if (lastComparison != 0) { return lastComparison; } - if (isSetIo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (isSetSplitKeys()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.splitKeys, other.splitKeys); if (lastComparison != 0) { return lastComparison; } @@ -14851,26 +44077,26 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("increment_result("); + StringBuilder sb = new StringBuilder("isTableAvailableWithSplit_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("tableName:"); + if (this.tableName == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.tableName); } first = false; if (!first) sb.append(", "); - sb.append("io:"); - if (this.io == null) { + sb.append("splitKeys:"); + if (this.splitKeys == null) { sb.append("null"); } else { - sb.append(this.io); + org.apache.thrift.TBaseHelper.toString(this.splitKeys, sb); } first = false; sb.append(")"); @@ -14879,9 +44105,15 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields + if (tableName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString()); + } + if (splitKeys == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'splitKeys' was not present! Struct: " + toString()); + } // check for sub-struct validity - if (success != null) { - success.validate(); + if (tableName != null) { + tableName.validate(); } } @@ -14901,15 +44133,15 @@ public class THBaseService { } } - private static class increment_resultStandardSchemeFactory implements SchemeFactory { - public increment_resultStandardScheme getScheme() { - return new increment_resultStandardScheme(); + private static class isTableAvailableWithSplit_argsStandardSchemeFactory implements SchemeFactory { + public isTableAvailableWithSplit_argsStandardScheme getScheme() { + return new isTableAvailableWithSplit_argsStandardScheme(); } } - private static class increment_resultStandardScheme extends StandardScheme { + private static class isTableAvailableWithSplit_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, increment_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, isTableAvailableWithSplit_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -14919,20 +44151,29 @@ public class THBaseService { break; } switch (schemeField.id) { - case 0: // SUCCESS + case 1: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // IO - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); + case 2: // SPLIT_KEYS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list350 = iprot.readListBegin(); + struct.splitKeys = new ArrayList(_list350.size); + ByteBuffer _elem351; + for (int _i352 = 0; _i352 < _list350.size; ++_i352) + { + _elem351 = iprot.readBinary(); + struct.splitKeys.add(_elem351); + } + iprot.readListEnd(); + } + struct.setSplitKeysIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -14948,18 +44189,25 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, increment_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, isTableAvailableWithSplit_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + struct.tableName.write(oprot); oprot.writeFieldEnd(); } - if (struct.io != null) { - oprot.writeFieldBegin(IO_FIELD_DESC); - struct.io.write(oprot); + if (struct.splitKeys != null) { + oprot.writeFieldBegin(SPLIT_KEYS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.splitKeys.size())); + for (ByteBuffer _iter353 : struct.splitKeys) + { + oprot.writeBinary(_iter353); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -14968,83 +44216,68 @@ public class THBaseService { } - private static class increment_resultTupleSchemeFactory implements SchemeFactory { - public increment_resultTupleScheme getScheme() { - return new increment_resultTupleScheme(); + private static class isTableAvailableWithSplit_argsTupleSchemeFactory implements SchemeFactory { + public isTableAvailableWithSplit_argsTupleScheme getScheme() { + return new isTableAvailableWithSplit_argsTupleScheme(); } } - private static class increment_resultTupleScheme extends TupleScheme { + private static class isTableAvailableWithSplit_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, increment_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, isTableAvailableWithSplit_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetIo()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetIo()) { - struct.io.write(oprot); + struct.tableName.write(oprot); + { + oprot.writeI32(struct.splitKeys.size()); + for (ByteBuffer _iter354 : struct.splitKeys) + { + oprot.writeBinary(_iter354); + } } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, increment_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, isTableAvailableWithSplit_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new TResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); + { + org.apache.thrift.protocol.TList _list355 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.splitKeys = new ArrayList(_list355.size); + ByteBuffer _elem356; + for (int _i357 = 0; _i357 < _list355.size; ++_i357) + { + _elem356 = iprot.readBinary(); + struct.splitKeys.add(_elem356); + } } + struct.setSplitKeysIsSet(true); } } } - public static class append_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_args"); + public static class isTableAvailableWithSplit_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTableAvailableWithSplit_result"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TAPPEND_FIELD_DESC = new org.apache.thrift.protocol.TField("tappend", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new append_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new append_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new isTableAvailableWithSplit_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isTableAvailableWithSplit_resultTupleSchemeFactory()); } - /** - * the table to append the value on - */ - public ByteBuffer table; // required - /** - * the TAppend to append - */ - public TAppend tappend; // required + public boolean success; // required + public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the table to append the value on - */ - TABLE((short)1, "table"), - /** - * the TAppend to append - */ - TAPPEND((short)2, "tappend"); + SUCCESS((short)0, "success"), + IO((short)1, "io"); private static final Map byName = new HashMap(); @@ -15059,10 +44292,10 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // TAPPEND - return TAPPEND; + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; default: return null; } @@ -15103,136 +44336,116 @@ public class THBaseService { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TAPPEND, new org.apache.thrift.meta_data.FieldMetaData("tappend", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAppend.class))); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isTableAvailableWithSplit_result.class, metaDataMap); } - public append_args() { + public isTableAvailableWithSplit_result() { } - public append_args( - ByteBuffer table, - TAppend tappend) + public isTableAvailableWithSplit_result( + boolean success, + TIOError io) { this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.tappend = tappend; + this.success = success; + setSuccessIsSet(true); + this.io = io; } /** * Performs a deep copy on other. */ - public append_args(append_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetTappend()) { - this.tappend = new TAppend(other.tappend); + public isTableAvailableWithSplit_result(isTableAvailableWithSplit_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetIo()) { + this.io = new TIOError(other.io); } } - public append_args deepCopy() { - return new append_args(this); + public isTableAvailableWithSplit_result deepCopy() { + return new isTableAvailableWithSplit_result(this); } @Override public void clear() { - this.table = null; - this.tappend = null; - } - - /** - * the table to append the value on - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); + setSuccessIsSet(false); + this.success = false; + this.io = null; } - /** - * the table to append the value on - */ - public append_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; + public boolean isSuccess() { + return this.success; } - public append_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + public isTableAvailableWithSplit_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); return this; } - public void unsetTable() { - this.table = null; + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } - /** - * the TAppend to append - */ - public TAppend getTappend() { - return this.tappend; + public TIOError getIo() { + return this.io; } - /** - * the TAppend to append - */ - public append_args setTappend(TAppend tappend) { - this.tappend = tappend; + public isTableAvailableWithSplit_result setIo(TIOError io) { + this.io = io; return this; } - public void unsetTappend() { - this.tappend = null; + public void unsetIo() { + this.io = null; } - /** Returns true if field tappend is set (has been assigned a value) and false otherwise */ - public boolean isSetTappend() { - return this.tappend != null; + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; } - public void setTappendIsSet(boolean value) { + public void setIoIsSet(boolean value) { if (!value) { - this.tappend = null; + this.io = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: + case SUCCESS: if (value == null) { - unsetTable(); + unsetSuccess(); } else { - setTable((ByteBuffer)value); + setSuccess((Boolean)value); } break; - case TAPPEND: + case IO: if (value == null) { - unsetTappend(); + unsetIo(); } else { - setTappend((TAppend)value); + setIo((TIOError)value); } break; @@ -15241,11 +44454,11 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); + case SUCCESS: + return isSuccess(); - case TAPPEND: - return getTappend(); + case IO: + return getIo(); } throw new IllegalStateException(); @@ -15258,10 +44471,10 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case TAPPEND: - return isSetTappend(); + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); } throw new IllegalStateException(); } @@ -15270,30 +44483,30 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof append_args) - return this.equals((append_args)that); + if (that instanceof isTableAvailableWithSplit_result) + return this.equals((isTableAvailableWithSplit_result)that); return false; } - public boolean equals(append_args that) { + public boolean equals(isTableAvailableWithSplit_result that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.table.equals(that.table)) + if (this.success != that.success) return false; } - boolean this_present_tappend = true && this.isSetTappend(); - boolean that_present_tappend = true && that.isSetTappend(); - if (this_present_tappend || that_present_tappend) { - if (!(this_present_tappend && that_present_tappend)) + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) return false; - if (!this.tappend.equals(that.tappend)) + if (!this.io.equals(that.io)) return false; } @@ -15304,43 +44517,43 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); - boolean present_tappend = true && (isSetTappend()); - list.add(present_tappend); - if (present_tappend) - list.add(tappend); + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); return list.hashCode(); } @Override - public int compareTo(append_args other) { + public int compareTo(isTableAvailableWithSplit_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTappend()).compareTo(other.isSetTappend()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); if (lastComparison != 0) { return lastComparison; } - if (isSetTappend()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tappend, other.tappend); + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); if (lastComparison != 0) { return lastComparison; } @@ -15358,26 +44571,22 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("append_args("); + StringBuilder sb = new StringBuilder("isTableAvailableWithSplit_result("); boolean first = true; - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("tappend:"); - if (this.tappend == null) { + sb.append("io:"); + if (this.io == null) { sb.append("null"); } else { - sb.append(this.tappend); + sb.append(this.io); } first = false; sb.append(")"); @@ -15386,16 +44595,7 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (tappend == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tappend' was not present! Struct: " + toString()); - } // check for sub-struct validity - if (tappend != null) { - tappend.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -15408,21 +44608,23 @@ public class THBaseService { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class append_argsStandardSchemeFactory implements SchemeFactory { - public append_argsStandardScheme getScheme() { - return new append_argsStandardScheme(); + private static class isTableAvailableWithSplit_resultStandardSchemeFactory implements SchemeFactory { + public isTableAvailableWithSplit_resultStandardScheme getScheme() { + return new isTableAvailableWithSplit_resultStandardScheme(); } } - private static class append_argsStandardScheme extends StandardScheme { + private static class isTableAvailableWithSplit_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, append_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, isTableAvailableWithSplit_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -15432,19 +44634,19 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // TAPPEND + case 1: // IO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tappend = new TAppend(); - struct.tappend.read(iprot); - struct.setTappendIsSet(true); + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -15460,18 +44662,18 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, append_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, isTableAvailableWithSplit_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); oprot.writeFieldEnd(); } - if (struct.tappend != null) { - oprot.writeFieldBegin(TAPPEND_FIELD_DESC); - struct.tappend.write(oprot); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -15480,53 +44682,70 @@ public class THBaseService { } - private static class append_argsTupleSchemeFactory implements SchemeFactory { - public append_argsTupleScheme getScheme() { - return new append_argsTupleScheme(); + private static class isTableAvailableWithSplit_resultTupleSchemeFactory implements SchemeFactory { + public isTableAvailableWithSplit_resultTupleScheme getScheme() { + return new isTableAvailableWithSplit_resultTupleScheme(); } } - private static class append_argsTupleScheme extends TupleScheme { + private static class isTableAvailableWithSplit_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, append_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, isTableAvailableWithSplit_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - struct.tappend.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, append_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, isTableAvailableWithSplit_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - struct.tappend = new TAppend(); - struct.tappend.read(iprot); - struct.setTappendIsSet(true); + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } } } } - public static class append_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_result"); + public static class addColumnFamily_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addColumnFamily_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new append_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new append_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new addColumnFamily_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new addColumnFamily_argsTupleSchemeFactory()); } - public TResult success; // required - public TIOError io; // required + public TTableName tableName; // required + public TColumnFamilyDescriptor column; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - IO((short)1, "io"); + TABLE_NAME((short)1, "tableName"), + COLUMN((short)2, "column"); private static final Map byName = new HashMap(); @@ -15541,10 +44760,10 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // IO - return IO; + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // COLUMN + return COLUMN; default: return null; } @@ -15588,111 +44807,111 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class))); - tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); + tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumnFamilyDescriptor.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addColumnFamily_args.class, metaDataMap); } - public append_result() { + public addColumnFamily_args() { } - public append_result( - TResult success, - TIOError io) + public addColumnFamily_args( + TTableName tableName, + TColumnFamilyDescriptor column) { this(); - this.success = success; - this.io = io; + this.tableName = tableName; + this.column = column; } /** * Performs a deep copy on other. */ - public append_result(append_result other) { - if (other.isSetSuccess()) { - this.success = new TResult(other.success); + public addColumnFamily_args(addColumnFamily_args other) { + if (other.isSetTableName()) { + this.tableName = new TTableName(other.tableName); } - if (other.isSetIo()) { - this.io = new TIOError(other.io); + if (other.isSetColumn()) { + this.column = new TColumnFamilyDescriptor(other.column); } } - public append_result deepCopy() { - return new append_result(this); + public addColumnFamily_args deepCopy() { + return new addColumnFamily_args(this); } @Override public void clear() { - this.success = null; - this.io = null; + this.tableName = null; + this.column = null; } - public TResult getSuccess() { - return this.success; + public TTableName getTableName() { + return this.tableName; } - public append_result setSuccess(TResult success) { - this.success = success; + public addColumnFamily_args setTableName(TTableName tableName) { + this.tableName = tableName; return this; } - public void unsetSuccess() { - this.success = null; + public void unsetTableName() { + this.tableName = null; } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; } - public void setSuccessIsSet(boolean value) { + public void setTableNameIsSet(boolean value) { if (!value) { - this.success = null; + this.tableName = null; } } - public TIOError getIo() { - return this.io; + public TColumnFamilyDescriptor getColumn() { + return this.column; } - public append_result setIo(TIOError io) { - this.io = io; + public addColumnFamily_args setColumn(TColumnFamilyDescriptor column) { + this.column = column; return this; } - public void unsetIo() { - this.io = null; + public void unsetColumn() { + this.column = null; } - /** Returns true if field io is set (has been assigned a value) and false otherwise */ - public boolean isSetIo() { - return this.io != null; + /** Returns true if field column is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn() { + return this.column != null; } - public void setIoIsSet(boolean value) { + public void setColumnIsSet(boolean value) { if (!value) { - this.io = null; + this.column = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case TABLE_NAME: if (value == null) { - unsetSuccess(); + unsetTableName(); } else { - setSuccess((TResult)value); + setTableName((TTableName)value); } break; - case IO: + case COLUMN: if (value == null) { - unsetIo(); + unsetColumn(); } else { - setIo((TIOError)value); + setColumn((TColumnFamilyDescriptor)value); } break; @@ -15701,11 +44920,11 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case TABLE_NAME: + return getTableName(); - case IO: - return getIo(); + case COLUMN: + return getColumn(); } throw new IllegalStateException(); @@ -15718,10 +44937,10 @@ public class THBaseService { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case IO: - return isSetIo(); + case TABLE_NAME: + return isSetTableName(); + case COLUMN: + return isSetColumn(); } throw new IllegalStateException(); } @@ -15730,30 +44949,30 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof append_result) - return this.equals((append_result)that); + if (that instanceof addColumnFamily_args) + return this.equals((addColumnFamily_args)that); return false; } - public boolean equals(append_result that) { + public boolean equals(addColumnFamily_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) return false; - if (!this.success.equals(that.success)) + if (!this.tableName.equals(that.tableName)) return false; } - boolean this_present_io = true && this.isSetIo(); - boolean that_present_io = true && that.isSetIo(); - if (this_present_io || that_present_io) { - if (!(this_present_io && that_present_io)) + boolean this_present_column = true && this.isSetColumn(); + boolean that_present_column = true && that.isSetColumn(); + if (this_present_column || that_present_column) { + if (!(this_present_column && that_present_column)) return false; - if (!this.io.equals(that.io)) + if (!this.column.equals(that.column)) return false; } @@ -15764,43 +44983,43 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); - boolean present_io = true && (isSetIo()); - list.add(present_io); - if (present_io) - list.add(io); + boolean present_column = true && (isSetColumn()); + list.add(present_column); + if (present_column) + list.add(column); return list.hashCode(); } @Override - public int compareTo(append_result other) { + public int compareTo(addColumnFamily_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(other.isSetColumn()); if (lastComparison != 0) { return lastComparison; } - if (isSetIo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (isSetColumn()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, other.column); if (lastComparison != 0) { return lastComparison; } @@ -15818,26 +45037,26 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("append_result("); + StringBuilder sb = new StringBuilder("addColumnFamily_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("tableName:"); + if (this.tableName == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.tableName); } first = false; if (!first) sb.append(", "); - sb.append("io:"); - if (this.io == null) { + sb.append("column:"); + if (this.column == null) { sb.append("null"); } else { - sb.append(this.io); + sb.append(this.column); } first = false; sb.append(")"); @@ -15846,9 +45065,18 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields + if (tableName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString()); + } + if (column == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'column' was not present! Struct: " + toString()); + } // check for sub-struct validity - if (success != null) { - success.validate(); + if (tableName != null) { + tableName.validate(); + } + if (column != null) { + column.validate(); } } @@ -15868,15 +45096,15 @@ public class THBaseService { } } - private static class append_resultStandardSchemeFactory implements SchemeFactory { - public append_resultStandardScheme getScheme() { - return new append_resultStandardScheme(); + private static class addColumnFamily_argsStandardSchemeFactory implements SchemeFactory { + public addColumnFamily_argsStandardScheme getScheme() { + return new addColumnFamily_argsStandardScheme(); } } - private static class append_resultStandardScheme extends StandardScheme { + private static class addColumnFamily_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, append_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, addColumnFamily_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -15886,20 +45114,20 @@ public class THBaseService { break; } switch (schemeField.id) { - case 0: // SUCCESS + case 1: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // IO + case 2: // COLUMN if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); + struct.column = new TColumnFamilyDescriptor(); + struct.column.read(iprot); + struct.setColumnIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -15915,18 +45143,18 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, append_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, addColumnFamily_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + struct.tableName.write(oprot); oprot.writeFieldEnd(); } - if (struct.io != null) { - oprot.writeFieldBegin(IO_FIELD_DESC); - struct.io.write(oprot); + if (struct.column != null) { + oprot.writeFieldBegin(COLUMN_FIELD_DESC); + struct.column.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -15935,83 +45163,51 @@ public class THBaseService { } - private static class append_resultTupleSchemeFactory implements SchemeFactory { - public append_resultTupleScheme getScheme() { - return new append_resultTupleScheme(); + private static class addColumnFamily_argsTupleSchemeFactory implements SchemeFactory { + public addColumnFamily_argsTupleScheme getScheme() { + return new addColumnFamily_argsTupleScheme(); } } - private static class append_resultTupleScheme extends TupleScheme { + private static class addColumnFamily_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, append_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, addColumnFamily_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetIo()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetIo()) { - struct.io.write(oprot); - } + struct.tableName.write(oprot); + struct.column.write(oprot); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, append_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, addColumnFamily_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new TResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); - } + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); + struct.column = new TColumnFamilyDescriptor(); + struct.column.read(iprot); + struct.setColumnIsSet(true); } } } - public static class openScanner_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openScanner_args"); + public static class addColumnFamily_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addColumnFamily_result"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TSCAN_FIELD_DESC = new org.apache.thrift.protocol.TField("tscan", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new openScanner_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new openScanner_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new addColumnFamily_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new addColumnFamily_resultTupleSchemeFactory()); } - /** - * the table to get the Scanner for - */ - public ByteBuffer table; // required - /** - * the scan object to get a Scanner for - */ - public TScan tscan; // required + public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the table to get the Scanner for - */ - TABLE((short)1, "table"), - /** - * the scan object to get a Scanner for - */ - TSCAN((short)2, "tscan"); + IO((short)1, "io"); private static final Map byName = new HashMap(); @@ -16026,10 +45222,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // TSCAN - return TSCAN; + case 1: // IO + return IO; default: return null; } @@ -16073,133 +45267,71 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TSCAN, new org.apache.thrift.meta_data.FieldMetaData("tscan", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TScan.class))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openScanner_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addColumnFamily_result.class, metaDataMap); } - public openScanner_args() { + public addColumnFamily_result() { } - public openScanner_args( - ByteBuffer table, - TScan tscan) + public addColumnFamily_result( + TIOError io) { this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.tscan = tscan; + this.io = io; } /** * Performs a deep copy on other. */ - public openScanner_args(openScanner_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetTscan()) { - this.tscan = new TScan(other.tscan); + public addColumnFamily_result(addColumnFamily_result other) { + if (other.isSetIo()) { + this.io = new TIOError(other.io); } } - public openScanner_args deepCopy() { - return new openScanner_args(this); + public addColumnFamily_result deepCopy() { + return new addColumnFamily_result(this); } @Override public void clear() { - this.table = null; - this.tscan = null; - } - - /** - * the table to get the Scanner for - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); - } - - /** - * the table to get the Scanner for - */ - public openScanner_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; - } - - public openScanner_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; - } - - public void unsetTable() { - this.table = null; - } - - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; - } - - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } + this.io = null; } - /** - * the scan object to get a Scanner for - */ - public TScan getTscan() { - return this.tscan; + public TIOError getIo() { + return this.io; } - /** - * the scan object to get a Scanner for - */ - public openScanner_args setTscan(TScan tscan) { - this.tscan = tscan; + public addColumnFamily_result setIo(TIOError io) { + this.io = io; return this; } - public void unsetTscan() { - this.tscan = null; + public void unsetIo() { + this.io = null; } - /** Returns true if field tscan is set (has been assigned a value) and false otherwise */ - public boolean isSetTscan() { - return this.tscan != null; + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; } - public void setTscanIsSet(boolean value) { + public void setIoIsSet(boolean value) { if (!value) { - this.tscan = null; + this.io = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; - - case TSCAN: + case IO: if (value == null) { - unsetTscan(); + unsetIo(); } else { - setTscan((TScan)value); + setIo((TIOError)value); } break; @@ -16208,11 +45340,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); - - case TSCAN: - return getTscan(); + case IO: + return getIo(); } throw new IllegalStateException(); @@ -16225,10 +45354,8 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case TSCAN: - return isSetTscan(); + case IO: + return isSetIo(); } throw new IllegalStateException(); } @@ -16237,30 +45364,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof openScanner_args) - return this.equals((openScanner_args)that); + if (that instanceof addColumnFamily_result) + return this.equals((addColumnFamily_result)that); return false; } - public boolean equals(openScanner_args that) { + public boolean equals(addColumnFamily_result that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; - } - - boolean this_present_tscan = true && this.isSetTscan(); - boolean that_present_tscan = true && that.isSetTscan(); - if (this_present_tscan || that_present_tscan) { - if (!(this_present_tscan && that_present_tscan)) + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) return false; - if (!this.tscan.equals(that.tscan)) + if (!this.io.equals(that.io)) return false; } @@ -16271,43 +45389,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - boolean present_tscan = true && (isSetTscan()); - list.add(present_tscan); - if (present_tscan) - list.add(tscan); + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); return list.hashCode(); } @Override - public int compareTo(openScanner_args other) { + public int compareTo(addColumnFamily_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTscan()).compareTo(other.isSetTscan()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); if (lastComparison != 0) { return lastComparison; } - if (isSetTscan()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tscan, other.tscan); + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); if (lastComparison != 0) { return lastComparison; } @@ -16325,26 +45428,18 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("openScanner_args("); + StringBuilder sb = new StringBuilder("addColumnFamily_result("); boolean first = true; - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("tscan:"); - if (this.tscan == null) { + sb.append("io:"); + if (this.io == null) { sb.append("null"); } else { - sb.append(this.tscan); + sb.append(this.io); } first = false; sb.append(")"); @@ -16353,16 +45448,7 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (tscan == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tscan' was not present! Struct: " + toString()); - } // check for sub-struct validity - if (tscan != null) { - tscan.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -16381,15 +45467,15 @@ public class THBaseService { } } - private static class openScanner_argsStandardSchemeFactory implements SchemeFactory { - public openScanner_argsStandardScheme getScheme() { - return new openScanner_argsStandardScheme(); + private static class addColumnFamily_resultStandardSchemeFactory implements SchemeFactory { + public addColumnFamily_resultStandardScheme getScheme() { + return new addColumnFamily_resultStandardScheme(); } } - private static class openScanner_argsStandardScheme extends StandardScheme { + private static class addColumnFamily_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, openScanner_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, addColumnFamily_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -16399,19 +45485,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TSCAN + case 1: // IO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tscan = new TScan(); - struct.tscan.read(iprot); - struct.setTscanIsSet(true); + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -16427,18 +45505,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, openScanner_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, addColumnFamily_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.tscan != null) { - oprot.writeFieldBegin(TSCAN_FIELD_DESC); - struct.tscan.write(oprot); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -16447,53 +45520,60 @@ public class THBaseService { } - private static class openScanner_argsTupleSchemeFactory implements SchemeFactory { - public openScanner_argsTupleScheme getScheme() { - return new openScanner_argsTupleScheme(); + private static class addColumnFamily_resultTupleSchemeFactory implements SchemeFactory { + public addColumnFamily_resultTupleScheme getScheme() { + return new addColumnFamily_resultTupleScheme(); } } - private static class openScanner_argsTupleScheme extends TupleScheme { + private static class addColumnFamily_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, openScanner_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, addColumnFamily_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - struct.tscan.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, openScanner_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, addColumnFamily_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - struct.tscan = new TScan(); - struct.tscan.read(iprot); - struct.setTscanIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } } } } - public static class openScanner_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("openScanner_result"); + public static class deleteColumnFamily_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteColumnFamily_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); - private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new openScanner_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new openScanner_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new deleteColumnFamily_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteColumnFamily_argsTupleSchemeFactory()); } - public int success; // required - public TIOError io; // required + public TTableName tableName; // required + public ByteBuffer column; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - IO((short)1, "io"); + TABLE_NAME((short)1, "tableName"), + COLUMN((short)2, "column"); private static final Map byName = new HashMap(); @@ -16508,10 +45588,10 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // IO - return IO; + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // COLUMN + return COLUMN; default: return null; } @@ -16552,116 +45632,124 @@ public class THBaseService { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); + tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(openScanner_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteColumnFamily_args.class, metaDataMap); } - public openScanner_result() { + public deleteColumnFamily_args() { } - public openScanner_result( - int success, - TIOError io) + public deleteColumnFamily_args( + TTableName tableName, + ByteBuffer column) { this(); - this.success = success; - setSuccessIsSet(true); - this.io = io; + this.tableName = tableName; + this.column = org.apache.thrift.TBaseHelper.copyBinary(column); } /** * Performs a deep copy on other. */ - public openScanner_result(openScanner_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetIo()) { - this.io = new TIOError(other.io); + public deleteColumnFamily_args(deleteColumnFamily_args other) { + if (other.isSetTableName()) { + this.tableName = new TTableName(other.tableName); + } + if (other.isSetColumn()) { + this.column = org.apache.thrift.TBaseHelper.copyBinary(other.column); } } - public openScanner_result deepCopy() { - return new openScanner_result(this); + public deleteColumnFamily_args deepCopy() { + return new deleteColumnFamily_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = 0; - this.io = null; + this.tableName = null; + this.column = null; } - public int getSuccess() { - return this.success; + public TTableName getTableName() { + return this.tableName; } - public openScanner_result setSuccess(int success) { - this.success = success; - setSuccessIsSet(true); + public deleteColumnFamily_args setTableName(TTableName tableName) { + this.tableName = tableName; return this; } - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + public void unsetTableName() { + this.tableName = null; } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; } - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } } - public TIOError getIo() { - return this.io; + public byte[] getColumn() { + setColumn(org.apache.thrift.TBaseHelper.rightSize(column)); + return column == null ? null : column.array(); } - public openScanner_result setIo(TIOError io) { - this.io = io; + public ByteBuffer bufferForColumn() { + return org.apache.thrift.TBaseHelper.copyBinary(column); + } + + public deleteColumnFamily_args setColumn(byte[] column) { + this.column = column == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(column, column.length)); return this; } - public void unsetIo() { - this.io = null; + public deleteColumnFamily_args setColumn(ByteBuffer column) { + this.column = org.apache.thrift.TBaseHelper.copyBinary(column); + return this; } - /** Returns true if field io is set (has been assigned a value) and false otherwise */ - public boolean isSetIo() { - return this.io != null; + public void unsetColumn() { + this.column = null; } - public void setIoIsSet(boolean value) { + /** Returns true if field column is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { if (!value) { - this.io = null; + this.column = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case TABLE_NAME: if (value == null) { - unsetSuccess(); + unsetTableName(); } else { - setSuccess((Integer)value); + setTableName((TTableName)value); } break; - case IO: + case COLUMN: if (value == null) { - unsetIo(); + unsetColumn(); } else { - setIo((TIOError)value); + setColumn((ByteBuffer)value); } break; @@ -16670,11 +45758,11 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case TABLE_NAME: + return getTableName(); - case IO: - return getIo(); + case COLUMN: + return getColumn(); } throw new IllegalStateException(); @@ -16687,10 +45775,10 @@ public class THBaseService { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case IO: - return isSetIo(); + case TABLE_NAME: + return isSetTableName(); + case COLUMN: + return isSetColumn(); } throw new IllegalStateException(); } @@ -16699,30 +45787,30 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof openScanner_result) - return this.equals((openScanner_result)that); + if (that instanceof deleteColumnFamily_args) + return this.equals((deleteColumnFamily_args)that); return false; } - public boolean equals(openScanner_result that) { + public boolean equals(deleteColumnFamily_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) return false; - if (this.success != that.success) + if (!this.tableName.equals(that.tableName)) return false; } - boolean this_present_io = true && this.isSetIo(); - boolean that_present_io = true && that.isSetIo(); - if (this_present_io || that_present_io) { - if (!(this_present_io && that_present_io)) + boolean this_present_column = true && this.isSetColumn(); + boolean that_present_column = true && that.isSetColumn(); + if (this_present_column || that_present_column) { + if (!(this_present_column && that_present_column)) return false; - if (!this.io.equals(that.io)) + if (!this.column.equals(that.column)) return false; } @@ -16733,43 +45821,43 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); - boolean present_io = true && (isSetIo()); - list.add(present_io); - if (present_io) - list.add(io); + boolean present_column = true && (isSetColumn()); + list.add(present_column); + if (present_column) + list.add(column); return list.hashCode(); } @Override - public int compareTo(openScanner_result other) { + public int compareTo(deleteColumnFamily_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(other.isSetColumn()); if (lastComparison != 0) { return lastComparison; } - if (isSetIo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (isSetColumn()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, other.column); if (lastComparison != 0) { return lastComparison; } @@ -16787,22 +45875,26 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("openScanner_result("); + StringBuilder sb = new StringBuilder("deleteColumnFamily_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } first = false; if (!first) sb.append(", "); - sb.append("io:"); - if (this.io == null) { + sb.append("column:"); + if (this.column == null) { sb.append("null"); } else { - sb.append(this.io); + org.apache.thrift.TBaseHelper.toString(this.column, sb); } first = false; sb.append(")"); @@ -16811,7 +45903,16 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields + if (tableName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString()); + } + if (column == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'column' was not present! Struct: " + toString()); + } // check for sub-struct validity + if (tableName != null) { + tableName.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -16824,23 +45925,21 @@ public class THBaseService { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class openScanner_resultStandardSchemeFactory implements SchemeFactory { - public openScanner_resultStandardScheme getScheme() { - return new openScanner_resultStandardScheme(); + private static class deleteColumnFamily_argsStandardSchemeFactory implements SchemeFactory { + public deleteColumnFamily_argsStandardScheme getScheme() { + return new deleteColumnFamily_argsStandardScheme(); } } - private static class openScanner_resultStandardScheme extends StandardScheme { + private static class deleteColumnFamily_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, openScanner_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteColumnFamily_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -16850,19 +45949,19 @@ public class THBaseService { break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.success = iprot.readI32(); - struct.setSuccessIsSet(true); + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 1: // IO - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); + case 2: // COLUMN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -16878,18 +45977,18 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, openScanner_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteColumnFamily_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI32(struct.success); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + struct.tableName.write(oprot); oprot.writeFieldEnd(); } - if (struct.io != null) { - oprot.writeFieldBegin(IO_FIELD_DESC); - struct.io.write(oprot); + if (struct.column != null) { + oprot.writeFieldBegin(COLUMN_FIELD_DESC); + oprot.writeBinary(struct.column); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -16898,82 +45997,50 @@ public class THBaseService { } - private static class openScanner_resultTupleSchemeFactory implements SchemeFactory { - public openScanner_resultTupleScheme getScheme() { - return new openScanner_resultTupleScheme(); + private static class deleteColumnFamily_argsTupleSchemeFactory implements SchemeFactory { + public deleteColumnFamily_argsTupleScheme getScheme() { + return new deleteColumnFamily_argsTupleScheme(); } } - private static class openScanner_resultTupleScheme extends TupleScheme { + private static class deleteColumnFamily_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, openScanner_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, deleteColumnFamily_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetIo()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - oprot.writeI32(struct.success); - } - if (struct.isSetIo()) { - struct.io.write(oprot); - } + struct.tableName.write(oprot); + oprot.writeBinary(struct.column); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, openScanner_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, deleteColumnFamily_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = iprot.readI32(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); - } + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); } } } - public static class getScannerRows_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScannerRows_args"); + public static class deleteColumnFamily_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteColumnFamily_result"); - private static final org.apache.thrift.protocol.TField SCANNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scannerId", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField NUM_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("numRows", org.apache.thrift.protocol.TType.I32, (short)2); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getScannerRows_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getScannerRows_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new deleteColumnFamily_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteColumnFamily_resultTupleSchemeFactory()); } - /** - * the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. - */ - public int scannerId; // required - /** - * number of rows to return - */ - public int numRows; // required + public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. - */ - SCANNER_ID((short)1, "scannerId"), - /** - * number of rows to return - */ - NUM_ROWS((short)2, "numRows"); + IO((short)1, "io"); private static final Map byName = new HashMap(); @@ -16988,10 +46055,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // SCANNER_ID - return SCANNER_ID; - case 2: // NUM_ROWS - return NUM_ROWS; + case 1: // IO + return IO; default: return null; } @@ -17032,130 +46097,74 @@ public class THBaseService { } // isset id assignments - private static final int __SCANNERID_ISSET_ID = 0; - private static final int __NUMROWS_ISSET_ID = 1; - private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SCANNER_ID, new org.apache.thrift.meta_data.FieldMetaData("scannerId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.NUM_ROWS, new org.apache.thrift.meta_data.FieldMetaData("numRows", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScannerRows_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteColumnFamily_result.class, metaDataMap); } - public getScannerRows_args() { - this.numRows = 1; - + public deleteColumnFamily_result() { } - public getScannerRows_args( - int scannerId, - int numRows) + public deleteColumnFamily_result( + TIOError io) { this(); - this.scannerId = scannerId; - setScannerIdIsSet(true); - this.numRows = numRows; - setNumRowsIsSet(true); + this.io = io; } /** * Performs a deep copy on other. */ - public getScannerRows_args(getScannerRows_args other) { - __isset_bitfield = other.__isset_bitfield; - this.scannerId = other.scannerId; - this.numRows = other.numRows; + public deleteColumnFamily_result(deleteColumnFamily_result other) { + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } } - public getScannerRows_args deepCopy() { - return new getScannerRows_args(this); + public deleteColumnFamily_result deepCopy() { + return new deleteColumnFamily_result(this); } @Override public void clear() { - setScannerIdIsSet(false); - this.scannerId = 0; - this.numRows = 1; - - } - - /** - * the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. - */ - public int getScannerId() { - return this.scannerId; - } - - /** - * the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. - */ - public getScannerRows_args setScannerId(int scannerId) { - this.scannerId = scannerId; - setScannerIdIsSet(true); - return this; - } - - public void unsetScannerId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCANNERID_ISSET_ID); - } - - /** Returns true if field scannerId is set (has been assigned a value) and false otherwise */ - public boolean isSetScannerId() { - return EncodingUtils.testBit(__isset_bitfield, __SCANNERID_ISSET_ID); - } - - public void setScannerIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCANNERID_ISSET_ID, value); + this.io = null; } - /** - * number of rows to return - */ - public int getNumRows() { - return this.numRows; + public TIOError getIo() { + return this.io; } - /** - * number of rows to return - */ - public getScannerRows_args setNumRows(int numRows) { - this.numRows = numRows; - setNumRowsIsSet(true); + public deleteColumnFamily_result setIo(TIOError io) { + this.io = io; return this; } - public void unsetNumRows() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMROWS_ISSET_ID); + public void unsetIo() { + this.io = null; } - /** Returns true if field numRows is set (has been assigned a value) and false otherwise */ - public boolean isSetNumRows() { - return EncodingUtils.testBit(__isset_bitfield, __NUMROWS_ISSET_ID); + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; } - public void setNumRowsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMROWS_ISSET_ID, value); + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SCANNER_ID: - if (value == null) { - unsetScannerId(); - } else { - setScannerId((Integer)value); - } - break; - - case NUM_ROWS: + case IO: if (value == null) { - unsetNumRows(); + unsetIo(); } else { - setNumRows((Integer)value); + setIo((TIOError)value); } break; @@ -17164,11 +46173,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case SCANNER_ID: - return getScannerId(); - - case NUM_ROWS: - return getNumRows(); + case IO: + return getIo(); } throw new IllegalStateException(); @@ -17181,10 +46187,8 @@ public class THBaseService { } switch (field) { - case SCANNER_ID: - return isSetScannerId(); - case NUM_ROWS: - return isSetNumRows(); + case IO: + return isSetIo(); } throw new IllegalStateException(); } @@ -17193,30 +46197,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getScannerRows_args) - return this.equals((getScannerRows_args)that); + if (that instanceof deleteColumnFamily_result) + return this.equals((deleteColumnFamily_result)that); return false; } - public boolean equals(getScannerRows_args that) { + public boolean equals(deleteColumnFamily_result that) { if (that == null) return false; - boolean this_present_scannerId = true; - boolean that_present_scannerId = true; - if (this_present_scannerId || that_present_scannerId) { - if (!(this_present_scannerId && that_present_scannerId)) - return false; - if (this.scannerId != that.scannerId) - return false; - } - - boolean this_present_numRows = true; - boolean that_present_numRows = true; - if (this_present_numRows || that_present_numRows) { - if (!(this_present_numRows && that_present_numRows)) + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) return false; - if (this.numRows != that.numRows) + if (!this.io.equals(that.io)) return false; } @@ -17227,43 +46222,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_scannerId = true; - list.add(present_scannerId); - if (present_scannerId) - list.add(scannerId); - - boolean present_numRows = true; - list.add(present_numRows); - if (present_numRows) - list.add(numRows); + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); return list.hashCode(); } @Override - public int compareTo(getScannerRows_args other) { + public int compareTo(deleteColumnFamily_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetScannerId()).compareTo(other.isSetScannerId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetScannerId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scannerId, other.scannerId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumRows()).compareTo(other.isSetNumRows()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); if (lastComparison != 0) { return lastComparison; } - if (isSetNumRows()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numRows, other.numRows); + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); if (lastComparison != 0) { return lastComparison; } @@ -17281,19 +46261,19 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getScannerRows_args("); + StringBuilder sb = new StringBuilder("deleteColumnFamily_result("); boolean first = true; - sb.append("scannerId:"); - sb.append(this.scannerId); - first = false; - if (!first) sb.append(", "); - sb.append("numRows:"); - sb.append(this.numRows); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } first = false; sb.append(")"); return sb.toString(); @@ -17301,7 +46281,6 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - // alas, we cannot check 'scannerId' because it's a primitive and you chose the non-beans generator. // check for sub-struct validity } @@ -17315,23 +46294,21 @@ public class THBaseService { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getScannerRows_argsStandardSchemeFactory implements SchemeFactory { - public getScannerRows_argsStandardScheme getScheme() { - return new getScannerRows_argsStandardScheme(); + private static class deleteColumnFamily_resultStandardSchemeFactory implements SchemeFactory { + public deleteColumnFamily_resultStandardScheme getScheme() { + return new deleteColumnFamily_resultStandardScheme(); } } - private static class getScannerRows_argsStandardScheme extends StandardScheme { + private static class deleteColumnFamily_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerRows_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteColumnFamily_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -17341,18 +46318,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // SCANNER_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.scannerId = iprot.readI32(); - struct.setScannerIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // NUM_ROWS - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.numRows = iprot.readI32(); - struct.setNumRowsIsSet(true); + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -17365,93 +46335,78 @@ public class THBaseService { iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetScannerId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'scannerId' was not found in serialized data! Struct: " + toString()); - } struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getScannerRows_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteColumnFamily_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SCANNER_ID_FIELD_DESC); - oprot.writeI32(struct.scannerId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC); - oprot.writeI32(struct.numRows); - oprot.writeFieldEnd(); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getScannerRows_argsTupleSchemeFactory implements SchemeFactory { - public getScannerRows_argsTupleScheme getScheme() { - return new getScannerRows_argsTupleScheme(); + private static class deleteColumnFamily_resultTupleSchemeFactory implements SchemeFactory { + public deleteColumnFamily_resultTupleScheme getScheme() { + return new deleteColumnFamily_resultTupleScheme(); } } - private static class getScannerRows_argsTupleScheme extends TupleScheme { + private static class deleteColumnFamily_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getScannerRows_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, deleteColumnFamily_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI32(struct.scannerId); BitSet optionals = new BitSet(); - if (struct.isSetNumRows()) { + if (struct.isSetIo()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetNumRows()) { - oprot.writeI32(struct.numRows); + if (struct.isSetIo()) { + struct.io.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getScannerRows_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, deleteColumnFamily_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.scannerId = iprot.readI32(); - struct.setScannerIdIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.numRows = iprot.readI32(); - struct.setNumRowsIsSet(true); + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); } } } } - public static class getScannerRows_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScannerRows_result"); + public static class modifyColumnFamily_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("modifyColumnFamily_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getScannerRows_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getScannerRows_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new modifyColumnFamily_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new modifyColumnFamily_argsTupleSchemeFactory()); } - public List success; // required - public TIOError io; // required - /** - * if the scannerId is invalid - */ - public TIllegalArgument ia; // required + public TTableName tableName; // required + public TColumnFamilyDescriptor column; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - IO((short)1, "io"), - /** - * if the scannerId is invalid - */ - IA((short)2, "ia"); + TABLE_NAME((short)1, "tableName"), + COLUMN((short)2, "column"); private static final Map byName = new HashMap(); @@ -17466,12 +46421,10 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // IO - return IO; - case 2: // IA - return IA; + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // COLUMN + return COLUMN; default: return null; } @@ -17515,177 +46468,111 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class)))); - tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); + tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumnFamilyDescriptor.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScannerRows_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(modifyColumnFamily_args.class, metaDataMap); } - public getScannerRows_result() { + public modifyColumnFamily_args() { } - public getScannerRows_result( - List success, - TIOError io, - TIllegalArgument ia) + public modifyColumnFamily_args( + TTableName tableName, + TColumnFamilyDescriptor column) { this(); - this.success = success; - this.io = io; - this.ia = ia; + this.tableName = tableName; + this.column = column; } /** * Performs a deep copy on other. */ - public getScannerRows_result(getScannerRows_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (TResult other_element : other.success) { - __this__success.add(new TResult(other_element)); - } - this.success = __this__success; - } - if (other.isSetIo()) { - this.io = new TIOError(other.io); + public modifyColumnFamily_args(modifyColumnFamily_args other) { + if (other.isSetTableName()) { + this.tableName = new TTableName(other.tableName); } - if (other.isSetIa()) { - this.ia = new TIllegalArgument(other.ia); + if (other.isSetColumn()) { + this.column = new TColumnFamilyDescriptor(other.column); } } - public getScannerRows_result deepCopy() { - return new getScannerRows_result(this); + public modifyColumnFamily_args deepCopy() { + return new modifyColumnFamily_args(this); } @Override public void clear() { - this.success = null; - this.io = null; - this.ia = null; - } - - 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(TResult elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public getScannerRows_result setSuccess(List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + this.tableName = null; + this.column = null; } - public TIOError getIo() { - return this.io; + public TTableName getTableName() { + return this.tableName; } - public getScannerRows_result setIo(TIOError io) { - this.io = io; + public modifyColumnFamily_args setTableName(TTableName tableName) { + this.tableName = tableName; return this; } - public void unsetIo() { - this.io = null; + public void unsetTableName() { + this.tableName = null; } - /** Returns true if field io is set (has been assigned a value) and false otherwise */ - public boolean isSetIo() { - return this.io != null; + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; } - public void setIoIsSet(boolean value) { + public void setTableNameIsSet(boolean value) { if (!value) { - this.io = null; + this.tableName = null; } } - /** - * if the scannerId is invalid - */ - public TIllegalArgument getIa() { - return this.ia; + public TColumnFamilyDescriptor getColumn() { + return this.column; } - /** - * if the scannerId is invalid - */ - public getScannerRows_result setIa(TIllegalArgument ia) { - this.ia = ia; + public modifyColumnFamily_args setColumn(TColumnFamilyDescriptor column) { + this.column = column; return this; } - public void unsetIa() { - this.ia = null; + public void unsetColumn() { + this.column = null; } - /** Returns true if field ia is set (has been assigned a value) and false otherwise */ - public boolean isSetIa() { - return this.ia != null; + /** Returns true if field column is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn() { + return this.column != null; } - public void setIaIsSet(boolean value) { + public void setColumnIsSet(boolean value) { if (!value) { - this.ia = null; + this.column = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case IO: + case TABLE_NAME: if (value == null) { - unsetIo(); + unsetTableName(); } else { - setIo((TIOError)value); + setTableName((TTableName)value); } break; - case IA: + case COLUMN: if (value == null) { - unsetIa(); + unsetColumn(); } else { - setIa((TIllegalArgument)value); + setColumn((TColumnFamilyDescriptor)value); } break; @@ -17694,14 +46581,11 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - - case IO: - return getIo(); + case TABLE_NAME: + return getTableName(); - case IA: - return getIa(); + case COLUMN: + return getColumn(); } throw new IllegalStateException(); @@ -17714,12 +46598,10 @@ public class THBaseService { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case IO: - return isSetIo(); - case IA: - return isSetIa(); + case TABLE_NAME: + return isSetTableName(); + case COLUMN: + return isSetColumn(); } throw new IllegalStateException(); } @@ -17728,39 +46610,30 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getScannerRows_result) - return this.equals((getScannerRows_result)that); + if (that instanceof modifyColumnFamily_args) + return this.equals((modifyColumnFamily_args)that); return false; } - public boolean equals(getScannerRows_result that) { + public boolean equals(modifyColumnFamily_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_io = true && this.isSetIo(); - boolean that_present_io = true && that.isSetIo(); - if (this_present_io || that_present_io) { - if (!(this_present_io && that_present_io)) + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) return false; - if (!this.io.equals(that.io)) + if (!this.tableName.equals(that.tableName)) return false; } - 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)) + boolean this_present_column = true && this.isSetColumn(); + boolean that_present_column = true && that.isSetColumn(); + if (this_present_column || that_present_column) { + if (!(this_present_column && that_present_column)) return false; - if (!this.ia.equals(that.ia)) + if (!this.column.equals(that.column)) return false; } @@ -17771,58 +46644,43 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_io = true && (isSetIo()); - list.add(present_io); - if (present_io) - list.add(io); + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); - boolean present_ia = true && (isSetIa()); - list.add(present_ia); - if (present_ia) - list.add(ia); + boolean present_column = true && (isSetColumn()); + list.add(present_column); + if (present_column) + list.add(column); return list.hashCode(); } @Override - public int compareTo(getScannerRows_result other) { + public int compareTo(modifyColumnFamily_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - if (isSetIo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIa()).compareTo(other.isSetIa()); + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(other.isSetColumn()); if (lastComparison != 0) { return lastComparison; } - if (isSetIa()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, other.ia); + if (isSetColumn()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, other.column); if (lastComparison != 0) { return lastComparison; } @@ -17840,34 +46698,26 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getScannerRows_result("); + StringBuilder sb = new StringBuilder("modifyColumnFamily_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("io:"); - if (this.io == null) { + sb.append("tableName:"); + if (this.tableName == null) { sb.append("null"); } else { - sb.append(this.io); + sb.append(this.tableName); } first = false; if (!first) sb.append(", "); - sb.append("ia:"); - if (this.ia == null) { + sb.append("column:"); + if (this.column == null) { sb.append("null"); } else { - sb.append(this.ia); + sb.append(this.column); } first = false; sb.append(")"); @@ -17876,7 +46726,19 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields + if (tableName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString()); + } + if (column == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'column' was not present! Struct: " + toString()); + } // check for sub-struct validity + if (tableName != null) { + tableName.validate(); + } + if (column != null) { + column.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -17895,15 +46757,15 @@ public class THBaseService { } } - private static class getScannerRows_resultStandardSchemeFactory implements SchemeFactory { - public getScannerRows_resultStandardScheme getScheme() { - return new getScannerRows_resultStandardScheme(); + private static class modifyColumnFamily_argsStandardSchemeFactory implements SchemeFactory { + public modifyColumnFamily_argsStandardScheme getScheme() { + return new modifyColumnFamily_argsStandardScheme(); } } - private static class getScannerRows_resultStandardScheme extends StandardScheme { + private static class modifyColumnFamily_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerRows_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, modifyColumnFamily_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -17913,39 +46775,20 @@ public class THBaseService { break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list198 = iprot.readListBegin(); - struct.success = new ArrayList(_list198.size); - TResult _elem199; - for (int _i200 = 0; _i200 < _list198.size; ++_i200) - { - _elem199 = new TResult(); - _elem199.read(iprot); - struct.success.add(_elem199); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // IO + case 1: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // IA + case 2: // COLUMN if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ia = new TIllegalArgument(); - struct.ia.read(iprot); - struct.setIaIsSet(true); + struct.column = new TColumnFamilyDescriptor(); + struct.column.read(iprot); + struct.setColumnIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -17961,30 +46804,18 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getScannerRows_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, modifyColumnFamily_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (TResult _iter201 : struct.success) - { - _iter201.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.io != null) { - oprot.writeFieldBegin(IO_FIELD_DESC); - struct.io.write(oprot); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + struct.tableName.write(oprot); oprot.writeFieldEnd(); } - if (struct.ia != null) { - oprot.writeFieldBegin(IA_FIELD_DESC); - struct.ia.write(oprot); + if (struct.column != null) { + oprot.writeFieldBegin(COLUMN_FIELD_DESC); + struct.column.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -17993,100 +46824,51 @@ public class THBaseService { } - private static class getScannerRows_resultTupleSchemeFactory implements SchemeFactory { - public getScannerRows_resultTupleScheme getScheme() { - return new getScannerRows_resultTupleScheme(); + private static class modifyColumnFamily_argsTupleSchemeFactory implements SchemeFactory { + public modifyColumnFamily_argsTupleScheme getScheme() { + return new modifyColumnFamily_argsTupleScheme(); } } - private static class getScannerRows_resultTupleScheme extends TupleScheme { + private static class modifyColumnFamily_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getScannerRows_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, modifyColumnFamily_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetIo()) { - optionals.set(1); - } - if (struct.isSetIa()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (TResult _iter202 : struct.success) - { - _iter202.write(oprot); - } - } - } - if (struct.isSetIo()) { - struct.io.write(oprot); - } - if (struct.isSetIa()) { - struct.ia.write(oprot); - } + struct.tableName.write(oprot); + struct.column.write(oprot); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getScannerRows_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, modifyColumnFamily_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list203 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list203.size); - TResult _elem204; - for (int _i205 = 0; _i205 < _list203.size; ++_i205) - { - _elem204 = new TResult(); - _elem204.read(iprot); - struct.success.add(_elem204); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); - } - if (incoming.get(2)) { - struct.ia = new TIllegalArgument(); - struct.ia.read(iprot); - struct.setIaIsSet(true); - } + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); + struct.column = new TColumnFamilyDescriptor(); + struct.column.read(iprot); + struct.setColumnIsSet(true); } } } - public static class closeScanner_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeScanner_args"); + public static class modifyColumnFamily_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("modifyColumnFamily_result"); - private static final org.apache.thrift.protocol.TField SCANNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scannerId", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new closeScanner_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new closeScanner_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new modifyColumnFamily_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new modifyColumnFamily_resultTupleSchemeFactory()); } - /** - * the Id of the Scanner to close * - */ - public int scannerId; // required + public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the Id of the Scanner to close * - */ - SCANNER_ID((short)1, "scannerId"); + IO((short)1, "io"); private static final Map byName = new HashMap(); @@ -18101,8 +46883,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // SCANNER_ID - return SCANNER_ID; + case 1: // IO + return IO; default: return null; } @@ -18143,82 +46925,74 @@ public class THBaseService { } // isset id assignments - private static final int __SCANNERID_ISSET_ID = 0; - private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SCANNER_ID, new org.apache.thrift.meta_data.FieldMetaData("scannerId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeScanner_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(modifyColumnFamily_result.class, metaDataMap); } - public closeScanner_args() { + public modifyColumnFamily_result() { } - public closeScanner_args( - int scannerId) + public modifyColumnFamily_result( + TIOError io) { this(); - this.scannerId = scannerId; - setScannerIdIsSet(true); + this.io = io; } /** * Performs a deep copy on other. */ - public closeScanner_args(closeScanner_args other) { - __isset_bitfield = other.__isset_bitfield; - this.scannerId = other.scannerId; + public modifyColumnFamily_result(modifyColumnFamily_result other) { + if (other.isSetIo()) { + this.io = new TIOError(other.io); + } } - public closeScanner_args deepCopy() { - return new closeScanner_args(this); + public modifyColumnFamily_result deepCopy() { + return new modifyColumnFamily_result(this); } @Override public void clear() { - setScannerIdIsSet(false); - this.scannerId = 0; + this.io = null; } - /** - * the Id of the Scanner to close * - */ - public int getScannerId() { - return this.scannerId; + public TIOError getIo() { + return this.io; } - /** - * the Id of the Scanner to close * - */ - public closeScanner_args setScannerId(int scannerId) { - this.scannerId = scannerId; - setScannerIdIsSet(true); + public modifyColumnFamily_result setIo(TIOError io) { + this.io = io; return this; } - public void unsetScannerId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCANNERID_ISSET_ID); + public void unsetIo() { + this.io = null; } - /** Returns true if field scannerId is set (has been assigned a value) and false otherwise */ - public boolean isSetScannerId() { - return EncodingUtils.testBit(__isset_bitfield, __SCANNERID_ISSET_ID); + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; } - public void setScannerIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCANNERID_ISSET_ID, value); + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SCANNER_ID: + case IO: if (value == null) { - unsetScannerId(); + unsetIo(); } else { - setScannerId((Integer)value); + setIo((TIOError)value); } break; @@ -18227,8 +47001,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case SCANNER_ID: - return getScannerId(); + case IO: + return getIo(); } throw new IllegalStateException(); @@ -18241,8 +47015,8 @@ public class THBaseService { } switch (field) { - case SCANNER_ID: - return isSetScannerId(); + case IO: + return isSetIo(); } throw new IllegalStateException(); } @@ -18251,21 +47025,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof closeScanner_args) - return this.equals((closeScanner_args)that); + if (that instanceof modifyColumnFamily_result) + return this.equals((modifyColumnFamily_result)that); return false; } - public boolean equals(closeScanner_args that) { + public boolean equals(modifyColumnFamily_result that) { if (that == null) return false; - boolean this_present_scannerId = true; - boolean that_present_scannerId = true; - if (this_present_scannerId || that_present_scannerId) { - if (!(this_present_scannerId && that_present_scannerId)) + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) return false; - if (this.scannerId != that.scannerId) + if (!this.io.equals(that.io)) return false; } @@ -18276,28 +47050,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_scannerId = true; - list.add(present_scannerId); - if (present_scannerId) - list.add(scannerId); + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); return list.hashCode(); } @Override - public int compareTo(closeScanner_args other) { + public int compareTo(modifyColumnFamily_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetScannerId()).compareTo(other.isSetScannerId()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); if (lastComparison != 0) { return lastComparison; } - if (isSetScannerId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scannerId, other.scannerId); + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); if (lastComparison != 0) { return lastComparison; } @@ -18315,15 +47089,19 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("closeScanner_args("); + StringBuilder sb = new StringBuilder("modifyColumnFamily_result("); boolean first = true; - sb.append("scannerId:"); - sb.append(this.scannerId); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } first = false; sb.append(")"); return sb.toString(); @@ -18331,7 +47109,6 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - // alas, we cannot check 'scannerId' because it's a primitive and you chose the non-beans generator. // check for sub-struct validity } @@ -18345,23 +47122,21 @@ public class THBaseService { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class closeScanner_argsStandardSchemeFactory implements SchemeFactory { - public closeScanner_argsStandardScheme getScheme() { - return new closeScanner_argsStandardScheme(); + private static class modifyColumnFamily_resultStandardSchemeFactory implements SchemeFactory { + public modifyColumnFamily_resultStandardScheme getScheme() { + return new modifyColumnFamily_resultStandardScheme(); } } - private static class closeScanner_argsStandardScheme extends StandardScheme { + private static class modifyColumnFamily_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, closeScanner_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, modifyColumnFamily_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -18371,10 +47146,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // SCANNER_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.scannerId = iprot.readI32(); - struct.setScannerIdIsSet(true); + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -18387,74 +47163,75 @@ public class THBaseService { iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method - if (!struct.isSetScannerId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'scannerId' was not found in serialized data! Struct: " + toString()); - } struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, closeScanner_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, modifyColumnFamily_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SCANNER_ID_FIELD_DESC); - oprot.writeI32(struct.scannerId); - oprot.writeFieldEnd(); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class closeScanner_argsTupleSchemeFactory implements SchemeFactory { - public closeScanner_argsTupleScheme getScheme() { - return new closeScanner_argsTupleScheme(); + private static class modifyColumnFamily_resultTupleSchemeFactory implements SchemeFactory { + public modifyColumnFamily_resultTupleScheme getScheme() { + return new modifyColumnFamily_resultTupleScheme(); } } - private static class closeScanner_argsTupleScheme extends TupleScheme { + private static class modifyColumnFamily_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeScanner_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, modifyColumnFamily_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI32(struct.scannerId); + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeScanner_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, modifyColumnFamily_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.scannerId = iprot.readI32(); - struct.setScannerIdIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } } } } - public static class closeScanner_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeScanner_result"); + public static class modifyTable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("modifyTable_args"); - private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("desc", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new closeScanner_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new closeScanner_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new modifyTable_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new modifyTable_argsTupleSchemeFactory()); } - public TIOError io; // required - /** - * if the scannerId is invalid - */ - public TIllegalArgument ia; // required + public TTableDescriptor desc; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - IO((short)1, "io"), - /** - * if the scannerId is invalid - */ - IA((short)2, "ia"); + DESC((short)1, "desc"); private static final Map byName = new HashMap(); @@ -18469,10 +47246,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // IO - return IO; - case 2: // IA - return IA; + case 1: // DESC + return DESC; default: return null; } @@ -18516,117 +47291,71 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.DESC, new org.apache.thrift.meta_data.FieldMetaData("desc", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableDescriptor.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeScanner_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(modifyTable_args.class, metaDataMap); } - public closeScanner_result() { + public modifyTable_args() { } - public closeScanner_result( - TIOError io, - TIllegalArgument ia) + public modifyTable_args( + TTableDescriptor desc) { this(); - this.io = io; - this.ia = ia; + this.desc = desc; } /** * Performs a deep copy on other. */ - public closeScanner_result(closeScanner_result other) { - if (other.isSetIo()) { - this.io = new TIOError(other.io); - } - if (other.isSetIa()) { - this.ia = new TIllegalArgument(other.ia); + public modifyTable_args(modifyTable_args other) { + if (other.isSetDesc()) { + this.desc = new TTableDescriptor(other.desc); } } - public closeScanner_result deepCopy() { - return new closeScanner_result(this); + public modifyTable_args deepCopy() { + return new modifyTable_args(this); } @Override public void clear() { - this.io = null; - this.ia = null; - } - - public TIOError getIo() { - return this.io; - } - - public closeScanner_result setIo(TIOError io) { - this.io = io; - return this; - } - - public void unsetIo() { - this.io = null; + this.desc = null; } - /** Returns true if field io is set (has been assigned a value) and false otherwise */ - public boolean isSetIo() { - return this.io != null; - } - - public void setIoIsSet(boolean value) { - if (!value) { - this.io = null; - } - } - - /** - * if the scannerId is invalid - */ - public TIllegalArgument getIa() { - return this.ia; + public TTableDescriptor getDesc() { + return this.desc; } - /** - * if the scannerId is invalid - */ - public closeScanner_result setIa(TIllegalArgument ia) { - this.ia = ia; + public modifyTable_args setDesc(TTableDescriptor desc) { + this.desc = desc; return this; } - public void unsetIa() { - this.ia = null; + public void unsetDesc() { + this.desc = null; } - /** Returns true if field ia is set (has been assigned a value) and false otherwise */ - public boolean isSetIa() { - return this.ia != null; + /** Returns true if field desc is set (has been assigned a value) and false otherwise */ + public boolean isSetDesc() { + return this.desc != null; } - public void setIaIsSet(boolean value) { + public void setDescIsSet(boolean value) { if (!value) { - this.ia = null; + this.desc = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case IO: - if (value == null) { - unsetIo(); - } else { - setIo((TIOError)value); - } - break; - - case IA: + case DESC: if (value == null) { - unsetIa(); + unsetDesc(); } else { - setIa((TIllegalArgument)value); + setDesc((TTableDescriptor)value); } break; @@ -18635,11 +47364,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case IO: - return getIo(); - - case IA: - return getIa(); + case DESC: + return getDesc(); } throw new IllegalStateException(); @@ -18652,10 +47378,8 @@ public class THBaseService { } switch (field) { - case IO: - return isSetIo(); - case IA: - return isSetIa(); + case DESC: + return isSetDesc(); } throw new IllegalStateException(); } @@ -18664,30 +47388,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof closeScanner_result) - return this.equals((closeScanner_result)that); + if (that instanceof modifyTable_args) + return this.equals((modifyTable_args)that); return false; } - public boolean equals(closeScanner_result that) { + public boolean equals(modifyTable_args that) { if (that == null) return false; - boolean this_present_io = true && this.isSetIo(); - boolean that_present_io = true && that.isSetIo(); - if (this_present_io || that_present_io) { - if (!(this_present_io && that_present_io)) - return false; - if (!this.io.equals(that.io)) - return false; - } - - 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)) + boolean this_present_desc = true && this.isSetDesc(); + boolean that_present_desc = true && that.isSetDesc(); + if (this_present_desc || that_present_desc) { + if (!(this_present_desc && that_present_desc)) return false; - if (!this.ia.equals(that.ia)) + if (!this.desc.equals(that.desc)) return false; } @@ -18698,43 +47413,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_io = true && (isSetIo()); - list.add(present_io); - if (present_io) - list.add(io); - - boolean present_ia = true && (isSetIa()); - list.add(present_ia); - if (present_ia) - list.add(ia); + boolean present_desc = true && (isSetDesc()); + list.add(present_desc); + if (present_desc) + list.add(desc); return list.hashCode(); } @Override - public int compareTo(closeScanner_result other) { + public int compareTo(modifyTable_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIa()).compareTo(other.isSetIa()); + lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc()); if (lastComparison != 0) { return lastComparison; } - if (isSetIa()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, other.ia); + if (isSetDesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc); if (lastComparison != 0) { return lastComparison; } @@ -18752,26 +47452,18 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("closeScanner_result("); + StringBuilder sb = new StringBuilder("modifyTable_args("); boolean first = true; - 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("desc:"); + if (this.desc == null) { sb.append("null"); } else { - sb.append(this.ia); + sb.append(this.desc); } first = false; sb.append(")"); @@ -18780,7 +47472,13 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields + if (desc == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'desc' was not present! Struct: " + toString()); + } // check for sub-struct validity + if (desc != null) { + desc.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -18799,15 +47497,15 @@ public class THBaseService { } } - private static class closeScanner_resultStandardSchemeFactory implements SchemeFactory { - public closeScanner_resultStandardScheme getScheme() { - return new closeScanner_resultStandardScheme(); + private static class modifyTable_argsStandardSchemeFactory implements SchemeFactory { + public modifyTable_argsStandardScheme getScheme() { + return new modifyTable_argsStandardScheme(); } } - private static class closeScanner_resultStandardScheme extends StandardScheme { + private static class modifyTable_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, closeScanner_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, modifyTable_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -18817,20 +47515,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // IO - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // IA + case 1: // DESC if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ia = new TIllegalArgument(); - struct.ia.read(iprot); - struct.setIaIsSet(true); + struct.desc = new TTableDescriptor(); + struct.desc.read(iprot); + struct.setDescIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -18846,18 +47535,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, closeScanner_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, modifyTable_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.io != null) { - oprot.writeFieldBegin(IO_FIELD_DESC); - struct.io.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ia != null) { - oprot.writeFieldBegin(IA_FIELD_DESC); - struct.ia.write(oprot); + if (struct.desc != null) { + oprot.writeFieldBegin(DESC_FIELD_DESC); + struct.desc.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -18866,83 +47550,47 @@ public class THBaseService { } - private static class closeScanner_resultTupleSchemeFactory implements SchemeFactory { - public closeScanner_resultTupleScheme getScheme() { - return new closeScanner_resultTupleScheme(); + private static class modifyTable_argsTupleSchemeFactory implements SchemeFactory { + public modifyTable_argsTupleScheme getScheme() { + return new modifyTable_argsTupleScheme(); } } - private static class closeScanner_resultTupleScheme extends TupleScheme { + private static class modifyTable_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeScanner_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, modifyTable_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetIo()) { - optionals.set(0); - } - if (struct.isSetIa()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetIo()) { - struct.io.write(oprot); - } - if (struct.isSetIa()) { - struct.ia.write(oprot); - } + struct.desc.write(oprot); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeScanner_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, modifyTable_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); - } - if (incoming.get(1)) { - struct.ia = new TIllegalArgument(); - struct.ia.read(iprot); - struct.setIaIsSet(true); - } + struct.desc = new TTableDescriptor(); + struct.desc.read(iprot); + struct.setDescIsSet(true); } } } - public static class mutateRow_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRow_args"); + public static class modifyTable_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("modifyTable_result"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TROW_MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("trowMutations", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new mutateRow_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new mutateRow_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new modifyTable_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new modifyTable_resultTupleSchemeFactory()); } - /** - * table to apply the mutations - */ - public ByteBuffer table; // required - /** - * mutations to apply - */ - public TRowMutations trowMutations; // required + public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * table to apply the mutations - */ - TABLE((short)1, "table"), - /** - * mutations to apply - */ - TROW_MUTATIONS((short)2, "trowMutations"); + IO((short)1, "io"); private static final Map byName = new HashMap(); @@ -18957,10 +47605,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // TROW_MUTATIONS - return TROW_MUTATIONS; + case 1: // IO + return IO; default: return null; } @@ -19004,133 +47650,71 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TROW_MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("trowMutations", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowMutations.class))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRow_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(modifyTable_result.class, metaDataMap); } - public mutateRow_args() { + public modifyTable_result() { } - public mutateRow_args( - ByteBuffer table, - TRowMutations trowMutations) + public modifyTable_result( + TIOError io) { this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.trowMutations = trowMutations; + this.io = io; } /** * Performs a deep copy on other. */ - public mutateRow_args(mutateRow_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetTrowMutations()) { - this.trowMutations = new TRowMutations(other.trowMutations); + public modifyTable_result(modifyTable_result other) { + if (other.isSetIo()) { + this.io = new TIOError(other.io); } } - public mutateRow_args deepCopy() { - return new mutateRow_args(this); + public modifyTable_result deepCopy() { + return new modifyTable_result(this); } @Override public void clear() { - this.table = null; - this.trowMutations = null; - } - - /** - * table to apply the mutations - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); - } - - /** - * table to apply the mutations - */ - public mutateRow_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; - } - - public mutateRow_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; - } - - public void unsetTable() { - this.table = null; - } - - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; - } - - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } + this.io = null; } - /** - * mutations to apply - */ - public TRowMutations getTrowMutations() { - return this.trowMutations; + public TIOError getIo() { + return this.io; } - /** - * mutations to apply - */ - public mutateRow_args setTrowMutations(TRowMutations trowMutations) { - this.trowMutations = trowMutations; + public modifyTable_result setIo(TIOError io) { + this.io = io; return this; } - public void unsetTrowMutations() { - this.trowMutations = null; + public void unsetIo() { + this.io = null; } - /** Returns true if field trowMutations is set (has been assigned a value) and false otherwise */ - public boolean isSetTrowMutations() { - return this.trowMutations != null; + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; } - public void setTrowMutationsIsSet(boolean value) { + public void setIoIsSet(boolean value) { if (!value) { - this.trowMutations = null; + this.io = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; - - case TROW_MUTATIONS: + case IO: if (value == null) { - unsetTrowMutations(); + unsetIo(); } else { - setTrowMutations((TRowMutations)value); + setIo((TIOError)value); } break; @@ -19139,11 +47723,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); - - case TROW_MUTATIONS: - return getTrowMutations(); + case IO: + return getIo(); } throw new IllegalStateException(); @@ -19156,10 +47737,8 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case TROW_MUTATIONS: - return isSetTrowMutations(); + case IO: + return isSetIo(); } throw new IllegalStateException(); } @@ -19168,30 +47747,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof mutateRow_args) - return this.equals((mutateRow_args)that); + if (that instanceof modifyTable_result) + return this.equals((modifyTable_result)that); return false; } - public boolean equals(mutateRow_args that) { + public boolean equals(modifyTable_result that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; - } - - boolean this_present_trowMutations = true && this.isSetTrowMutations(); - boolean that_present_trowMutations = true && that.isSetTrowMutations(); - if (this_present_trowMutations || that_present_trowMutations) { - if (!(this_present_trowMutations && that_present_trowMutations)) + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) return false; - if (!this.trowMutations.equals(that.trowMutations)) + if (!this.io.equals(that.io)) return false; } @@ -19202,43 +47772,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - boolean present_trowMutations = true && (isSetTrowMutations()); - list.add(present_trowMutations); - if (present_trowMutations) - list.add(trowMutations); + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); return list.hashCode(); } @Override - public int compareTo(mutateRow_args other) { + public int compareTo(modifyTable_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTrowMutations()).compareTo(other.isSetTrowMutations()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); if (lastComparison != 0) { return lastComparison; } - if (isSetTrowMutations()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trowMutations, other.trowMutations); + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); if (lastComparison != 0) { return lastComparison; } @@ -19256,26 +47811,18 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("mutateRow_args("); + StringBuilder sb = new StringBuilder("modifyTable_result("); boolean first = true; - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("trowMutations:"); - if (this.trowMutations == null) { + sb.append("io:"); + if (this.io == null) { sb.append("null"); } else { - sb.append(this.trowMutations); + sb.append(this.io); } first = false; sb.append(")"); @@ -19284,16 +47831,7 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (trowMutations == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'trowMutations' was not present! Struct: " + toString()); - } // check for sub-struct validity - if (trowMutations != null) { - trowMutations.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -19312,15 +47850,15 @@ public class THBaseService { } } - private static class mutateRow_argsStandardSchemeFactory implements SchemeFactory { - public mutateRow_argsStandardScheme getScheme() { - return new mutateRow_argsStandardScheme(); + private static class modifyTable_resultStandardSchemeFactory implements SchemeFactory { + public modifyTable_resultStandardScheme getScheme() { + return new modifyTable_resultStandardScheme(); } } - private static class mutateRow_argsStandardScheme extends StandardScheme { + private static class modifyTable_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRow_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, modifyTable_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -19330,19 +47868,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TROW_MUTATIONS + case 1: // IO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.trowMutations = new TRowMutations(); - struct.trowMutations.read(iprot); - struct.setTrowMutationsIsSet(true); + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -19358,18 +47888,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRow_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, modifyTable_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.trowMutations != null) { - oprot.writeFieldBegin(TROW_MUTATIONS_FIELD_DESC); - struct.trowMutations.write(oprot); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -19378,50 +47903,57 @@ public class THBaseService { } - private static class mutateRow_argsTupleSchemeFactory implements SchemeFactory { - public mutateRow_argsTupleScheme getScheme() { - return new mutateRow_argsTupleScheme(); + private static class modifyTable_resultTupleSchemeFactory implements SchemeFactory { + public modifyTable_resultTupleScheme getScheme() { + return new modifyTable_resultTupleScheme(); } } - private static class mutateRow_argsTupleScheme extends TupleScheme { + private static class modifyTable_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, mutateRow_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, modifyTable_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - struct.trowMutations.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, mutateRow_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, modifyTable_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - struct.trowMutations = new TRowMutations(); - struct.trowMutations.read(iprot); - struct.setTrowMutationsIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } } } } - public static class mutateRow_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRow_result"); + public static class createNamespace_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createNamespace_args"); - private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField NAMESPACE_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("namespaceDesc", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new mutateRow_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new mutateRow_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new createNamespace_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createNamespace_argsTupleSchemeFactory()); } - public TIOError io; // required + public TNamespaceDescriptor namespaceDesc; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - IO((short)1, "io"); + NAMESPACE_DESC((short)1, "namespaceDesc"); private static final Map byName = new HashMap(); @@ -19436,8 +47968,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // IO - return IO; + case 1: // NAMESPACE_DESC + return NAMESPACE_DESC; default: return null; } @@ -19481,71 +48013,71 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.NAMESPACE_DESC, new org.apache.thrift.meta_data.FieldMetaData("namespaceDesc", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNamespaceDescriptor.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRow_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createNamespace_args.class, metaDataMap); } - public mutateRow_result() { + public createNamespace_args() { } - public mutateRow_result( - TIOError io) + public createNamespace_args( + TNamespaceDescriptor namespaceDesc) { this(); - this.io = io; + this.namespaceDesc = namespaceDesc; } /** * Performs a deep copy on other. */ - public mutateRow_result(mutateRow_result other) { - if (other.isSetIo()) { - this.io = new TIOError(other.io); + public createNamespace_args(createNamespace_args other) { + if (other.isSetNamespaceDesc()) { + this.namespaceDesc = new TNamespaceDescriptor(other.namespaceDesc); } } - public mutateRow_result deepCopy() { - return new mutateRow_result(this); + public createNamespace_args deepCopy() { + return new createNamespace_args(this); } @Override public void clear() { - this.io = null; + this.namespaceDesc = null; } - public TIOError getIo() { - return this.io; + public TNamespaceDescriptor getNamespaceDesc() { + return this.namespaceDesc; } - public mutateRow_result setIo(TIOError io) { - this.io = io; + public createNamespace_args setNamespaceDesc(TNamespaceDescriptor namespaceDesc) { + this.namespaceDesc = namespaceDesc; return this; } - public void unsetIo() { - this.io = null; + public void unsetNamespaceDesc() { + this.namespaceDesc = null; } - /** Returns true if field io is set (has been assigned a value) and false otherwise */ - public boolean isSetIo() { - return this.io != null; + /** Returns true if field namespaceDesc is set (has been assigned a value) and false otherwise */ + public boolean isSetNamespaceDesc() { + return this.namespaceDesc != null; } - public void setIoIsSet(boolean value) { + public void setNamespaceDescIsSet(boolean value) { if (!value) { - this.io = null; + this.namespaceDesc = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case IO: + case NAMESPACE_DESC: if (value == null) { - unsetIo(); + unsetNamespaceDesc(); } else { - setIo((TIOError)value); + setNamespaceDesc((TNamespaceDescriptor)value); } break; @@ -19554,8 +48086,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case IO: - return getIo(); + case NAMESPACE_DESC: + return getNamespaceDesc(); } throw new IllegalStateException(); @@ -19568,8 +48100,8 @@ public class THBaseService { } switch (field) { - case IO: - return isSetIo(); + case NAMESPACE_DESC: + return isSetNamespaceDesc(); } throw new IllegalStateException(); } @@ -19578,21 +48110,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof mutateRow_result) - return this.equals((mutateRow_result)that); + if (that instanceof createNamespace_args) + return this.equals((createNamespace_args)that); return false; } - public boolean equals(mutateRow_result that) { + public boolean equals(createNamespace_args that) { if (that == null) return false; - boolean this_present_io = true && this.isSetIo(); - boolean that_present_io = true && that.isSetIo(); - if (this_present_io || that_present_io) { - if (!(this_present_io && that_present_io)) + boolean this_present_namespaceDesc = true && this.isSetNamespaceDesc(); + boolean that_present_namespaceDesc = true && that.isSetNamespaceDesc(); + if (this_present_namespaceDesc || that_present_namespaceDesc) { + if (!(this_present_namespaceDesc && that_present_namespaceDesc)) return false; - if (!this.io.equals(that.io)) + if (!this.namespaceDesc.equals(that.namespaceDesc)) return false; } @@ -19603,28 +48135,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_io = true && (isSetIo()); - list.add(present_io); - if (present_io) - list.add(io); + boolean present_namespaceDesc = true && (isSetNamespaceDesc()); + list.add(present_namespaceDesc); + if (present_namespaceDesc) + list.add(namespaceDesc); return list.hashCode(); } @Override - public int compareTo(mutateRow_result other) { + public int compareTo(createNamespace_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + lastComparison = Boolean.valueOf(isSetNamespaceDesc()).compareTo(other.isSetNamespaceDesc()); if (lastComparison != 0) { return lastComparison; } - if (isSetIo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (isSetNamespaceDesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.namespaceDesc, other.namespaceDesc); if (lastComparison != 0) { return lastComparison; } @@ -19642,18 +48174,18 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("mutateRow_result("); + StringBuilder sb = new StringBuilder("createNamespace_args("); boolean first = true; - sb.append("io:"); - if (this.io == null) { + sb.append("namespaceDesc:"); + if (this.namespaceDesc == null) { sb.append("null"); } else { - sb.append(this.io); + sb.append(this.namespaceDesc); } first = false; sb.append(")"); @@ -19662,7 +48194,13 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields + if (namespaceDesc == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'namespaceDesc' was not present! Struct: " + toString()); + } // check for sub-struct validity + if (namespaceDesc != null) { + namespaceDesc.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -19681,15 +48219,15 @@ public class THBaseService { } } - private static class mutateRow_resultStandardSchemeFactory implements SchemeFactory { - public mutateRow_resultStandardScheme getScheme() { - return new mutateRow_resultStandardScheme(); + private static class createNamespace_argsStandardSchemeFactory implements SchemeFactory { + public createNamespace_argsStandardScheme getScheme() { + return new createNamespace_argsStandardScheme(); } } - private static class mutateRow_resultStandardScheme extends StandardScheme { + private static class createNamespace_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRow_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, createNamespace_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -19699,11 +48237,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // IO + case 1: // NAMESPACE_DESC if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); + struct.namespaceDesc = new TNamespaceDescriptor(); + struct.namespaceDesc.read(iprot); + struct.setNamespaceDescIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -19719,13 +48257,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRow_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, createNamespace_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.io != null) { - oprot.writeFieldBegin(IO_FIELD_DESC); - struct.io.write(oprot); + if (struct.namespaceDesc != null) { + oprot.writeFieldBegin(NAMESPACE_DESC_FIELD_DESC); + struct.namespaceDesc.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -19734,81 +48272,47 @@ public class THBaseService { } - private static class mutateRow_resultTupleSchemeFactory implements SchemeFactory { - public mutateRow_resultTupleScheme getScheme() { - return new mutateRow_resultTupleScheme(); + private static class createNamespace_argsTupleSchemeFactory implements SchemeFactory { + public createNamespace_argsTupleScheme getScheme() { + return new createNamespace_argsTupleScheme(); } } - private static class mutateRow_resultTupleScheme extends TupleScheme { + private static class createNamespace_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, mutateRow_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, createNamespace_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetIo()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetIo()) { - struct.io.write(oprot); - } + struct.namespaceDesc.write(oprot); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, mutateRow_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, createNamespace_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); - } + struct.namespaceDesc = new TNamespaceDescriptor(); + struct.namespaceDesc.read(iprot); + struct.setNamespaceDescIsSet(true); } } } - public static class getScannerResults_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScannerResults_args"); + public static class createNamespace_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createNamespace_result"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TSCAN_FIELD_DESC = new org.apache.thrift.protocol.TField("tscan", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField NUM_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("numRows", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getScannerResults_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getScannerResults_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new createNamespace_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createNamespace_resultTupleSchemeFactory()); } - /** - * the table to get the Scanner for - */ - public ByteBuffer table; // required - /** - * the scan object to get a Scanner for - */ - public TScan tscan; // required - /** - * number of rows to return - */ - public int numRows; // required + public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * the table to get the Scanner for - */ - TABLE((short)1, "table"), - /** - * the scan object to get a Scanner for - */ - TSCAN((short)2, "tscan"), - /** - * number of rows to return - */ - NUM_ROWS((short)3, "numRows"); + IO((short)1, "io"); private static final Map byName = new HashMap(); @@ -19823,12 +48327,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // TSCAN - return TSCAN; - case 3: // NUM_ROWS - return NUM_ROWS; + case 1: // IO + return IO; default: return null; } @@ -19869,186 +48369,74 @@ public class THBaseService { } // isset id assignments - private static final int __NUMROWS_ISSET_ID = 0; - private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.TSCAN, new org.apache.thrift.meta_data.FieldMetaData("tscan", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TScan.class))); - tmpMap.put(_Fields.NUM_ROWS, new org.apache.thrift.meta_data.FieldMetaData("numRows", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScannerResults_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createNamespace_result.class, metaDataMap); } - public getScannerResults_args() { - this.numRows = 1; - + public createNamespace_result() { } - public getScannerResults_args( - ByteBuffer table, - TScan tscan, - int numRows) + public createNamespace_result( + TIOError io) { this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.tscan = tscan; - this.numRows = numRows; - setNumRowsIsSet(true); + this.io = io; } /** * Performs a deep copy on other. */ - public getScannerResults_args(getScannerResults_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetTscan()) { - this.tscan = new TScan(other.tscan); + public createNamespace_result(createNamespace_result other) { + if (other.isSetIo()) { + this.io = new TIOError(other.io); } - this.numRows = other.numRows; } - public getScannerResults_args deepCopy() { - return new getScannerResults_args(this); + public createNamespace_result deepCopy() { + return new createNamespace_result(this); } @Override public void clear() { - this.table = null; - this.tscan = null; - this.numRows = 1; - - } - - /** - * the table to get the Scanner for - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); - } - - /** - * the table to get the Scanner for - */ - public getScannerResults_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; - } - - public getScannerResults_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; - } - - public void unsetTable() { - this.table = null; - } - - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; - } - - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } + this.io = null; } - /** - * the scan object to get a Scanner for - */ - public TScan getTscan() { - return this.tscan; + public TIOError getIo() { + return this.io; } - /** - * the scan object to get a Scanner for - */ - public getScannerResults_args setTscan(TScan tscan) { - this.tscan = tscan; + public createNamespace_result setIo(TIOError io) { + this.io = io; return this; } - public void unsetTscan() { - this.tscan = null; + public void unsetIo() { + this.io = null; } - /** Returns true if field tscan is set (has been assigned a value) and false otherwise */ - public boolean isSetTscan() { - return this.tscan != null; + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; } - public void setTscanIsSet(boolean value) { + public void setIoIsSet(boolean value) { if (!value) { - this.tscan = null; + this.io = null; } } - /** - * number of rows to return - */ - public int getNumRows() { - return this.numRows; - } - - /** - * number of rows to return - */ - public getScannerResults_args setNumRows(int numRows) { - this.numRows = numRows; - setNumRowsIsSet(true); - return this; - } - - public void unsetNumRows() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMROWS_ISSET_ID); - } - - /** Returns true if field numRows is set (has been assigned a value) and false otherwise */ - public boolean isSetNumRows() { - return EncodingUtils.testBit(__isset_bitfield, __NUMROWS_ISSET_ID); - } - - public void setNumRowsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMROWS_ISSET_ID, value); - } - public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; - - case TSCAN: - if (value == null) { - unsetTscan(); - } else { - setTscan((TScan)value); - } - break; - - case NUM_ROWS: + case IO: if (value == null) { - unsetNumRows(); + unsetIo(); } else { - setNumRows((Integer)value); + setIo((TIOError)value); } break; @@ -20057,14 +48445,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); - - case TSCAN: - return getTscan(); - - case NUM_ROWS: - return getNumRows(); + case IO: + return getIo(); } throw new IllegalStateException(); @@ -20077,12 +48459,8 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case TSCAN: - return isSetTscan(); - case NUM_ROWS: - return isSetNumRows(); + case IO: + return isSetIo(); } throw new IllegalStateException(); } @@ -20091,39 +48469,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getScannerResults_args) - return this.equals((getScannerResults_args)that); + if (that instanceof createNamespace_result) + return this.equals((createNamespace_result)that); return false; } - public boolean equals(getScannerResults_args that) { + public boolean equals(createNamespace_result that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; - } - - boolean this_present_tscan = true && this.isSetTscan(); - boolean that_present_tscan = true && that.isSetTscan(); - if (this_present_tscan || that_present_tscan) { - if (!(this_present_tscan && that_present_tscan)) - return false; - if (!this.tscan.equals(that.tscan)) - return false; - } - - boolean this_present_numRows = true; - boolean that_present_numRows = true; - if (this_present_numRows || that_present_numRows) { - if (!(this_present_numRows && that_present_numRows)) + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) return false; - if (this.numRows != that.numRows) + if (!this.io.equals(that.io)) return false; } @@ -20134,58 +48494,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - boolean present_tscan = true && (isSetTscan()); - list.add(present_tscan); - if (present_tscan) - list.add(tscan); - - boolean present_numRows = true; - list.add(present_numRows); - if (present_numRows) - list.add(numRows); + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); return list.hashCode(); } @Override - public int compareTo(getScannerResults_args other) { + public int compareTo(createNamespace_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTscan()).compareTo(other.isSetTscan()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTscan()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tscan, other.tscan); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumRows()).compareTo(other.isSetNumRows()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); if (lastComparison != 0) { return lastComparison; } - if (isSetNumRows()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numRows, other.numRows); + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); if (lastComparison != 0) { return lastComparison; } @@ -20203,48 +48533,27 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getScannerResults_args("); + StringBuilder sb = new StringBuilder("createNamespace_result("); boolean first = true; - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("tscan:"); - if (this.tscan == null) { + sb.append("io:"); + if (this.io == null) { sb.append("null"); } else { - sb.append(this.tscan); + sb.append(this.io); } first = false; - if (!first) sb.append(", "); - sb.append("numRows:"); - sb.append(this.numRows); - first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (tscan == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tscan' was not present! Struct: " + toString()); - } // check for sub-struct validity - if (tscan != null) { - tscan.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -20257,23 +48566,21 @@ public class THBaseService { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getScannerResults_argsStandardSchemeFactory implements SchemeFactory { - public getScannerResults_argsStandardScheme getScheme() { - return new getScannerResults_argsStandardScheme(); + private static class createNamespace_resultStandardSchemeFactory implements SchemeFactory { + public createNamespace_resultStandardScheme getScheme() { + return new createNamespace_resultStandardScheme(); } } - private static class getScannerResults_argsStandardScheme extends StandardScheme { + private static class createNamespace_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerResults_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, createNamespace_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -20283,27 +48590,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TSCAN + case 1: // IO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.tscan = new TScan(); - struct.tscan.read(iprot); - struct.setTscanIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // NUM_ROWS - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.numRows = iprot.readI32(); - struct.setNumRowsIsSet(true); + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -20319,89 +48610,72 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getScannerResults_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, createNamespace_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.tscan != null) { - oprot.writeFieldBegin(TSCAN_FIELD_DESC); - struct.tscan.write(oprot); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC); - oprot.writeI32(struct.numRows); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getScannerResults_argsTupleSchemeFactory implements SchemeFactory { - public getScannerResults_argsTupleScheme getScheme() { - return new getScannerResults_argsTupleScheme(); + private static class createNamespace_resultTupleSchemeFactory implements SchemeFactory { + public createNamespace_resultTupleScheme getScheme() { + return new createNamespace_resultTupleScheme(); } } - private static class getScannerResults_argsTupleScheme extends TupleScheme { + private static class createNamespace_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getScannerResults_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, createNamespace_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - struct.tscan.write(oprot); BitSet optionals = new BitSet(); - if (struct.isSetNumRows()) { + if (struct.isSetIo()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetNumRows()) { - oprot.writeI32(struct.numRows); + if (struct.isSetIo()) { + struct.io.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getScannerResults_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, createNamespace_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - struct.tscan = new TScan(); - struct.tscan.read(iprot); - struct.setTscanIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.numRows = iprot.readI32(); - struct.setNumRowsIsSet(true); + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); } } } } - public static class getScannerResults_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScannerResults_result"); + public static class modifyNamespace_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("modifyNamespace_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField NAMESPACE_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("namespaceDesc", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getScannerResults_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getScannerResults_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new modifyNamespace_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new modifyNamespace_argsTupleSchemeFactory()); } - public List success; // required - public TIOError io; // required + public TNamespaceDescriptor namespaceDesc; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - IO((short)1, "io"); + NAMESPACE_DESC((short)1, "namespaceDesc"); private static final Map byName = new HashMap(); @@ -20415,11 +48689,9 @@ public class THBaseService { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // IO - return IO; + switch(fieldId) { + case 1: // NAMESPACE_DESC + return NAMESPACE_DESC; default: return null; } @@ -20463,131 +48735,71 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResult.class)))); - tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.NAMESPACE_DESC, new org.apache.thrift.meta_data.FieldMetaData("namespaceDesc", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNamespaceDescriptor.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScannerResults_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(modifyNamespace_args.class, metaDataMap); } - public getScannerResults_result() { + public modifyNamespace_args() { } - public getScannerResults_result( - List success, - TIOError io) + public modifyNamespace_args( + TNamespaceDescriptor namespaceDesc) { this(); - this.success = success; - this.io = io; + this.namespaceDesc = namespaceDesc; } /** * Performs a deep copy on other. */ - public getScannerResults_result(getScannerResults_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (TResult other_element : other.success) { - __this__success.add(new TResult(other_element)); - } - this.success = __this__success; - } - if (other.isSetIo()) { - this.io = new TIOError(other.io); + public modifyNamespace_args(modifyNamespace_args other) { + if (other.isSetNamespaceDesc()) { + this.namespaceDesc = new TNamespaceDescriptor(other.namespaceDesc); } } - public getScannerResults_result deepCopy() { - return new getScannerResults_result(this); + public modifyNamespace_args deepCopy() { + return new modifyNamespace_args(this); } @Override public void clear() { - this.success = null; - this.io = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(TResult elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public getScannerResults_result setSuccess(List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + this.namespaceDesc = null; } - public TIOError getIo() { - return this.io; + public TNamespaceDescriptor getNamespaceDesc() { + return this.namespaceDesc; } - public getScannerResults_result setIo(TIOError io) { - this.io = io; + public modifyNamespace_args setNamespaceDesc(TNamespaceDescriptor namespaceDesc) { + this.namespaceDesc = namespaceDesc; return this; } - public void unsetIo() { - this.io = null; + public void unsetNamespaceDesc() { + this.namespaceDesc = null; } - /** Returns true if field io is set (has been assigned a value) and false otherwise */ - public boolean isSetIo() { - return this.io != null; + /** Returns true if field namespaceDesc is set (has been assigned a value) and false otherwise */ + public boolean isSetNamespaceDesc() { + return this.namespaceDesc != null; } - public void setIoIsSet(boolean value) { + public void setNamespaceDescIsSet(boolean value) { if (!value) { - this.io = null; + this.namespaceDesc = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case IO: + case NAMESPACE_DESC: if (value == null) { - unsetIo(); + unsetNamespaceDesc(); } else { - setIo((TIOError)value); + setNamespaceDesc((TNamespaceDescriptor)value); } break; @@ -20596,11 +48808,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - - case IO: - return getIo(); + case NAMESPACE_DESC: + return getNamespaceDesc(); } throw new IllegalStateException(); @@ -20613,10 +48822,8 @@ public class THBaseService { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case IO: - return isSetIo(); + case NAMESPACE_DESC: + return isSetNamespaceDesc(); } throw new IllegalStateException(); } @@ -20625,30 +48832,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getScannerResults_result) - return this.equals((getScannerResults_result)that); + if (that instanceof modifyNamespace_args) + return this.equals((modifyNamespace_args)that); return false; } - public boolean equals(getScannerResults_result that) { + public boolean equals(modifyNamespace_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_io = true && this.isSetIo(); - boolean that_present_io = true && that.isSetIo(); - if (this_present_io || that_present_io) { - if (!(this_present_io && that_present_io)) + boolean this_present_namespaceDesc = true && this.isSetNamespaceDesc(); + boolean that_present_namespaceDesc = true && that.isSetNamespaceDesc(); + if (this_present_namespaceDesc || that_present_namespaceDesc) { + if (!(this_present_namespaceDesc && that_present_namespaceDesc)) return false; - if (!this.io.equals(that.io)) + if (!this.namespaceDesc.equals(that.namespaceDesc)) return false; } @@ -20659,43 +48857,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_io = true && (isSetIo()); - list.add(present_io); - if (present_io) - list.add(io); + boolean present_namespaceDesc = true && (isSetNamespaceDesc()); + list.add(present_namespaceDesc); + if (present_namespaceDesc) + list.add(namespaceDesc); return list.hashCode(); } @Override - public int compareTo(getScannerResults_result other) { + public int compareTo(modifyNamespace_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + lastComparison = Boolean.valueOf(isSetNamespaceDesc()).compareTo(other.isSetNamespaceDesc()); if (lastComparison != 0) { return lastComparison; } - if (isSetIo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (isSetNamespaceDesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.namespaceDesc, other.namespaceDesc); if (lastComparison != 0) { return lastComparison; } @@ -20713,26 +48896,18 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getScannerResults_result("); + StringBuilder sb = new StringBuilder("modifyNamespace_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("io:"); - if (this.io == null) { + sb.append("namespaceDesc:"); + if (this.namespaceDesc == null) { sb.append("null"); } else { - sb.append(this.io); + sb.append(this.namespaceDesc); } first = false; sb.append(")"); @@ -20741,7 +48916,13 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields + if (namespaceDesc == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'namespaceDesc' was not present! Struct: " + toString()); + } // check for sub-struct validity + if (namespaceDesc != null) { + namespaceDesc.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -20760,15 +48941,15 @@ public class THBaseService { } } - private static class getScannerResults_resultStandardSchemeFactory implements SchemeFactory { - public getScannerResults_resultStandardScheme getScheme() { - return new getScannerResults_resultStandardScheme(); + private static class modifyNamespace_argsStandardSchemeFactory implements SchemeFactory { + public modifyNamespace_argsStandardScheme getScheme() { + return new modifyNamespace_argsStandardScheme(); } } - private static class getScannerResults_resultStandardScheme extends StandardScheme { + private static class modifyNamespace_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getScannerResults_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, modifyNamespace_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -20778,30 +48959,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list206 = iprot.readListBegin(); - struct.success = new ArrayList(_list206.size); - TResult _elem207; - for (int _i208 = 0; _i208 < _list206.size; ++_i208) - { - _elem207 = new TResult(); - _elem207.read(iprot); - struct.success.add(_elem207); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // IO + case 1: // NAMESPACE_DESC if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); + struct.namespaceDesc = new TNamespaceDescriptor(); + struct.namespaceDesc.read(iprot); + struct.setNamespaceDescIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -20817,25 +48979,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getScannerResults_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, modifyNamespace_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (TResult _iter209 : struct.success) - { - _iter209.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.io != null) { - oprot.writeFieldBegin(IO_FIELD_DESC); - struct.io.write(oprot); + if (struct.namespaceDesc != null) { + oprot.writeFieldBegin(NAMESPACE_DESC_FIELD_DESC); + struct.namespaceDesc.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -20844,89 +48994,47 @@ public class THBaseService { } - private static class getScannerResults_resultTupleSchemeFactory implements SchemeFactory { - public getScannerResults_resultTupleScheme getScheme() { - return new getScannerResults_resultTupleScheme(); + private static class modifyNamespace_argsTupleSchemeFactory implements SchemeFactory { + public modifyNamespace_argsTupleScheme getScheme() { + return new modifyNamespace_argsTupleScheme(); } } - private static class getScannerResults_resultTupleScheme extends TupleScheme { + private static class modifyNamespace_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getScannerResults_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, modifyNamespace_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetIo()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (TResult _iter210 : struct.success) - { - _iter210.write(oprot); - } - } - } - if (struct.isSetIo()) { - struct.io.write(oprot); - } + struct.namespaceDesc.write(oprot); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getScannerResults_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, modifyNamespace_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list211 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list211.size); - TResult _elem212; - for (int _i213 = 0; _i213 < _list211.size; ++_i213) - { - _elem212 = new TResult(); - _elem212.read(iprot); - struct.success.add(_elem212); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); - } + struct.namespaceDesc = new TNamespaceDescriptor(); + struct.namespaceDesc.read(iprot); + struct.setNamespaceDescIsSet(true); } } } - public static class getRegionLocation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRegionLocation_args"); + public static class modifyNamespace_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("modifyNamespace_result"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField RELOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("reload", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getRegionLocation_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getRegionLocation_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new modifyNamespace_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new modifyNamespace_resultTupleSchemeFactory()); } - public ByteBuffer table; // required - public ByteBuffer row; // required - public boolean reload; // required + public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TABLE((short)1, "table"), - ROW((short)2, "row"), - RELOAD((short)3, "reload"); + IO((short)1, "io"); private static final Map byName = new HashMap(); @@ -20941,12 +49049,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // ROW - return ROW; - case 3: // RELOAD - return RELOAD; + case 1: // IO + return IO; default: return null; } @@ -20987,176 +49091,74 @@ public class THBaseService { } // isset id assignments - private static final int __RELOAD_ISSET_ID = 0; - private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.RELOAD, new org.apache.thrift.meta_data.FieldMetaData("reload", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRegionLocation_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(modifyNamespace_result.class, metaDataMap); } - public getRegionLocation_args() { + public modifyNamespace_result() { } - public getRegionLocation_args( - ByteBuffer table, - ByteBuffer row, - boolean reload) + public modifyNamespace_result( + TIOError io) { this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.row = org.apache.thrift.TBaseHelper.copyBinary(row); - this.reload = reload; - setReloadIsSet(true); + this.io = io; } /** * Performs a deep copy on other. */ - public getRegionLocation_args(getRegionLocation_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetRow()) { - this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); + public modifyNamespace_result(modifyNamespace_result other) { + if (other.isSetIo()) { + this.io = new TIOError(other.io); } - this.reload = other.reload; } - public getRegionLocation_args deepCopy() { - return new getRegionLocation_args(this); + public modifyNamespace_result deepCopy() { + return new modifyNamespace_result(this); } @Override public void clear() { - this.table = null; - this.row = null; - setReloadIsSet(false); - this.reload = false; - } - - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); - } - - public getRegionLocation_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; - } - - public getRegionLocation_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; - } - - public void unsetTable() { - this.table = null; - } - - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; - } - - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } - } - - public byte[] getRow() { - setRow(org.apache.thrift.TBaseHelper.rightSize(row)); - return row == null ? null : row.array(); - } - - public ByteBuffer bufferForRow() { - return org.apache.thrift.TBaseHelper.copyBinary(row); + this.io = null; } - public getRegionLocation_args setRow(byte[] row) { - this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length)); - return this; + public TIOError getIo() { + return this.io; } - public getRegionLocation_args setRow(ByteBuffer row) { - this.row = org.apache.thrift.TBaseHelper.copyBinary(row); + public modifyNamespace_result setIo(TIOError io) { + this.io = io; return this; } - public void unsetRow() { - this.row = null; + public void unsetIo() { + this.io = null; } - /** Returns true if field row is set (has been assigned a value) and false otherwise */ - public boolean isSetRow() { - return this.row != null; + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; } - public void setRowIsSet(boolean value) { + public void setIoIsSet(boolean value) { if (!value) { - this.row = null; + this.io = null; } } - public boolean isReload() { - return this.reload; - } - - public getRegionLocation_args setReload(boolean reload) { - this.reload = reload; - setReloadIsSet(true); - return this; - } - - public void unsetReload() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RELOAD_ISSET_ID); - } - - /** Returns true if field reload is set (has been assigned a value) and false otherwise */ - public boolean isSetReload() { - return EncodingUtils.testBit(__isset_bitfield, __RELOAD_ISSET_ID); - } - - public void setReloadIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELOAD_ISSET_ID, value); - } - public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; - - case ROW: - if (value == null) { - unsetRow(); - } else { - setRow((ByteBuffer)value); - } - break; - - case RELOAD: + case IO: if (value == null) { - unsetReload(); + unsetIo(); } else { - setReload((Boolean)value); + setIo((TIOError)value); } break; @@ -21165,14 +49167,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); - - case ROW: - return getRow(); - - case RELOAD: - return isReload(); + case IO: + return getIo(); } throw new IllegalStateException(); @@ -21185,12 +49181,8 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); - case ROW: - return isSetRow(); - case RELOAD: - return isSetReload(); + case IO: + return isSetIo(); } throw new IllegalStateException(); } @@ -21199,39 +49191,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getRegionLocation_args) - return this.equals((getRegionLocation_args)that); + if (that instanceof modifyNamespace_result) + return this.equals((modifyNamespace_result)that); return false; } - public boolean equals(getRegionLocation_args that) { + public boolean equals(modifyNamespace_result that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; - } - - boolean this_present_row = true && this.isSetRow(); - boolean that_present_row = true && that.isSetRow(); - if (this_present_row || that_present_row) { - if (!(this_present_row && that_present_row)) - return false; - if (!this.row.equals(that.row)) - return false; - } - - boolean this_present_reload = true; - boolean that_present_reload = true; - if (this_present_reload || that_present_reload) { - if (!(this_present_reload && that_present_reload)) + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) return false; - if (this.reload != that.reload) + if (!this.io.equals(that.io)) return false; } @@ -21242,58 +49216,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - boolean present_row = true && (isSetRow()); - list.add(present_row); - if (present_row) - list.add(row); - - boolean present_reload = true; - list.add(present_reload); - if (present_reload) - list.add(reload); + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); return list.hashCode(); } @Override - public int compareTo(getRegionLocation_args other) { + public int compareTo(modifyNamespace_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRow()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetReload()).compareTo(other.isSetReload()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); if (lastComparison != 0) { return lastComparison; } - if (isSetReload()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reload, other.reload); + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); if (lastComparison != 0) { return lastComparison; } @@ -21311,44 +49255,26 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getRegionLocation_args("); + StringBuilder sb = new StringBuilder("modifyNamespace_result("); boolean first = true; - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("row:"); - if (this.row == null) { + sb.append("io:"); + if (this.io == null) { sb.append("null"); } else { - org.apache.thrift.TBaseHelper.toString(this.row, sb); + sb.append(this.io); } first = false; - if (!first) sb.append(", "); - sb.append("reload:"); - sb.append(this.reload); - first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (row == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString()); - } // check for sub-struct validity } @@ -21362,23 +49288,21 @@ public class THBaseService { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class getRegionLocation_argsStandardSchemeFactory implements SchemeFactory { - public getRegionLocation_argsStandardScheme getScheme() { - return new getRegionLocation_argsStandardScheme(); + private static class modifyNamespace_resultStandardSchemeFactory implements SchemeFactory { + public modifyNamespace_resultStandardScheme getScheme() { + return new modifyNamespace_resultStandardScheme(); } } - private static class getRegionLocation_argsStandardScheme extends StandardScheme { + private static class modifyNamespace_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getRegionLocation_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, modifyNamespace_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -21388,26 +49312,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // ROW - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.row = iprot.readBinary(); - struct.setRowIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // RELOAD - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.reload = iprot.readBool(); - struct.setReloadIsSet(true); + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -21423,88 +49332,72 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getRegionLocation_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, modifyNamespace_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.row != null) { - oprot.writeFieldBegin(ROW_FIELD_DESC); - oprot.writeBinary(struct.row); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(RELOAD_FIELD_DESC); - oprot.writeBool(struct.reload); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getRegionLocation_argsTupleSchemeFactory implements SchemeFactory { - public getRegionLocation_argsTupleScheme getScheme() { - return new getRegionLocation_argsTupleScheme(); + private static class modifyNamespace_resultTupleSchemeFactory implements SchemeFactory { + public modifyNamespace_resultTupleScheme getScheme() { + return new modifyNamespace_resultTupleScheme(); } } - private static class getRegionLocation_argsTupleScheme extends TupleScheme { + private static class modifyNamespace_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, modifyNamespace_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - oprot.writeBinary(struct.row); BitSet optionals = new BitSet(); - if (struct.isSetReload()) { + if (struct.isSetIo()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.isSetReload()) { - oprot.writeBool(struct.reload); + if (struct.isSetIo()) { + struct.io.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, modifyNamespace_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - struct.row = iprot.readBinary(); - struct.setRowIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.reload = iprot.readBool(); - struct.setReloadIsSet(true); + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); } } } } - public static class getRegionLocation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRegionLocation_result"); + public static class deleteNamespace_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteNamespace_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getRegionLocation_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getRegionLocation_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new deleteNamespace_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteNamespace_argsTupleSchemeFactory()); } - public THRegionLocation success; // required - public TIOError io; // required + public String name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - IO((short)1, "io"); + NAME((short)1, "name"); private static final Map byName = new HashMap(); @@ -21519,10 +49412,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // IO - return IO; + case 1: // NAME + return NAME; default: return null; } @@ -21566,111 +49457,71 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THRegionLocation.class))); - tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRegionLocation_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteNamespace_args.class, metaDataMap); } - public getRegionLocation_result() { + public deleteNamespace_args() { } - public getRegionLocation_result( - THRegionLocation success, - TIOError io) + public deleteNamespace_args( + String name) { this(); - this.success = success; - this.io = io; + this.name = name; } /** * Performs a deep copy on other. */ - public getRegionLocation_result(getRegionLocation_result other) { - if (other.isSetSuccess()) { - this.success = new THRegionLocation(other.success); - } - if (other.isSetIo()) { - this.io = new TIOError(other.io); + public deleteNamespace_args(deleteNamespace_args other) { + if (other.isSetName()) { + this.name = other.name; } } - public getRegionLocation_result deepCopy() { - return new getRegionLocation_result(this); + public deleteNamespace_args deepCopy() { + return new deleteNamespace_args(this); } @Override public void clear() { - this.success = null; - this.io = null; - } - - public THRegionLocation getSuccess() { - return this.success; - } - - public getRegionLocation_result setSuccess(THRegionLocation success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + this.name = null; } - public TIOError getIo() { - return this.io; + public String getName() { + return this.name; } - public getRegionLocation_result setIo(TIOError io) { - this.io = io; + public deleteNamespace_args setName(String name) { + this.name = name; return this; } - public void unsetIo() { - this.io = null; + public void unsetName() { + this.name = null; } - /** Returns true if field io is set (has been assigned a value) and false otherwise */ - public boolean isSetIo() { - return this.io != null; + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; } - public void setIoIsSet(boolean value) { + public void setNameIsSet(boolean value) { if (!value) { - this.io = null; + this.name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((THRegionLocation)value); - } - break; - - case IO: + case NAME: if (value == null) { - unsetIo(); + unsetName(); } else { - setIo((TIOError)value); + setName((String)value); } break; @@ -21679,11 +49530,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - - case IO: - return getIo(); + case NAME: + return getName(); } throw new IllegalStateException(); @@ -21696,10 +49544,8 @@ public class THBaseService { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case IO: - return isSetIo(); + case NAME: + return isSetName(); } throw new IllegalStateException(); } @@ -21708,30 +49554,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getRegionLocation_result) - return this.equals((getRegionLocation_result)that); + if (that instanceof deleteNamespace_args) + return this.equals((deleteNamespace_args)that); return false; } - public boolean equals(getRegionLocation_result that) { + public boolean equals(deleteNamespace_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_io = true && this.isSetIo(); - boolean that_present_io = true && that.isSetIo(); - if (this_present_io || that_present_io) { - if (!(this_present_io && that_present_io)) + 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; - if (!this.io.equals(that.io)) + if (!this.name.equals(that.name)) return false; } @@ -21742,43 +49579,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_io = true && (isSetIo()); - list.add(present_io); - if (present_io) - list.add(io); + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); return list.hashCode(); } @Override - public int compareTo(getRegionLocation_result other) { + public int compareTo(deleteNamespace_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } - if (isSetIo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { return lastComparison; } @@ -21796,26 +49618,18 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getRegionLocation_result("); + StringBuilder sb = new StringBuilder("deleteNamespace_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("io:"); - if (this.io == null) { + sb.append("name:"); + if (this.name == null) { sb.append("null"); } else { - sb.append(this.io); + sb.append(this.name); } first = false; sb.append(")"); @@ -21824,10 +49638,10 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); + if (name == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); } + // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -21846,15 +49660,15 @@ public class THBaseService { } } - private static class getRegionLocation_resultStandardSchemeFactory implements SchemeFactory { - public getRegionLocation_resultStandardScheme getScheme() { - return new getRegionLocation_resultStandardScheme(); + private static class deleteNamespace_argsStandardSchemeFactory implements SchemeFactory { + public deleteNamespace_argsStandardScheme getScheme() { + return new deleteNamespace_argsStandardScheme(); } } - private static class getRegionLocation_resultStandardScheme extends StandardScheme { + private static class deleteNamespace_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getRegionLocation_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteNamespace_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -21864,20 +49678,10 @@ public class THBaseService { break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new THRegionLocation(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // IO - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -21893,18 +49697,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getRegionLocation_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteNamespace_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.io != null) { - oprot.writeFieldBegin(IO_FIELD_DESC); - struct.io.write(oprot); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -21913,68 +49712,46 @@ public class THBaseService { } - private static class getRegionLocation_resultTupleSchemeFactory implements SchemeFactory { - public getRegionLocation_resultTupleScheme getScheme() { - return new getRegionLocation_resultTupleScheme(); + private static class deleteNamespace_argsTupleSchemeFactory implements SchemeFactory { + public deleteNamespace_argsTupleScheme getScheme() { + return new deleteNamespace_argsTupleScheme(); } } - private static class getRegionLocation_resultTupleScheme extends TupleScheme { + private static class deleteNamespace_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, deleteNamespace_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetIo()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetIo()) { - struct.io.write(oprot); - } + oprot.writeString(struct.name); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getRegionLocation_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, deleteNamespace_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new THRegionLocation(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); - } + struct.name = iprot.readString(); + struct.setNameIsSet(true); } } } - public static class getAllRegionLocations_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllRegionLocations_args"); + public static class deleteNamespace_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteNamespace_result"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getAllRegionLocations_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAllRegionLocations_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new deleteNamespace_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteNamespace_resultTupleSchemeFactory()); } - public ByteBuffer table; // required + public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TABLE((short)1, "table"); + IO((short)1, "io"); private static final Map byName = new HashMap(); @@ -21989,8 +49766,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; + case 1: // IO + return IO; default: return null; } @@ -22034,81 +49811,71 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllRegionLocations_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteNamespace_result.class, metaDataMap); } - public getAllRegionLocations_args() { + public deleteNamespace_result() { } - public getAllRegionLocations_args( - ByteBuffer table) + public deleteNamespace_result( + TIOError io) { this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + this.io = io; } /** * Performs a deep copy on other. */ - public getAllRegionLocations_args(getAllRegionLocations_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); + public deleteNamespace_result(deleteNamespace_result other) { + if (other.isSetIo()) { + this.io = new TIOError(other.io); } } - public getAllRegionLocations_args deepCopy() { - return new getAllRegionLocations_args(this); + public deleteNamespace_result deepCopy() { + return new deleteNamespace_result(this); } @Override public void clear() { - this.table = null; - } - - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); + this.io = null; } - public getAllRegionLocations_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; + public TIOError getIo() { + return this.io; } - public getAllRegionLocations_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); + public deleteNamespace_result setIo(TIOError io) { + this.io = io; return this; } - public void unsetTable() { - this.table = null; + public void unsetIo() { + this.io = null; } - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; } - public void setTableIsSet(boolean value) { + public void setIoIsSet(boolean value) { if (!value) { - this.table = null; + this.io = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLE: + case IO: if (value == null) { - unsetTable(); + unsetIo(); } else { - setTable((ByteBuffer)value); + setIo((TIOError)value); } break; @@ -22117,8 +49884,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case TABLE: - return getTable(); + case IO: + return getIo(); } throw new IllegalStateException(); @@ -22131,8 +49898,8 @@ public class THBaseService { } switch (field) { - case TABLE: - return isSetTable(); + case IO: + return isSetIo(); } throw new IllegalStateException(); } @@ -22141,21 +49908,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getAllRegionLocations_args) - return this.equals((getAllRegionLocations_args)that); + if (that instanceof deleteNamespace_result) + return this.equals((deleteNamespace_result)that); return false; } - public boolean equals(getAllRegionLocations_args that) { + public boolean equals(deleteNamespace_result that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) return false; - if (!this.table.equals(that.table)) + if (!this.io.equals(that.io)) return false; } @@ -22166,28 +49933,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); return list.hashCode(); } @Override - public int compareTo(getAllRegionLocations_args other) { + public int compareTo(deleteNamespace_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); if (lastComparison != 0) { return lastComparison; } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); if (lastComparison != 0) { return lastComparison; } @@ -22205,18 +49972,18 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getAllRegionLocations_args("); + StringBuilder sb = new StringBuilder("deleteNamespace_result("); boolean first = true; - sb.append("table:"); - if (this.table == null) { + sb.append("io:"); + if (this.io == null) { sb.append("null"); } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); + sb.append(this.io); } first = false; sb.append(")"); @@ -22225,9 +49992,6 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } // check for sub-struct validity } @@ -22247,15 +50011,15 @@ public class THBaseService { } } - private static class getAllRegionLocations_argsStandardSchemeFactory implements SchemeFactory { - public getAllRegionLocations_argsStandardScheme getScheme() { - return new getAllRegionLocations_argsStandardScheme(); + private static class deleteNamespace_resultStandardSchemeFactory implements SchemeFactory { + public deleteNamespace_resultStandardScheme getScheme() { + return new deleteNamespace_resultStandardScheme(); } } - private static class getAllRegionLocations_argsStandardScheme extends StandardScheme { + private static class deleteNamespace_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getAllRegionLocations_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteNamespace_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -22265,10 +50029,11 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -22284,13 +50049,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getAllRegionLocations_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteNamespace_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -22299,49 +50064,57 @@ public class THBaseService { } - private static class getAllRegionLocations_argsTupleSchemeFactory implements SchemeFactory { - public getAllRegionLocations_argsTupleScheme getScheme() { - return new getAllRegionLocations_argsTupleScheme(); + private static class deleteNamespace_resultTupleSchemeFactory implements SchemeFactory { + public deleteNamespace_resultTupleScheme getScheme() { + return new deleteNamespace_resultTupleScheme(); } } - private static class getAllRegionLocations_argsTupleScheme extends TupleScheme { + private static class deleteNamespace_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAllRegionLocations_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, deleteNamespace_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAllRegionLocations_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, deleteNamespace_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } } } } - public static class getAllRegionLocations_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllRegionLocations_result"); + public static class getNamespaceDescriptor_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNamespaceDescriptor_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getAllRegionLocations_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAllRegionLocations_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getNamespaceDescriptor_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getNamespaceDescriptor_argsTupleSchemeFactory()); } - public List success; // required - public TIOError io; // required + public String name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - IO((short)1, "io"); + NAME((short)1, "name"); private static final Map byName = new HashMap(); @@ -22356,10 +50129,8 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // IO - return IO; + case 1: // NAME + return NAME; default: return null; } @@ -22391,143 +50162,83 @@ public class THBaseService { } public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THRegionLocation.class)))); - tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllRegionLocations_result.class, metaDataMap); - } - - public getAllRegionLocations_result() { - } - - public getAllRegionLocations_result( - List success, - TIOError io) - { - this(); - this.success = success; - this.io = io; - } - - /** - * Performs a deep copy on other. - */ - public getAllRegionLocations_result(getAllRegionLocations_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (THRegionLocation other_element : other.success) { - __this__success.add(new THRegionLocation(other_element)); - } - this.success = __this__success; - } - if (other.isSetIo()) { - this.io = new TIOError(other.io); + return _thriftId; } - } - public getAllRegionLocations_result deepCopy() { - return new getAllRegionLocations_result(this); + public String getFieldName() { + return _fieldName; + } } - @Override - public void clear() { - this.success = null; - this.io = null; + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNamespaceDescriptor_args.class, metaDataMap); } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public getNamespaceDescriptor_args() { } - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); + public getNamespaceDescriptor_args( + String name) + { + this(); + this.name = name; } - public void addToSuccess(THRegionLocation elem) { - if (this.success == null) { - this.success = new ArrayList(); + /** + * Performs a deep copy on other. + */ + public getNamespaceDescriptor_args(getNamespaceDescriptor_args other) { + if (other.isSetName()) { + this.name = other.name; } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public getAllRegionLocations_result setSuccess(List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; } - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + public getNamespaceDescriptor_args deepCopy() { + return new getNamespaceDescriptor_args(this); } - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + @Override + public void clear() { + this.name = null; } - public TIOError getIo() { - return this.io; + public String getName() { + return this.name; } - public getAllRegionLocations_result setIo(TIOError io) { - this.io = io; + public getNamespaceDescriptor_args setName(String name) { + this.name = name; return this; } - public void unsetIo() { - this.io = null; + public void unsetName() { + this.name = null; } - /** Returns true if field io is set (has been assigned a value) and false otherwise */ - public boolean isSetIo() { - return this.io != null; + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; } - public void setIoIsSet(boolean value) { + public void setNameIsSet(boolean value) { if (!value) { - this.io = null; + this.name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case IO: + case NAME: if (value == null) { - unsetIo(); + unsetName(); } else { - setIo((TIOError)value); + setName((String)value); } break; @@ -22536,11 +50247,8 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - - case IO: - return getIo(); + case NAME: + return getName(); } throw new IllegalStateException(); @@ -22553,10 +50261,8 @@ public class THBaseService { } switch (field) { - case SUCCESS: - return isSetSuccess(); - case IO: - return isSetIo(); + case NAME: + return isSetName(); } throw new IllegalStateException(); } @@ -22565,30 +50271,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getAllRegionLocations_result) - return this.equals((getAllRegionLocations_result)that); + if (that instanceof getNamespaceDescriptor_args) + return this.equals((getNamespaceDescriptor_args)that); return false; } - public boolean equals(getAllRegionLocations_result that) { + public boolean equals(getNamespaceDescriptor_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_io = true && this.isSetIo(); - boolean that_present_io = true && that.isSetIo(); - if (this_present_io || that_present_io) { - if (!(this_present_io && that_present_io)) + 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; - if (!this.io.equals(that.io)) + if (!this.name.equals(that.name)) return false; } @@ -22599,43 +50296,28 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_io = true && (isSetIo()); - list.add(present_io); - if (present_io) - list.add(io); + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); return list.hashCode(); } @Override - public int compareTo(getAllRegionLocations_result other) { + public int compareTo(getNamespaceDescriptor_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } - if (isSetIo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { return lastComparison; } @@ -22653,26 +50335,18 @@ public class THBaseService { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } + } @Override public String toString() { - StringBuilder sb = new StringBuilder("getAllRegionLocations_result("); + StringBuilder sb = new StringBuilder("getNamespaceDescriptor_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("io:"); - if (this.io == null) { + sb.append("name:"); + if (this.name == null) { sb.append("null"); } else { - sb.append(this.io); + sb.append(this.name); } first = false; sb.append(")"); @@ -22681,6 +50355,9 @@ public class THBaseService { public void validate() throws org.apache.thrift.TException { // check for required fields + if (name == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); + } // check for sub-struct validity } @@ -22700,15 +50377,15 @@ public class THBaseService { } } - private static class getAllRegionLocations_resultStandardSchemeFactory implements SchemeFactory { - public getAllRegionLocations_resultStandardScheme getScheme() { - return new getAllRegionLocations_resultStandardScheme(); + private static class getNamespaceDescriptor_argsStandardSchemeFactory implements SchemeFactory { + public getNamespaceDescriptor_argsStandardScheme getScheme() { + return new getNamespaceDescriptor_argsStandardScheme(); } } - private static class getAllRegionLocations_resultStandardScheme extends StandardScheme { + private static class getNamespaceDescriptor_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getAllRegionLocations_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getNamespaceDescriptor_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -22718,30 +50395,10 @@ public class THBaseService { break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list214 = iprot.readListBegin(); - struct.success = new ArrayList(_list214.size); - THRegionLocation _elem215; - for (int _i216 = 0; _i216 < _list214.size; ++_i216) - { - _elem215 = new THRegionLocation(); - _elem215.read(iprot); - struct.success.add(_elem215); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // IO - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -22757,25 +50414,13 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getAllRegionLocations_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getNamespaceDescriptor_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (THRegionLocation _iter217 : struct.success) - { - _iter217.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.io != null) { - oprot.writeFieldBegin(IO_FIELD_DESC); - struct.io.write(oprot); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -22784,149 +50429,49 @@ public class THBaseService { } - private static class getAllRegionLocations_resultTupleSchemeFactory implements SchemeFactory { - public getAllRegionLocations_resultTupleScheme getScheme() { - return new getAllRegionLocations_resultTupleScheme(); + private static class getNamespaceDescriptor_argsTupleSchemeFactory implements SchemeFactory { + public getNamespaceDescriptor_argsTupleScheme getScheme() { + return new getNamespaceDescriptor_argsTupleScheme(); } } - private static class getAllRegionLocations_resultTupleScheme extends TupleScheme { + private static class getNamespaceDescriptor_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAllRegionLocations_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getNamespaceDescriptor_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetIo()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (THRegionLocation _iter218 : struct.success) - { - _iter218.write(oprot); - } - } - } - if (struct.isSetIo()) { - struct.io.write(oprot); - } + oprot.writeString(struct.name); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAllRegionLocations_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getNamespaceDescriptor_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list219 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list219.size); - THRegionLocation _elem220; - for (int _i221 = 0; _i221 < _list219.size; ++_i221) - { - _elem220 = new THRegionLocation(); - _elem220.read(iprot); - struct.success.add(_elem220); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.io = new TIOError(); - struct.io.read(iprot); - struct.setIoIsSet(true); - } + struct.name = iprot.readString(); + struct.setNameIsSet(true); } } } - public static class checkAndMutate_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndMutate_args"); + public static class getNamespaceDescriptor_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNamespaceDescriptor_result"); - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField COMPARE_OP_FIELD_DESC = new org.apache.thrift.protocol.TField("compareOp", org.apache.thrift.protocol.TType.I32, (short)5); - private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField ROW_MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("rowMutations", org.apache.thrift.protocol.TType.STRUCT, (short)7); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new checkAndMutate_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new checkAndMutate_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getNamespaceDescriptor_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getNamespaceDescriptor_resultTupleSchemeFactory()); } - /** - * to check in and delete from - */ - public ByteBuffer table; // required - /** - * row to check - */ - public ByteBuffer row; // required - /** - * column family to check - */ - public ByteBuffer family; // required - /** - * column qualifier to check - */ - public ByteBuffer qualifier; // required - /** - * comparison to make on the value - * - * @see TCompareOp - */ - public TCompareOp compareOp; // required - /** - * the expected value to be compared against, if not provided the - * check is for the non-existence of the column in question - */ - public ByteBuffer value; // required - /** - * row mutations to execute if the value matches - */ - public TRowMutations rowMutations; // required + public TNamespaceDescriptor success; // required + public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * to check in and delete from - */ - TABLE((short)1, "table"), - /** - * row to check - */ - ROW((short)2, "row"), - /** - * column family to check - */ - FAMILY((short)3, "family"), - /** - * column qualifier to check - */ - QUALIFIER((short)4, "qualifier"), - /** - * comparison to make on the value - * - * @see TCompareOp - */ - COMPARE_OP((short)5, "compareOp"), - /** - * the expected value to be compared against, if not provided the - * check is for the non-existence of the column in question - */ - VALUE((short)6, "value"), - /** - * row mutations to execute if the value matches - */ - ROW_MUTATIONS((short)7, "rowMutations"); + SUCCESS((short)0, "success"), + IO((short)1, "io"); private static final Map byName = new HashMap(); @@ -22941,20 +50486,10 @@ public class THBaseService { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE - return TABLE; - case 2: // ROW - return ROW; - case 3: // FAMILY - return FAMILY; - case 4: // QUALIFIER - return QUALIFIER; - case 5: // COMPARE_OP - return COMPARE_OP; - case 6: // VALUE - return VALUE; - case 7: // ROW_MUTATIONS - return ROW_MUTATIONS; + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; default: return null; } @@ -22998,463 +50533,507 @@ public class THBaseService { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.FAMILY, new org.apache.thrift.meta_data.FieldMetaData("family", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.COMPARE_OP, new org.apache.thrift.meta_data.FieldMetaData("compareOp", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TCompareOp.class))); - tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.ROW_MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("rowMutations", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowMutations.class))); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNamespaceDescriptor.class))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndMutate_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNamespaceDescriptor_result.class, metaDataMap); } - public checkAndMutate_args() { + public getNamespaceDescriptor_result() { } - public checkAndMutate_args( - ByteBuffer table, - ByteBuffer row, - ByteBuffer family, - ByteBuffer qualifier, - TCompareOp compareOp, - ByteBuffer value, - TRowMutations rowMutations) + public getNamespaceDescriptor_result( + TNamespaceDescriptor success, + TIOError io) { this(); - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - this.row = org.apache.thrift.TBaseHelper.copyBinary(row); - this.family = org.apache.thrift.TBaseHelper.copyBinary(family); - this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); - this.compareOp = compareOp; - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - this.rowMutations = rowMutations; + this.success = success; + this.io = io; } /** * Performs a deep copy on other. */ - public checkAndMutate_args(checkAndMutate_args other) { - if (other.isSetTable()) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table); - } - if (other.isSetRow()) { - this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); - } - if (other.isSetFamily()) { - this.family = org.apache.thrift.TBaseHelper.copyBinary(other.family); - } - if (other.isSetQualifier()) { - this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier); - } - if (other.isSetCompareOp()) { - this.compareOp = other.compareOp; - } - if (other.isSetValue()) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); - } - if (other.isSetRowMutations()) { - this.rowMutations = new TRowMutations(other.rowMutations); - } - } - - public checkAndMutate_args deepCopy() { - return new checkAndMutate_args(this); - } - - @Override - public void clear() { - this.table = null; - this.row = null; - this.family = null; - this.qualifier = null; - this.compareOp = null; - this.value = null; - this.rowMutations = null; - } - - /** - * to check in and delete from - */ - public byte[] getTable() { - setTable(org.apache.thrift.TBaseHelper.rightSize(table)); - return table == null ? null : table.array(); - } - - public ByteBuffer bufferForTable() { - return org.apache.thrift.TBaseHelper.copyBinary(table); - } - - /** - * to check in and delete from - */ - public checkAndMutate_args setTable(byte[] table) { - this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length)); - return this; - } - - public checkAndMutate_args setTable(ByteBuffer table) { - this.table = org.apache.thrift.TBaseHelper.copyBinary(table); - return this; - } - - public void unsetTable() { - this.table = null; - } - - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; - } - - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } - } - - /** - * row to check - */ - public byte[] getRow() { - setRow(org.apache.thrift.TBaseHelper.rightSize(row)); - return row == null ? null : row.array(); - } - - public ByteBuffer bufferForRow() { - return org.apache.thrift.TBaseHelper.copyBinary(row); - } - - /** - * row to check - */ - public checkAndMutate_args setRow(byte[] row) { - this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length)); - return this; - } - - public checkAndMutate_args setRow(ByteBuffer row) { - this.row = org.apache.thrift.TBaseHelper.copyBinary(row); - return this; - } - - public void unsetRow() { - this.row = null; - } - - /** Returns true if field row is set (has been assigned a value) and false otherwise */ - public boolean isSetRow() { - return this.row != null; - } - - public void setRowIsSet(boolean value) { - if (!value) { - this.row = null; + public getNamespaceDescriptor_result(getNamespaceDescriptor_result other) { + if (other.isSetSuccess()) { + this.success = new TNamespaceDescriptor(other.success); } - } - - /** - * column family to check - */ - public byte[] getFamily() { - setFamily(org.apache.thrift.TBaseHelper.rightSize(family)); - return family == null ? null : family.array(); - } - - public ByteBuffer bufferForFamily() { - return org.apache.thrift.TBaseHelper.copyBinary(family); - } - - /** - * column family to check - */ - public checkAndMutate_args setFamily(byte[] family) { - this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length)); - return this; - } - - public checkAndMutate_args setFamily(ByteBuffer family) { - this.family = org.apache.thrift.TBaseHelper.copyBinary(family); - return this; - } - - public void unsetFamily() { - this.family = null; - } - - /** Returns true if field family is set (has been assigned a value) and false otherwise */ - public boolean isSetFamily() { - return this.family != null; - } - - public void setFamilyIsSet(boolean value) { - if (!value) { - this.family = null; + if (other.isSetIo()) { + this.io = new TIOError(other.io); } } - /** - * column qualifier to check - */ - public byte[] getQualifier() { - setQualifier(org.apache.thrift.TBaseHelper.rightSize(qualifier)); - return qualifier == null ? null : qualifier.array(); + public getNamespaceDescriptor_result deepCopy() { + return new getNamespaceDescriptor_result(this); } - public ByteBuffer bufferForQualifier() { - return org.apache.thrift.TBaseHelper.copyBinary(qualifier); + @Override + public void clear() { + this.success = null; + this.io = null; } - /** - * column qualifier to check - */ - public checkAndMutate_args setQualifier(byte[] qualifier) { - this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length)); - return this; + public TNamespaceDescriptor getSuccess() { + return this.success; } - public checkAndMutate_args setQualifier(ByteBuffer qualifier) { - this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); + public getNamespaceDescriptor_result setSuccess(TNamespaceDescriptor success) { + this.success = success; return this; } - public void unsetQualifier() { - this.qualifier = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field qualifier is set (has been assigned a value) and false otherwise */ - public boolean isSetQualifier() { - return this.qualifier != null; + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setQualifierIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.qualifier = null; + this.success = null; } } - /** - * comparison to make on the value - * - * @see TCompareOp - */ - public TCompareOp getCompareOp() { - return this.compareOp; + public TIOError getIo() { + return this.io; } - /** - * comparison to make on the value - * - * @see TCompareOp - */ - public checkAndMutate_args setCompareOp(TCompareOp compareOp) { - this.compareOp = compareOp; + public getNamespaceDescriptor_result setIo(TIOError io) { + this.io = io; return this; } - public void unsetCompareOp() { - this.compareOp = null; + public void unsetIo() { + this.io = null; } - /** Returns true if field compareOp is set (has been assigned a value) and false otherwise */ - public boolean isSetCompareOp() { - return this.compareOp != null; + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; } - public void setCompareOpIsSet(boolean value) { + public void setIoIsSet(boolean value) { if (!value) { - this.compareOp = null; + this.io = null; } } - /** - * the expected value to be compared against, if not provided the - * check is for the non-existence of the column in question - */ - public byte[] getValue() { - setValue(org.apache.thrift.TBaseHelper.rightSize(value)); - return value == null ? null : value.array(); + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TNamespaceDescriptor)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((TIOError)value); + } + break; + + } } - public ByteBuffer bufferForValue() { - return org.apache.thrift.TBaseHelper.copyBinary(value); + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); } - /** - * the expected value to be compared against, if not provided the - * check is for the non-existence of the column in question - */ - public checkAndMutate_args setValue(byte[] value) { - this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length)); - return this; + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); } - public checkAndMutate_args setValue(ByteBuffer value) { - this.value = org.apache.thrift.TBaseHelper.copyBinary(value); - return this; + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getNamespaceDescriptor_result) + return this.equals((getNamespaceDescriptor_result)that); + return false; } - public void unsetValue() { - this.value = null; + public boolean equals(getNamespaceDescriptor_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; } - /** Returns true if field value is set (has been assigned a value) and false otherwise */ - public boolean isSetValue() { - return this.value != null; + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_io = true && (isSetIo()); + list.add(present_io); + if (present_io) + list.add(io); + + return list.hashCode(); } - public void setValueIsSet(boolean value) { - if (!value) { - this.value = null; + @Override + public int compareTo(getNamespaceDescriptor_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(other.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, other.io); + if (lastComparison != 0) { + return lastComparison; + } } + return 0; } - /** - * row mutations to execute if the value matches - */ - public TRowMutations getRowMutations() { - return this.rowMutations; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); } - /** - * row mutations to execute if the value matches - */ - public checkAndMutate_args setRowMutations(TRowMutations rowMutations) { - this.rowMutations = rowMutations; - return this; + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } - public void unsetRowMutations() { - this.rowMutations = null; + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getNamespaceDescriptor_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); } - /** Returns true if field rowMutations is set (has been assigned a value) and false otherwise */ - public boolean isSetRowMutations() { - return this.rowMutations != null; + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } } - public void setRowMutationsIsSet(boolean value) { - if (!value) { - this.rowMutations = null; + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); } } - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((ByteBuffer)value); - } - break; + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } - case ROW: - if (value == null) { - unsetRow(); - } else { - setRow((ByteBuffer)value); + private static class getNamespaceDescriptor_resultStandardSchemeFactory implements SchemeFactory { + public getNamespaceDescriptor_resultStandardScheme getScheme() { + return new getNamespaceDescriptor_resultStandardScheme(); + } + } + + private static class getNamespaceDescriptor_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getNamespaceDescriptor_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TNamespaceDescriptor(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); } - break; + iprot.readStructEnd(); - case FAMILY: - if (value == null) { - unsetFamily(); - } else { - setFamily((ByteBuffer)value); + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getNamespaceDescriptor_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); } - break; + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } - case QUALIFIER: - if (value == null) { - unsetQualifier(); - } else { - setQualifier((ByteBuffer)value); + } + + private static class getNamespaceDescriptor_resultTupleSchemeFactory implements SchemeFactory { + public getNamespaceDescriptor_resultTupleScheme getScheme() { + return new getNamespaceDescriptor_resultTupleScheme(); + } + } + + private static class getNamespaceDescriptor_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getNamespaceDescriptor_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); } - break; + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } - case COMPARE_OP: - if (value == null) { - unsetCompareOp(); - } else { - setCompareOp((TCompareOp)value); + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getNamespaceDescriptor_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new TNamespaceDescriptor(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); } - break; + if (incoming.get(1)) { + struct.io = new TIOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } - case VALUE: - if (value == null) { - unsetValue(); - } else { - setValue((ByteBuffer)value); + } + + public static class listNamespaceDescriptors_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("listNamespaceDescriptors_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new listNamespaceDescriptors_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new listNamespaceDescriptors_argsTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); } - break; + } - case ROW_MUTATIONS: - if (value == null) { - unsetRowMutations(); - } else { - setRowMutations((TRowMutations)value); + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; } - break; + } + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; } - } - public Object getFieldValue(_Fields field) { - switch (field) { - case TABLE: - return getTable(); + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } - case ROW: - return getRow(); + private final short _thriftId; + private final String _fieldName; - case FAMILY: - return getFamily(); + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } - case QUALIFIER: - return getQualifier(); + public short getThriftFieldId() { + return _thriftId; + } - case COMPARE_OP: - return getCompareOp(); + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listNamespaceDescriptors_args.class, metaDataMap); + } - case VALUE: - return getValue(); + public listNamespaceDescriptors_args() { + } - case ROW_MUTATIONS: - return getRowMutations(); + /** + * Performs a deep copy on other. + */ + public listNamespaceDescriptors_args(listNamespaceDescriptors_args other) { + } - } - throw new IllegalStateException(); + public listNamespaceDescriptors_args deepCopy() { + return new listNamespaceDescriptors_args(this); } - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); } switch (field) { - case TABLE: - return isSetTable(); - case ROW: - return isSetRow(); - case FAMILY: - return isSetFamily(); - case QUALIFIER: - return isSetQualifier(); - case COMPARE_OP: - return isSetCompareOp(); - case VALUE: - return isSetValue(); - case ROW_MUTATIONS: - return isSetRowMutations(); } throw new IllegalStateException(); } @@ -23463,78 +51042,15 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof checkAndMutate_args) - return this.equals((checkAndMutate_args)that); + if (that instanceof listNamespaceDescriptors_args) + return this.equals((listNamespaceDescriptors_args)that); return false; } - public boolean equals(checkAndMutate_args that) { + public boolean equals(listNamespaceDescriptors_args that) { if (that == null) return false; - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; - } - - boolean this_present_row = true && this.isSetRow(); - boolean that_present_row = true && that.isSetRow(); - if (this_present_row || that_present_row) { - if (!(this_present_row && that_present_row)) - return false; - if (!this.row.equals(that.row)) - return false; - } - - boolean this_present_family = true && this.isSetFamily(); - boolean that_present_family = true && that.isSetFamily(); - if (this_present_family || that_present_family) { - if (!(this_present_family && that_present_family)) - return false; - if (!this.family.equals(that.family)) - return false; - } - - boolean this_present_qualifier = true && this.isSetQualifier(); - boolean that_present_qualifier = true && that.isSetQualifier(); - if (this_present_qualifier || that_present_qualifier) { - if (!(this_present_qualifier && that_present_qualifier)) - return false; - if (!this.qualifier.equals(that.qualifier)) - return false; - } - - boolean this_present_compareOp = true && this.isSetCompareOp(); - boolean that_present_compareOp = true && that.isSetCompareOp(); - if (this_present_compareOp || that_present_compareOp) { - if (!(this_present_compareOp && that_present_compareOp)) - return false; - if (!this.compareOp.equals(that.compareOp)) - return false; - } - - 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; - if (!this.value.equals(that.value)) - return false; - } - - boolean this_present_rowMutations = true && this.isSetRowMutations(); - boolean that_present_rowMutations = true && that.isSetRowMutations(); - if (this_present_rowMutations || that_present_rowMutations) { - if (!(this_present_rowMutations && that_present_rowMutations)) - return false; - if (!this.rowMutations.equals(that.rowMutations)) - return false; - } - return true; } @@ -23542,122 +51058,17 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - boolean present_row = true && (isSetRow()); - list.add(present_row); - if (present_row) - list.add(row); - - boolean present_family = true && (isSetFamily()); - list.add(present_family); - if (present_family) - list.add(family); - - boolean present_qualifier = true && (isSetQualifier()); - list.add(present_qualifier); - if (present_qualifier) - list.add(qualifier); - - boolean present_compareOp = true && (isSetCompareOp()); - list.add(present_compareOp); - if (present_compareOp) - list.add(compareOp.getValue()); - - boolean present_value = true && (isSetValue()); - list.add(present_value); - if (present_value) - list.add(value); - - boolean present_rowMutations = true && (isSetRowMutations()); - list.add(present_rowMutations); - if (present_rowMutations) - list.add(rowMutations); - return list.hashCode(); } @Override - public int compareTo(checkAndMutate_args other) { + public int compareTo(listNamespaceDescriptors_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRow()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFamily()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, other.family); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetQualifier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCompareOp()).compareTo(other.isSetCompareOp()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCompareOp()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compareOp, other.compareOp); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRowMutations()).compareTo(other.isSetRowMutations()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRowMutations()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rowMutations, other.rowMutations); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -23675,92 +51086,16 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("checkAndMutate_args("); + StringBuilder sb = new StringBuilder("listNamespaceDescriptors_args("); boolean first = true; - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.table, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("row:"); - if (this.row == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.row, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("family:"); - if (this.family == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.family, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("qualifier:"); - if (this.qualifier == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.qualifier, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("compareOp:"); - if (this.compareOp == null) { - sb.append("null"); - } else { - sb.append(this.compareOp); - } - first = false; - if (!first) sb.append(", "); - sb.append("value:"); - if (this.value == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.value, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("rowMutations:"); - if (this.rowMutations == null) { - sb.append("null"); - } else { - sb.append(this.rowMutations); - } - first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields - if (table == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString()); - } - if (row == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString()); - } - if (family == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'family' was not present! Struct: " + toString()); - } - if (qualifier == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifier' was not present! Struct: " + toString()); - } - if (compareOp == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'compareOp' was not present! Struct: " + toString()); - } - if (rowMutations == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'rowMutations' was not present! Struct: " + toString()); - } // check for sub-struct validity - if (rowMutations != null) { - rowMutations.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -23779,15 +51114,15 @@ public class THBaseService { } } - private static class checkAndMutate_argsStandardSchemeFactory implements SchemeFactory { - public checkAndMutate_argsStandardScheme getScheme() { - return new checkAndMutate_argsStandardScheme(); + private static class listNamespaceDescriptors_argsStandardSchemeFactory implements SchemeFactory { + public listNamespaceDescriptors_argsStandardScheme getScheme() { + return new listNamespaceDescriptors_argsStandardScheme(); } } - private static class checkAndMutate_argsStandardScheme extends StandardScheme { + private static class listNamespaceDescriptors_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndMutate_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, listNamespaceDescriptors_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -23797,63 +51132,6 @@ public class THBaseService { break; } switch (schemeField.id) { - case 1: // TABLE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // ROW - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.row = iprot.readBinary(); - struct.setRowIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // FAMILY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.family = iprot.readBinary(); - struct.setFamilyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // QUALIFIER - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.qualifier = iprot.readBinary(); - struct.setQualifierIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // COMPARE_OP - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.compareOp = org.apache.hadoop.hbase.thrift2.generated.TCompareOp.findByValue(iprot.readI32()); - struct.setCompareOpIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // ROW_MUTATIONS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rowMutations = new TRowMutations(); - struct.rowMutations.read(iprot); - struct.setRowMutationsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -23865,117 +51143,50 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndMutate_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, listNamespaceDescriptors_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - oprot.writeBinary(struct.table); - oprot.writeFieldEnd(); - } - if (struct.row != null) { - oprot.writeFieldBegin(ROW_FIELD_DESC); - oprot.writeBinary(struct.row); - oprot.writeFieldEnd(); - } - if (struct.family != null) { - oprot.writeFieldBegin(FAMILY_FIELD_DESC); - oprot.writeBinary(struct.family); - oprot.writeFieldEnd(); - } - if (struct.qualifier != null) { - oprot.writeFieldBegin(QUALIFIER_FIELD_DESC); - oprot.writeBinary(struct.qualifier); - oprot.writeFieldEnd(); - } - if (struct.compareOp != null) { - oprot.writeFieldBegin(COMPARE_OP_FIELD_DESC); - oprot.writeI32(struct.compareOp.getValue()); - oprot.writeFieldEnd(); - } - if (struct.value != null) { - oprot.writeFieldBegin(VALUE_FIELD_DESC); - oprot.writeBinary(struct.value); - oprot.writeFieldEnd(); - } - if (struct.rowMutations != null) { - oprot.writeFieldBegin(ROW_MUTATIONS_FIELD_DESC); - struct.rowMutations.write(oprot); - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class checkAndMutate_argsTupleSchemeFactory implements SchemeFactory { - public checkAndMutate_argsTupleScheme getScheme() { - return new checkAndMutate_argsTupleScheme(); + private static class listNamespaceDescriptors_argsTupleSchemeFactory implements SchemeFactory { + public listNamespaceDescriptors_argsTupleScheme getScheme() { + return new listNamespaceDescriptors_argsTupleScheme(); } } - private static class checkAndMutate_argsTupleScheme extends TupleScheme { + private static class listNamespaceDescriptors_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, checkAndMutate_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, listNamespaceDescriptors_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.table); - oprot.writeBinary(struct.row); - oprot.writeBinary(struct.family); - oprot.writeBinary(struct.qualifier); - oprot.writeI32(struct.compareOp.getValue()); - struct.rowMutations.write(oprot); - BitSet optionals = new BitSet(); - if (struct.isSetValue()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetValue()) { - oprot.writeBinary(struct.value); - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, checkAndMutate_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, listNamespaceDescriptors_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = iprot.readBinary(); - struct.setTableIsSet(true); - struct.row = iprot.readBinary(); - struct.setRowIsSet(true); - struct.family = iprot.readBinary(); - struct.setFamilyIsSet(true); - struct.qualifier = iprot.readBinary(); - struct.setQualifierIsSet(true); - struct.compareOp = org.apache.hadoop.hbase.thrift2.generated.TCompareOp.findByValue(iprot.readI32()); - struct.setCompareOpIsSet(true); - struct.rowMutations = new TRowMutations(); - struct.rowMutations.read(iprot); - struct.setRowMutationsIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.value = iprot.readBinary(); - struct.setValueIsSet(true); - } } } } - public static class checkAndMutate_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkAndMutate_result"); + public static class listNamespaceDescriptors_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("listNamespaceDescriptors_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new checkAndMutate_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new checkAndMutate_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new listNamespaceDescriptors_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new listNamespaceDescriptors_resultTupleSchemeFactory()); } - public boolean success; // required + public List success; // required public TIOError io; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -24040,82 +51251,100 @@ public class THBaseService { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNamespaceDescriptor.class)))); tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkAndMutate_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listNamespaceDescriptors_result.class, metaDataMap); } - public checkAndMutate_result() { + public listNamespaceDescriptors_result() { } - public checkAndMutate_result( - boolean success, + public listNamespaceDescriptors_result( + List success, TIOError io) { this(); this.success = success; - setSuccessIsSet(true); this.io = io; } /** * Performs a deep copy on other. */ - public checkAndMutate_result(checkAndMutate_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; + public listNamespaceDescriptors_result(listNamespaceDescriptors_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (TNamespaceDescriptor other_element : other.success) { + __this__success.add(new TNamespaceDescriptor(other_element)); + } + this.success = __this__success; + } if (other.isSetIo()) { this.io = new TIOError(other.io); } } - public checkAndMutate_result deepCopy() { - return new checkAndMutate_result(this); + public listNamespaceDescriptors_result deepCopy() { + return new listNamespaceDescriptors_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; + this.success = null; this.io = null; } - public boolean isSuccess() { + 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(TNamespaceDescriptor elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { return this.success; } - public checkAndMutate_result setSuccess(boolean success) { + public listNamespaceDescriptors_result setSuccess(List success) { this.success = success; - setSuccessIsSet(true); return this; } public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + return this.success != null; } public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + if (!value) { + this.success = null; + } } public TIOError getIo() { return this.io; } - public checkAndMutate_result setIo(TIOError io) { + public listNamespaceDescriptors_result setIo(TIOError io) { this.io = io; return this; } @@ -24141,7 +51370,7 @@ public class THBaseService { if (value == null) { unsetSuccess(); } else { - setSuccess((Boolean)value); + setSuccess((List)value); } break; @@ -24159,7 +51388,7 @@ public class THBaseService { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return isSuccess(); + return getSuccess(); case IO: return getIo(); @@ -24187,21 +51416,21 @@ public class THBaseService { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof checkAndMutate_result) - return this.equals((checkAndMutate_result)that); + if (that instanceof listNamespaceDescriptors_result) + return this.equals((listNamespaceDescriptors_result)that); return false; } - public boolean equals(checkAndMutate_result that) { + public boolean equals(listNamespaceDescriptors_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (this.success != that.success) + if (!this.success.equals(that.success)) return false; } @@ -24221,7 +51450,7 @@ public class THBaseService { public int hashCode() { List list = new ArrayList(); - boolean present_success = true; + boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); @@ -24235,7 +51464,7 @@ public class THBaseService { } @Override - public int compareTo(checkAndMutate_result other) { + public int compareTo(listNamespaceDescriptors_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -24279,11 +51508,15 @@ public class THBaseService { @Override public String toString() { - StringBuilder sb = new StringBuilder("checkAndMutate_result("); + StringBuilder sb = new StringBuilder("listNamespaceDescriptors_result("); boolean first = true; sb.append("success:"); - sb.append(this.success); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } first = false; if (!first) sb.append(", "); sb.append("io:"); @@ -24312,23 +51545,21 @@ public class THBaseService { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class checkAndMutate_resultStandardSchemeFactory implements SchemeFactory { - public checkAndMutate_resultStandardScheme getScheme() { - return new checkAndMutate_resultStandardScheme(); + private static class listNamespaceDescriptors_resultStandardSchemeFactory implements SchemeFactory { + public listNamespaceDescriptors_resultStandardScheme getScheme() { + return new listNamespaceDescriptors_resultStandardScheme(); } } - private static class checkAndMutate_resultStandardScheme extends StandardScheme { + private static class listNamespaceDescriptors_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, checkAndMutate_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, listNamespaceDescriptors_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -24339,8 +51570,19 @@ public class THBaseService { } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list358 = iprot.readListBegin(); + struct.success = new ArrayList(_list358.size); + TNamespaceDescriptor _elem359; + for (int _i360 = 0; _i360 < _list358.size; ++_i360) + { + _elem359 = new TNamespaceDescriptor(); + _elem359.read(iprot); + struct.success.add(_elem359); + } + iprot.readListEnd(); + } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -24366,13 +51608,20 @@ public class THBaseService { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, checkAndMutate_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, listNamespaceDescriptors_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { + if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TNamespaceDescriptor _iter361 : struct.success) + { + _iter361.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } if (struct.io != null) { @@ -24386,16 +51635,16 @@ public class THBaseService { } - private static class checkAndMutate_resultTupleSchemeFactory implements SchemeFactory { - public checkAndMutate_resultTupleScheme getScheme() { - return new checkAndMutate_resultTupleScheme(); + private static class listNamespaceDescriptors_resultTupleSchemeFactory implements SchemeFactory { + public listNamespaceDescriptors_resultTupleScheme getScheme() { + return new listNamespaceDescriptors_resultTupleScheme(); } } - private static class checkAndMutate_resultTupleScheme extends TupleScheme { + private static class listNamespaceDescriptors_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, checkAndMutate_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, listNamespaceDescriptors_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -24406,7 +51655,13 @@ public class THBaseService { } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); + { + oprot.writeI32(struct.success.size()); + for (TNamespaceDescriptor _iter362 : struct.success) + { + _iter362.write(oprot); + } + } } if (struct.isSetIo()) { struct.io.write(oprot); @@ -24414,11 +51669,21 @@ public class THBaseService { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, checkAndMutate_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, listNamespaceDescriptors_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = iprot.readBool(); + { + org.apache.thrift.protocol.TList _list363 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list363.size); + TNamespaceDescriptor _elem364; + for (int _i365 = 0; _i365 < _list363.size; ++_i365) + { + _elem364 = new TNamespaceDescriptor(); + _elem364.read(iprot); + struct.success.add(_elem364); + } + } struct.setSuccessIsSet(true); } if (incoming.get(1)) { diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java index 129ab2e96e..8450f5b884 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class THRegionInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THRegionInfo"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java index 94b25ff687..b1146e9a77 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class THRegionLocation implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THRegionLocation"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java index 2e50d3d6c1..9569c3f978 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java @@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory; * to the HBase master or a HBase region server. Also used to return * more general HBase error conditions. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TIOError extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIOError"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java index 9387429f73..6734dec608 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java @@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory; * A TIllegalArgument exception indicates an illegal or invalid * argument was passed into a procedure. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TIllegalArgument extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIllegalArgument"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java index 8d62eb5022..3663e613db 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java @@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory; * by changing the durability. If you don't provide durability, it defaults to * column family's default setting for durability. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TIncrement implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIncrement"); @@ -50,6 +50,7 @@ public class TIncrement implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -66,6 +67,7 @@ public class TIncrement implements org.apache.thrift.TBase byName = new HashMap(); @@ -102,6 +105,8 @@ public class TIncrement implements org.apache.thrift.TBase metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -159,6 +166,8 @@ public class TIncrement implements org.apache.thrift.TBaseother. */ public TIncrement(TIncrement other) { + __isset_bitfield = other.__isset_bitfield; if (other.isSetRow()) { this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); } @@ -199,6 +209,7 @@ public class TIncrement implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TNamespaceDescriptor"); + + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.MAP, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TNamespaceDescriptorStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TNamespaceDescriptorTupleSchemeFactory()); + } + + public String name; // required + public Map configuration; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)1, "name"), + CONFIGURATION((short)2, "configuration"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + case 2: // CONFIGURATION + return CONFIGURATION; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.CONFIGURATION}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CONFIGURATION, new org.apache.thrift.meta_data.FieldMetaData("configuration", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TNamespaceDescriptor.class, metaDataMap); + } + + public TNamespaceDescriptor() { + } + + public TNamespaceDescriptor( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public TNamespaceDescriptor(TNamespaceDescriptor other) { + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetConfiguration()) { + Map __this__configuration = new HashMap(other.configuration); + this.configuration = __this__configuration; + } + } + + public TNamespaceDescriptor deepCopy() { + return new TNamespaceDescriptor(this); + } + + @Override + public void clear() { + this.name = null; + this.configuration = null; + } + + public String getName() { + return this.name; + } + + public TNamespaceDescriptor setName(String name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public int getConfigurationSize() { + return (this.configuration == null) ? 0 : this.configuration.size(); + } + + public void putToConfiguration(String key, String val) { + if (this.configuration == null) { + this.configuration = new HashMap(); + } + this.configuration.put(key, val); + } + + public Map getConfiguration() { + return this.configuration; + } + + public TNamespaceDescriptor setConfiguration(Map configuration) { + this.configuration = configuration; + return this; + } + + public void unsetConfiguration() { + this.configuration = null; + } + + /** Returns true if field configuration is set (has been assigned a value) and false otherwise */ + public boolean isSetConfiguration() { + return this.configuration != null; + } + + public void setConfigurationIsSet(boolean value) { + if (!value) { + this.configuration = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case CONFIGURATION: + if (value == null) { + unsetConfiguration(); + } else { + setConfiguration((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case CONFIGURATION: + return getConfiguration(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case CONFIGURATION: + return isSetConfiguration(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TNamespaceDescriptor) + return this.equals((TNamespaceDescriptor)that); + return false; + } + + public boolean equals(TNamespaceDescriptor that) { + if (that == null) + return false; + + 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; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_configuration = true && this.isSetConfiguration(); + boolean that_present_configuration = true && that.isSetConfiguration(); + if (this_present_configuration || that_present_configuration) { + if (!(this_present_configuration && that_present_configuration)) + return false; + if (!this.configuration.equals(that.configuration)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + boolean present_configuration = true && (isSetConfiguration()); + list.add(present_configuration); + if (present_configuration) + list.add(configuration); + + return list.hashCode(); + } + + @Override + public int compareTo(TNamespaceDescriptor other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetConfiguration()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TNamespaceDescriptor("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (isSetConfiguration()) { + if (!first) sb.append(", "); + sb.append("configuration:"); + if (this.configuration == null) { + sb.append("null"); + } else { + sb.append(this.configuration); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (name == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TNamespaceDescriptorStandardSchemeFactory implements SchemeFactory { + public TNamespaceDescriptorStandardScheme getScheme() { + return new TNamespaceDescriptorStandardScheme(); + } + } + + private static class TNamespaceDescriptorStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TNamespaceDescriptor struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CONFIGURATION + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map180 = iprot.readMapBegin(); + struct.configuration = new HashMap(2*_map180.size); + String _key181; + String _val182; + for (int _i183 = 0; _i183 < _map180.size; ++_i183) + { + _key181 = iprot.readString(); + _val182 = iprot.readString(); + struct.configuration.put(_key181, _val182); + } + iprot.readMapEnd(); + } + struct.setConfigurationIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TNamespaceDescriptor struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.configuration != null) { + if (struct.isSetConfiguration()) { + oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.configuration.size())); + for (Map.Entry _iter184 : struct.configuration.entrySet()) + { + oprot.writeString(_iter184.getKey()); + oprot.writeString(_iter184.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TNamespaceDescriptorTupleSchemeFactory implements SchemeFactory { + public TNamespaceDescriptorTupleScheme getScheme() { + return new TNamespaceDescriptorTupleScheme(); + } + } + + private static class TNamespaceDescriptorTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TNamespaceDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.name); + BitSet optionals = new BitSet(); + if (struct.isSetConfiguration()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetConfiguration()) { + { + oprot.writeI32(struct.configuration.size()); + for (Map.Entry _iter185 : struct.configuration.entrySet()) + { + oprot.writeString(_iter185.getKey()); + oprot.writeString(_iter185.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TNamespaceDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.name = iprot.readString(); + struct.setNameIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map186 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.configuration = new HashMap(2*_map186.size); + String _key187; + String _val188; + for (int _i189 = 0; _i189 < _map186.size; ++_i189) + { + _key187 = iprot.readString(); + _val188 = iprot.readString(); + struct.configuration.put(_key187, _val188); + } + } + struct.setConfigurationIsSet(true); + } + } + } + +} + diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java index 552e3d48d6..ad82c6767e 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java @@ -46,7 +46,7 @@ import org.slf4j.LoggerFactory; * by changing the durability. If you don't provide durability, it defaults to * column family's default setting for durability. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TPut implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPut"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java index 317f9b599c..c19cf89e47 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java @@ -37,13 +37,14 @@ import org.slf4j.LoggerFactory; /** * if no Result is found, row and columnValues will not be set. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-07-04") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TResult"); private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField COLUMN_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("columnValues", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField STALE_FIELD_DESC = new org.apache.thrift.protocol.TField("stale", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final org.apache.thrift.protocol.TField PARTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("partial", org.apache.thrift.protocol.TType.BOOL, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -54,12 +55,14 @@ public class TResult implements org.apache.thrift.TBase columnValues; // required public boolean stale; // optional + public boolean partial; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ROW((short)1, "row"), COLUMN_VALUES((short)2, "columnValues"), - STALE((short)3, "stale"); + STALE((short)3, "stale"), + PARTIAL((short)4, "partial"); private static final Map byName = new HashMap(); @@ -80,6 +83,8 @@ public class TResult implements org.apache.thrift.TBase metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -133,6 +139,8 @@ public class TResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowMutations"); @@ -460,14 +460,14 @@ public class TRowMutations implements org.apache.thrift.TBase(_list124.size); - TMutation _elem125; - for (int _i126 = 0; _i126 < _list124.size; ++_i126) + org.apache.thrift.protocol.TList _list134 = iprot.readListBegin(); + struct.mutations = new ArrayList(_list134.size); + TMutation _elem135; + for (int _i136 = 0; _i136 < _list134.size; ++_i136) { - _elem125 = new TMutation(); - _elem125.read(iprot); - struct.mutations.add(_elem125); + _elem135 = new TMutation(); + _elem135.read(iprot); + struct.mutations.add(_elem135); } iprot.readListEnd(); } @@ -500,9 +500,9 @@ public class TRowMutations implements org.apache.thrift.TBase(_list129.size); - TMutation _elem130; - for (int _i131 = 0; _i131 < _list129.size; ++_i131) + org.apache.thrift.protocol.TList _list139 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.mutations = new ArrayList(_list139.size); + TMutation _elem140; + for (int _i141 = 0; _i141 < _list139.size; ++_i141) { - _elem130 = new TMutation(); - _elem130.read(iprot); - struct.mutations.add(_elem130); + _elem140 = new TMutation(); + _elem140.read(iprot); + struct.mutations.add(_elem140); } } struct.setMutationsIsSet(true); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java index b5ece006ea..ddcedb4aae 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java @@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory; * Any timestamps in the columns are ignored but the colFamTimeRangeMap included, use timeRange to select by timestamp. * Max versions defaults to 1. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-07-03") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TScan implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TScan"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java index 27188e9744..65f963d44e 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TServerName implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TServerName"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java new file mode 100644 index 0000000000..89a8a5e1b5 --- /dev/null +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java @@ -0,0 +1,843 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift2.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") +public class TTableDescriptor implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTableDescriptor"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)3); + private static final org.apache.thrift.protocol.TField DURABILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("durability", org.apache.thrift.protocol.TType.I32, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TTableDescriptorStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TTableDescriptorTupleSchemeFactory()); + } + + public TTableName tableName; // required + public List columns; // optional + public Map attributes; // optional + /** + * + * @see TDurability + */ + public TDurability durability; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE_NAME((short)1, "tableName"), + COLUMNS((short)2, "columns"), + ATTRIBUTES((short)3, "attributes"), + /** + * + * @see TDurability + */ + DURABILITY((short)4, "durability"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // COLUMNS + return COLUMNS; + case 3: // ATTRIBUTES + return ATTRIBUTES; + case 4: // DURABILITY + return DURABILITY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.ATTRIBUTES,_Fields.DURABILITY}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class))); + tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumnFamilyDescriptor.class)))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.DURABILITY, new org.apache.thrift.meta_data.FieldMetaData("durability", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDurability.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TTableDescriptor.class, metaDataMap); + } + + public TTableDescriptor() { + } + + public TTableDescriptor( + TTableName tableName) + { + this(); + this.tableName = tableName; + } + + /** + * Performs a deep copy on other. + */ + public TTableDescriptor(TTableDescriptor other) { + if (other.isSetTableName()) { + this.tableName = new TTableName(other.tableName); + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(other.columns.size()); + for (TColumnFamilyDescriptor other_element : other.columns) { + __this__columns.add(new TColumnFamilyDescriptor(other_element)); + } + this.columns = __this__columns; + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(other.attributes); + this.attributes = __this__attributes; + } + if (other.isSetDurability()) { + this.durability = other.durability; + } + } + + public TTableDescriptor deepCopy() { + return new TTableDescriptor(this); + } + + @Override + public void clear() { + this.tableName = null; + this.columns = null; + this.attributes = null; + this.durability = null; + } + + public TTableName getTableName() { + return this.tableName; + } + + public TTableDescriptor setTableName(TTableName tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + 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(TColumnFamilyDescriptor elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + public List getColumns() { + return this.columns; + } + + public TTableDescriptor setColumns(List columns) { + this.columns = columns; + return this; + } + + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been assigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + public Map getAttributes() { + return this.attributes; + } + + public TTableDescriptor setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + /** + * + * @see TDurability + */ + public TDurability getDurability() { + return this.durability; + } + + /** + * + * @see TDurability + */ + public TTableDescriptor setDurability(TDurability durability) { + this.durability = durability; + return this; + } + + public void unsetDurability() { + this.durability = null; + } + + /** Returns true if field durability is set (has been assigned a value) and false otherwise */ + public boolean isSetDurability() { + return this.durability != null; + } + + public void setDurabilityIsSet(boolean value) { + if (!value) { + this.durability = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((TTableName)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + case DURABILITY: + if (value == null) { + unsetDurability(); + } else { + setDurability((TDurability)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case COLUMNS: + return getColumns(); + + case ATTRIBUTES: + return getAttributes(); + + case DURABILITY: + return getDurability(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case COLUMNS: + return isSetColumns(); + case ATTRIBUTES: + return isSetAttributes(); + case DURABILITY: + return isSetDurability(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TTableDescriptor) + return this.equals((TTableDescriptor)that); + return false; + } + + public boolean equals(TTableDescriptor that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_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; + if (!this.columns.equals(that.columns)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + boolean this_present_durability = true && this.isSetDurability(); + boolean that_present_durability = true && that.isSetDurability(); + if (this_present_durability || that_present_durability) { + if (!(this_present_durability && that_present_durability)) + return false; + if (!this.durability.equals(that.durability)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); + + boolean present_columns = true && (isSetColumns()); + list.add(present_columns); + if (present_columns) + list.add(columns); + + boolean present_attributes = true && (isSetAttributes()); + list.add(present_attributes); + if (present_attributes) + list.add(attributes); + + boolean present_durability = true && (isSetDurability()); + list.add(present_durability); + if (present_durability) + list.add(durability.getValue()); + + return list.hashCode(); + } + + @Override + public int compareTo(TTableDescriptor other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, other.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDurability()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.durability, other.durability); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TTableDescriptor("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (isSetColumns()) { + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + } + if (isSetAttributes()) { + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + } + if (isSetDurability()) { + if (!first) sb.append(", "); + sb.append("durability:"); + if (this.durability == null) { + sb.append("null"); + } else { + sb.append(this.durability); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (tableName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString()); + } + // check for sub-struct validity + if (tableName != null) { + tableName.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TTableDescriptorStandardSchemeFactory implements SchemeFactory { + public TTableDescriptorStandardScheme getScheme() { + return new TTableDescriptorStandardScheme(); + } + } + + private static class TTableDescriptorStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TTableDescriptor struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list162 = iprot.readListBegin(); + struct.columns = new ArrayList(_list162.size); + TColumnFamilyDescriptor _elem163; + for (int _i164 = 0; _i164 < _list162.size; ++_i164) + { + _elem163 = new TColumnFamilyDescriptor(); + _elem163.read(iprot); + struct.columns.add(_elem163); + } + iprot.readListEnd(); + } + struct.setColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map165 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map165.size); + ByteBuffer _key166; + ByteBuffer _val167; + for (int _i168 = 0; _i168 < _map165.size; ++_i168) + { + _key166 = iprot.readBinary(); + _val167 = iprot.readBinary(); + struct.attributes.put(_key166, _val167); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DURABILITY + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.durability = org.apache.hadoop.hbase.thrift2.generated.TDurability.findByValue(iprot.readI32()); + struct.setDurabilityIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TTableDescriptor struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + struct.tableName.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.columns != null) { + if (struct.isSetColumns()) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size())); + for (TColumnFamilyDescriptor _iter169 : struct.columns) + { + _iter169.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.attributes != null) { + if (struct.isSetAttributes()) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter170 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter170.getKey()); + oprot.writeBinary(_iter170.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.durability != null) { + if (struct.isSetDurability()) { + oprot.writeFieldBegin(DURABILITY_FIELD_DESC); + oprot.writeI32(struct.durability.getValue()); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TTableDescriptorTupleSchemeFactory implements SchemeFactory { + public TTableDescriptorTupleScheme getScheme() { + return new TTableDescriptorTupleScheme(); + } + } + + private static class TTableDescriptorTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TTableDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.tableName.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetColumns()) { + optionals.set(0); + } + if (struct.isSetAttributes()) { + optionals.set(1); + } + if (struct.isSetDurability()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetColumns()) { + { + oprot.writeI32(struct.columns.size()); + for (TColumnFamilyDescriptor _iter171 : struct.columns) + { + _iter171.write(oprot); + } + } + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter172 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter172.getKey()); + oprot.writeBinary(_iter172.getValue()); + } + } + } + if (struct.isSetDurability()) { + oprot.writeI32(struct.durability.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TTableDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.tableName = new TTableName(); + struct.tableName.read(iprot); + struct.setTableNameIsSet(true); + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list173 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.columns = new ArrayList(_list173.size); + TColumnFamilyDescriptor _elem174; + for (int _i175 = 0; _i175 < _list173.size; ++_i175) + { + _elem174 = new TColumnFamilyDescriptor(); + _elem174.read(iprot); + struct.columns.add(_elem174); + } + } + struct.setColumnsIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TMap _map176 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map176.size); + ByteBuffer _key177; + ByteBuffer _val178; + for (int _i179 = 0; _i179 < _map176.size; ++_i179) + { + _key177 = iprot.readBinary(); + _val178 = iprot.readBinary(); + struct.attributes.put(_key177, _val178); + } + } + struct.setAttributesIsSet(true); + } + if (incoming.get(2)) { + struct.durability = org.apache.hadoop.hbase.thrift2.generated.TDurability.findByValue(iprot.readI32()); + struct.setDurabilityIsSet(true); + } + } + } + +} + diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java new file mode 100644 index 0000000000..f2c0743888 --- /dev/null +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java @@ -0,0 +1,512 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift2.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") +public class TTableName implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTableName"); + + private static final org.apache.thrift.protocol.TField NS_FIELD_DESC = new org.apache.thrift.protocol.TField("ns", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TTableNameStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TTableNameTupleSchemeFactory()); + } + + public ByteBuffer ns; // required + public ByteBuffer qualifier; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NS((short)1, "ns"), + QUALIFIER((short)2, "qualifier"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NS + return NS; + case 2: // QUALIFIER + return QUALIFIER; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NS, new org.apache.thrift.meta_data.FieldMetaData("ns", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TTableName.class, metaDataMap); + } + + public TTableName() { + } + + public TTableName( + ByteBuffer ns, + ByteBuffer qualifier) + { + this(); + this.ns = org.apache.thrift.TBaseHelper.copyBinary(ns); + this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); + } + + /** + * Performs a deep copy on other. + */ + public TTableName(TTableName other) { + if (other.isSetNs()) { + this.ns = org.apache.thrift.TBaseHelper.copyBinary(other.ns); + } + if (other.isSetQualifier()) { + this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier); + } + } + + public TTableName deepCopy() { + return new TTableName(this); + } + + @Override + public void clear() { + this.ns = null; + this.qualifier = null; + } + + public byte[] getNs() { + setNs(org.apache.thrift.TBaseHelper.rightSize(ns)); + return ns == null ? null : ns.array(); + } + + public ByteBuffer bufferForNs() { + return org.apache.thrift.TBaseHelper.copyBinary(ns); + } + + public TTableName setNs(byte[] ns) { + this.ns = ns == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(ns, ns.length)); + return this; + } + + public TTableName setNs(ByteBuffer ns) { + this.ns = org.apache.thrift.TBaseHelper.copyBinary(ns); + return this; + } + + public void unsetNs() { + this.ns = null; + } + + /** Returns true if field ns is set (has been assigned a value) and false otherwise */ + public boolean isSetNs() { + return this.ns != null; + } + + public void setNsIsSet(boolean value) { + if (!value) { + this.ns = null; + } + } + + public byte[] getQualifier() { + setQualifier(org.apache.thrift.TBaseHelper.rightSize(qualifier)); + return qualifier == null ? null : qualifier.array(); + } + + public ByteBuffer bufferForQualifier() { + return org.apache.thrift.TBaseHelper.copyBinary(qualifier); + } + + public TTableName setQualifier(byte[] qualifier) { + this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length)); + return this; + } + + public TTableName setQualifier(ByteBuffer qualifier) { + this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier); + return this; + } + + public void unsetQualifier() { + this.qualifier = null; + } + + /** Returns true if field qualifier is set (has been assigned a value) and false otherwise */ + public boolean isSetQualifier() { + return this.qualifier != null; + } + + public void setQualifierIsSet(boolean value) { + if (!value) { + this.qualifier = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NS: + if (value == null) { + unsetNs(); + } else { + setNs((ByteBuffer)value); + } + break; + + case QUALIFIER: + if (value == null) { + unsetQualifier(); + } else { + setQualifier((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NS: + return getNs(); + + case QUALIFIER: + return getQualifier(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NS: + return isSetNs(); + case QUALIFIER: + return isSetQualifier(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TTableName) + return this.equals((TTableName)that); + return false; + } + + public boolean equals(TTableName that) { + if (that == null) + return false; + + boolean this_present_ns = true && this.isSetNs(); + boolean that_present_ns = true && that.isSetNs(); + if (this_present_ns || that_present_ns) { + if (!(this_present_ns && that_present_ns)) + return false; + if (!this.ns.equals(that.ns)) + return false; + } + + boolean this_present_qualifier = true && this.isSetQualifier(); + boolean that_present_qualifier = true && that.isSetQualifier(); + if (this_present_qualifier || that_present_qualifier) { + if (!(this_present_qualifier && that_present_qualifier)) + return false; + if (!this.qualifier.equals(that.qualifier)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_ns = true && (isSetNs()); + list.add(present_ns); + if (present_ns) + list.add(ns); + + boolean present_qualifier = true && (isSetQualifier()); + list.add(present_qualifier); + if (present_qualifier) + list.add(qualifier); + + return list.hashCode(); + } + + @Override + public int compareTo(TTableName other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNs()).compareTo(other.isSetNs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ns, other.ns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQualifier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TTableName("); + boolean first = true; + + sb.append("ns:"); + if (this.ns == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.ns, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("qualifier:"); + if (this.qualifier == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.qualifier, sb); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (ns == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'ns' was not present! Struct: " + toString()); + } + if (qualifier == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifier' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TTableNameStandardSchemeFactory implements SchemeFactory { + public TTableNameStandardScheme getScheme() { + return new TTableNameStandardScheme(); + } + } + + private static class TTableNameStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TTableName struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.ns = iprot.readBinary(); + struct.setNsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // QUALIFIER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.qualifier = iprot.readBinary(); + struct.setQualifierIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TTableName struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.ns != null) { + oprot.writeFieldBegin(NS_FIELD_DESC); + oprot.writeBinary(struct.ns); + oprot.writeFieldEnd(); + } + if (struct.qualifier != null) { + oprot.writeFieldBegin(QUALIFIER_FIELD_DESC); + oprot.writeBinary(struct.qualifier); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TTableNameTupleSchemeFactory implements SchemeFactory { + public TTableNameTupleScheme getScheme() { + return new TTableNameTupleScheme(); + } + } + + private static class TTableNameTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TTableName struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.ns); + oprot.writeBinary(struct.qualifier); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TTableName struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.ns = iprot.readBinary(); + struct.setNsIsSet(true); + struct.qualifier = iprot.readBinary(); + struct.setQualifierIsSet(true); + } + } + +} + diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java index 74c72553ad..1e1898cab5 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27") public class TTimeRange implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTimeRange"); diff --git a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift index 79196f4e8d..e08e42342b 100644 --- a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift +++ b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift @@ -48,7 +48,8 @@ struct TColumnValue { 2: required binary qualifier, 3: required binary value, 4: optional i64 timestamp, - 5: optional binary tags + 5: optional binary tags, + 6: optional byte type } /** @@ -67,6 +68,7 @@ struct TResult { 1: optional binary row, 2: required list columnValues, 3: optional bool stale = false + 4: optional bool partial = false } /** @@ -90,6 +92,7 @@ enum TDeleteType { */ enum TDurability { + USE_DEFAULT = 0, SKIP_WAL = 1, ASYNC_WAL = 2, SYNC_WAL = 3, @@ -139,6 +142,11 @@ struct TGet { 8: optional TAuthorization authorizations 9: optional TConsistency consistency 10: optional i32 targetReplicaId + 11: optional bool cacheBlocks + 12: optional i32 storeLimit + 13: optional i32 storeOffset + 14: optional bool existence_only + } /** @@ -211,6 +219,7 @@ struct TIncrement { 4: optional map attributes, 5: optional TDurability durability 6: optional TCellVisibility cellVisibility + 7: optional bool returnResults } /* @@ -222,6 +231,7 @@ struct TAppend { 3: optional map attributes, 4: optional TDurability durability 5: optional TCellVisibility cellVisibility + 6: optional bool returnResults } enum TReadType { @@ -258,8 +268,8 @@ struct TScan { * Atomic mutation for the specified row. It can be either Put or Delete. */ union TMutation { - 1: TPut put, - 2: TDelete deleteSingle, + 1: TPut put + 2: TDelete deleteSingle } /** @@ -305,6 +315,112 @@ enum TCompareOp { NO_OP = 6 } +enum TBloomFilterType { +/** + * Bloomfilters disabled + */ + NONE = 0, + /** + * Bloom enabled with Table row as Key + */ + ROW = 1, + /** + * Bloom enabled with Table row & column (family+qualifier) as Key + */ + ROWCOL = 2, + /** + * Bloom enabled with Table row prefix as Key, specify the length of the prefix + */ + ROWPREFIX_FIXED_LENGTH = 3, + /** + * Bloom enabled with Table row prefix as Key, specify the delimiter of the prefix + */ + ROWPREFIX_DELIMITED = 4 +} + +enum TCompressionAlgorithm { + LZO = 0, + GZ = 1, + NONE = 2, + SNAPPY = 3, + LZ4 = 4, + BZIP2 = 5, + ZSTD = 6 +} + +enum TDataBlockEncoding { +/** Disable data block encoding. */ + NONE = 0, + // id 1 is reserved for the BITSET algorithm to be added later + PREFIX = 2, + DIFF = 3, + FAST_DIFF = 4, + // id 5 is reserved for the COPY_KEY algorithm for benchmarking + // COPY_KEY(5, "org.apache.hadoop.hbase.io.encoding.CopyKeyDataBlockEncoder"), + // PREFIX_TREE(6, "org.apache.hadoop.hbase.codec.prefixtree.PrefixTreeCodec"), + ROW_INDEX_V1 = 7 +} + +enum TKeepDeletedCells { + /** Deleted Cells are not retained. */ + FALSE = 0, + /** + * Deleted Cells are retained until they are removed by other means + * such TTL or VERSIONS. + * If no TTL is specified or no new versions of delete cells are + * written, they are retained forever. + */ + TRUE = 1, + /** + * Deleted Cells are retained until the delete marker expires due to TTL. + * This is useful when TTL is combined with MIN_VERSIONS and one + * wants to keep a minimum number of versions around but at the same + * time remove deleted cells after the TTL. + */ + TTL = 2 +} + +struct TTableName { + 1: required binary ns + 2: required binary qualifier +} + +struct TColumnFamilyDescriptor { + 1: required binary name + 2: optional map attributes + 3: optional map configuration + 4: optional i32 blockSize + 5: optional TBloomFilterType bloomnFilterType + 6: optional TCompressionAlgorithm compressionType + 7: optional i16 dfsReplication + 8: optional TDataBlockEncoding dataBlockEncoding + 9: optional TKeepDeletedCells keepDeletedCells + 10: optional i32 maxVersions + 11: optional i32 minVersions + 12: optional i32 scope + 13: optional i32 timeToLive + 14: optional bool blockCacheEnabled + 15: optional bool cacheBloomsOnWrite + 16: optional bool cacheDataOnWrite + 17: optional bool cacheIndexesOnWrite + 18: optional bool compressTags + 19: optional bool evictBlocksOnClose + 20: optional bool inMemory + +} + +struct TTableDescriptor { + 1: required TTableName tableName + 2: optional list columns + 3: optional map attributes + 4: optional TDurability durability +} + +struct TNamespaceDescriptor { +1: required string name +2: optional map configuration +} + // // Exceptions @@ -644,4 +760,123 @@ service THBaseService { /** row mutations to execute if the value matches */ 7: required TRowMutations rowMutations ) throws (1: TIOError io) + + TTableDescriptor getTableDescriptor( + 1: required TTableName table + ) throws (1: TIOError io) + + list getTableDescriptors( + 1: required list tables + ) throws (1: TIOError io) + + bool tableExists( + 1: TTableName tableName + ) throws (1: TIOError io) + + list getTableDescriptorsByPattern( + 1: required string regex + 2: required bool includeSysTables + ) throws (1: TIOError io) + + list getTableDescriptorsByNamespace( + 1: required string name + ) throws (1: TIOError io) + + list getTableNamesByPattern( + 1: required string regex + 2: required bool includeSysTables + ) throws (1: TIOError io) + + list getTableNamesByNamespace( + 1: required string name + ) throws (1: TIOError io) + + void createTable( + 1: required TTableDescriptor desc + 2: required list splitKeys + ) throws (1: TIOError io) + + void deleteTable( + 1: required TTableName tableName + ) throws (1: TIOError io) + + list deleteTableByPattern( + 1: required string regex + ) throws (1: TIOError io) + + void truncateTable( + 1: required TTableName tableName + 2: required bool preserveSplits + ) throws (1: TIOError io) + + void enableTable( + 1: required TTableName tableName + ) throws (1: TIOError io) + + list enableTableByPattern( + 1: required string regex + ) throws (1: TIOError io) + + void disableTable( + 1: required TTableName tableName + ) throws (1: TIOError io) + + list disableTableByPattern( + 1: required string regex + ) throws (1: TIOError io) + + bool isTableEnabled( + 1: required TTableName tableName + ) throws (1: TIOError io) + + bool isTableDisabled( + 1: required TTableName tableName + ) throws (1: TIOError io) + + bool isTableAvailable( + 1: required TTableName tableName + ) throws (1: TIOError io) + + bool isTableAvailableWithSplit( + 1: required TTableName tableName + 2: required list splitKeys + ) throws (1: TIOError io) + + void addColumnFamily( + 1: required TTableName tableName + 2: required TColumnFamilyDescriptor column + ) throws (1: TIOError io) + + void deleteColumnFamily( + 1: required TTableName tableName + 2: required binary column + ) throws (1: TIOError io) + + void modifyColumnFamily( + 1: required TTableName tableName + 2: required TColumnFamilyDescriptor column + ) throws (1: TIOError io) + + void modifyTable( + 1: required TTableDescriptor desc + ) throws (1: TIOError io) + + void createNamespace( + 1: required TNamespaceDescriptor namespaceDesc + ) throws (1: TIOError io) + + void modifyNamespace( + 1: required TNamespaceDescriptor namespaceDesc + ) throws (1: TIOError io) + + void deleteNamespace( + 1: required string name + ) throws (1: TIOError io) + + TNamespaceDescriptor getNamespaceDescriptor( + 1: required string name + ) throws (1: TIOError io) + + list listNamespaceDescriptors( + ) throws (1: TIOError io) } diff --git a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java index 1626121047..38bd5e8cf9 100644 --- a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java +++ b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java @@ -50,6 +50,7 @@ import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor; +import org.apache.hadoop.hbase.NamespaceDescriptor; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Admin; import org.apache.hadoop.hbase.client.Consistency; @@ -60,6 +61,7 @@ import org.apache.hadoop.hbase.client.Increment; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.client.Table; +import org.apache.hadoop.hbase.client.TableDescriptor; import org.apache.hadoop.hbase.coprocessor.ObserverContext; import org.apache.hadoop.hbase.coprocessor.RegionCoprocessor; import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment; @@ -73,10 +75,12 @@ import org.apache.hadoop.hbase.thrift.ErrorThrowingGetObserver; import org.apache.hadoop.hbase.thrift.ThriftMetrics; import org.apache.hadoop.hbase.thrift2.generated.TAppend; import org.apache.hadoop.hbase.thrift2.generated.TColumn; +import org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor; import org.apache.hadoop.hbase.thrift2.generated.TColumnIncrement; import org.apache.hadoop.hbase.thrift2.generated.TColumnValue; import org.apache.hadoop.hbase.thrift2.generated.TCompareOp; import org.apache.hadoop.hbase.thrift2.generated.TConsistency; +import org.apache.hadoop.hbase.thrift2.generated.TDataBlockEncoding; import org.apache.hadoop.hbase.thrift2.generated.TDelete; import org.apache.hadoop.hbase.thrift2.generated.TDeleteType; import org.apache.hadoop.hbase.thrift2.generated.TDurability; @@ -86,11 +90,14 @@ import org.apache.hadoop.hbase.thrift2.generated.TIOError; import org.apache.hadoop.hbase.thrift2.generated.TIllegalArgument; import org.apache.hadoop.hbase.thrift2.generated.TIncrement; import org.apache.hadoop.hbase.thrift2.generated.TMutation; +import org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor; import org.apache.hadoop.hbase.thrift2.generated.TPut; import org.apache.hadoop.hbase.thrift2.generated.TReadType; import org.apache.hadoop.hbase.thrift2.generated.TResult; import org.apache.hadoop.hbase.thrift2.generated.TRowMutations; import org.apache.hadoop.hbase.thrift2.generated.TScan; +import org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor; +import org.apache.hadoop.hbase.thrift2.generated.TTableName; import org.apache.hadoop.hbase.thrift2.generated.TTimeRange; import org.apache.hadoop.hbase.util.Bytes; import org.apache.thrift.TException; @@ -1592,6 +1599,102 @@ public class TestThriftHBaseServiceHandler { assertTrue(tResult.isSetStale()); } + @Test + public void testDDLOpertions() throws Exception { + String namespace = "testDDLOpertionsNamespace"; + String table = "testDDLOpertionsTable"; + TTableName tTableName = new TTableName(); + tTableName.setNs(Bytes.toBytes(namespace)); + tTableName.setQualifier(Bytes.toBytes(table)); + ThriftHBaseServiceHandler handler = createHandler(); + //create name space + TNamespaceDescriptor namespaceDescriptor = new TNamespaceDescriptor(); + namespaceDescriptor.setName(namespace); + namespaceDescriptor.putToConfiguration("key1", "value1"); + namespaceDescriptor.putToConfiguration("key2", "value2"); + handler.createNamespace(namespaceDescriptor); + //list namespace + List namespaceDescriptors = handler.listNamespaceDescriptors(); + // should have 3 namespace, default hbase and testDDLOpertionsNamespace + assertTrue(namespaceDescriptors.size() == 3); + //modify namesapce + namespaceDescriptor.putToConfiguration("kye3", "value3"); + handler.modifyNamespace(namespaceDescriptor); + //get namespace + TNamespaceDescriptor namespaceDescriptorReturned = handler.getNamespaceDescriptor(namespace); + assertTrue(namespaceDescriptorReturned.getConfiguration().size() == 3); + //create table + TTableDescriptor tableDescriptor = new TTableDescriptor(); + tableDescriptor.setTableName(tTableName); + TColumnFamilyDescriptor columnFamilyDescriptor1 = new TColumnFamilyDescriptor(); + columnFamilyDescriptor1.setName(familyAname); + columnFamilyDescriptor1.setDataBlockEncoding(TDataBlockEncoding.DIFF); + tableDescriptor.addToColumns(columnFamilyDescriptor1); + List splitKeys = new ArrayList<>(); + splitKeys.add(ByteBuffer.wrap(Bytes.toBytes(5))); + handler.createTable(tableDescriptor, splitKeys); + //modify table + tableDescriptor.setDurability(TDurability.ASYNC_WAL); + handler.modifyTable(tableDescriptor); + //modify column family + columnFamilyDescriptor1.setInMemory(true); + handler.modifyColumnFamily(tTableName, columnFamilyDescriptor1); + //add column family + TColumnFamilyDescriptor columnFamilyDescriptor2 = new TColumnFamilyDescriptor(); + columnFamilyDescriptor2.setName(familyBname); + columnFamilyDescriptor2.setDataBlockEncoding(TDataBlockEncoding.PREFIX); + handler.addColumnFamily(tTableName, columnFamilyDescriptor2); + //get table descriptor + TTableDescriptor tableDescriptorReturned = handler.getTableDescriptor(tTableName); + assertTrue(tableDescriptorReturned.getColumns().size() == 2); + assertTrue(tableDescriptorReturned.getDurability() == TDurability.ASYNC_WAL); + TColumnFamilyDescriptor columnFamilyDescriptor1Returned = tableDescriptorReturned.getColumns() + .stream().filter(desc -> Bytes.equals(desc.getName(), familyAname)).findFirst().get(); + assertTrue(columnFamilyDescriptor1Returned.isInMemory() == true); + //delete column family + handler.deleteColumnFamily(tTableName, ByteBuffer.wrap(familyBname)); + tableDescriptorReturned = handler.getTableDescriptor(tTableName); + assertTrue(tableDescriptorReturned.getColumns().size() == 1); + //disable table + handler.disableTable(tTableName); + assertTrue(handler.isTableDisabled(tTableName)); + //enable table + handler.enableTable(tTableName); + assertTrue(handler.isTableEnabled(tTableName)); + assertTrue(handler.isTableAvailable(tTableName)); + //truncate table + handler.disableTable(tTableName); + handler.truncateTable(tTableName, true); + assertTrue(handler.isTableAvailable(tTableName)); + //delete table + handler.disableTable(tTableName); + handler.deleteTable(tTableName); + assertFalse(handler.tableExists(tTableName)); + //delete namespace + handler.deleteNamespace(namespace); + namespaceDescriptors = handler.listNamespaceDescriptors(); + // should have 2 namespace, default and hbase + assertTrue(namespaceDescriptors.size() == 2); + + + + + } + + @Test + public void testGetTableDescriptor() throws Exception { + ThriftHBaseServiceHandler handler = createHandler(); + TTableDescriptor tableDescriptor = handler + .getTableDescriptor(ThriftUtilities.tableNameFromHBase(TableName.valueOf(tableAname))); + TableDescriptor table = ThriftUtilities.tableDescriptorFromThrift(tableDescriptor); + assertTrue(table.getTableName().equals(TableName.valueOf(tableAname))); + assertTrue(table.getColumnFamilies().length == 2); + assertTrue(table.getColumnFamily(familyAname).getMaxVersions() == 3); + assertTrue(table.getColumnFamily(familyBname).getMaxVersions() == 2); + + + } + public static class DelayingRegionObserver implements RegionCoprocessor, RegionObserver { private static final Logger LOG = LoggerFactory.getLogger(DelayingRegionObserver.class); // sleep time in msec