diff --git a/pom.xml b/pom.xml index bfa4680..3ccbc33 100644 --- a/pom.xml +++ b/pom.xml @@ -135,6 +135,14 @@ + apache release + https://repository.apache.org/content/repositories/releases/ + temp-thrift Thrift 0.2.0 http://people.apache.org/~rawson/repo/ @@ -453,7 +461,7 @@ 2.3.0 1.5.8 1.0.1 - 0.2.0 + 0.5.0 3.3.2 @@ -523,8 +531,8 @@ ${zookeeper.version} - org.apache.thrift - thrift + org.apache.hadoop + libthrift ${thrift.version} diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java b/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java index 219bf74..b2af5cb 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.UnknownHostException; +import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -85,6 +86,8 @@ import org.apache.thrift.transport.TServerSocket; import org.apache.thrift.transport.TServerTransport; import org.apache.thrift.transport.TTransportFactory; +import static org.apache.hadoop.hbase.util.Bytes.getBytes; + /** * ThriftServer - this class starts up a Thrift server which implements the * Hbase API specified in the Hbase.thrift IDL file. @@ -146,6 +149,10 @@ public class ThriftServer { return tables.get(table); } + protected HTable getTable(final ByteBuffer tableName) throws IOException { + return getTable(getBytes(tableName)); + } + /** * Assigns a unique ID to the scanner and adds the mapping to an internal * hash-map. @@ -196,33 +203,37 @@ public class ThriftServer { scannerMap = new HashMap(); } - public void enableTable(final byte[] tableName) throws IOError { + @Override + public void enableTable(ByteBuffer tableName) throws IOError { try{ - admin.enableTable(tableName); + admin.enableTable(getBytes(tableName)); } catch (IOException e) { throw new IOError(e.getMessage()); } } - public void disableTable(final byte[] tableName) throws IOError{ + @Override + public void disableTable(ByteBuffer tableName) throws IOError{ try{ - admin.disableTable(tableName); + admin.disableTable(getBytes(tableName)); } catch (IOException e) { throw new IOError(e.getMessage()); } } - public boolean isTableEnabled(final byte[] tableName) throws IOError { + @Override + public boolean isTableEnabled(ByteBuffer tableName) throws IOError { try { - return HTable.isTableEnabled(this.conf, tableName); + return HTable.isTableEnabled(this.conf, getBytes(tableName)); } catch (IOException e) { throw new IOError(e.getMessage()); } } - public void compact(byte[] tableNameOrRegionName) throws IOError { + @Override + public void compact(ByteBuffer tableNameOrRegionName) throws IOError { try{ - admin.compact(tableNameOrRegionName); + admin.compact(getBytes(tableNameOrRegionName)); } catch (InterruptedException e) { throw new IOError(e.getMessage()); } catch (IOException e) { @@ -230,9 +241,10 @@ public class ThriftServer { } } - public void majorCompact(byte[] tableNameOrRegionName) throws IOError { + @Override + public void majorCompact(ByteBuffer tableNameOrRegionName) throws IOError { try{ - admin.majorCompact(tableNameOrRegionName); + admin.majorCompact(getBytes(tableNameOrRegionName)); } catch (InterruptedException e) { throw new IOError(e.getMessage()); } catch (IOException e) { @@ -240,12 +252,13 @@ public class ThriftServer { } } - public List getTableNames() throws IOError { + @Override + public List getTableNames() throws IOError { try { HTableDescriptor[] tables = this.admin.listTables(); - ArrayList list = new ArrayList(tables.length); + ArrayList list = new ArrayList(tables.length); for (int i = 0; i < tables.length; i++) { - list.add(tables[i].getName()); + list.add(ByteBuffer.wrap(tables[i].getName())); } return list; } catch (IOException e) { @@ -253,7 +266,8 @@ public class ThriftServer { } } - public List getTableRegions(byte[] tableName) + @Override + public List getTableRegions(ByteBuffer tableName) throws IOError { try{ HTable table = getTable(tableName); @@ -262,10 +276,10 @@ public class ThriftServer { for (HRegionInfo regionInfo : regionsInfo.keySet()){ TRegionInfo region = new TRegionInfo(); - region.startKey = regionInfo.getStartKey(); - region.endKey = regionInfo.getEndKey(); + region.startKey = ByteBuffer.wrap(regionInfo.getStartKey()); + region.endKey = ByteBuffer.wrap(regionInfo.getEndKey()); region.id = regionInfo.getRegionId(); - region.name = regionInfo.getRegionName(); + region.name = ByteBuffer.wrap(regionInfo.getRegionName()); region.version = regionInfo.getVersion(); regions.add(region); } @@ -276,20 +290,23 @@ public class ThriftServer { } @Deprecated - public List get(byte[] tableName, byte[] row, byte[] column) + @Override + public List get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws IOError { - byte [][] famAndQf = KeyValue.parseColumn(column); + byte [][] famAndQf = KeyValue.parseColumn(getBytes(column)); if(famAndQf.length == 1) { return get(tableName, row, famAndQf[0], new byte[0]); } return get(tableName, row, famAndQf[0], famAndQf[1]); } - public List get(byte [] tableName, byte [] row, byte [] family, - byte [] qualifier) throws IOError { + protected List get(ByteBuffer tableName, + ByteBuffer row, + byte[] family, + byte[] qualifier) throws IOError { try { HTable table = getTable(tableName); - Get get = new Get(row); + Get get = new Get(getBytes(row)); if (qualifier == null || qualifier.length == 0) { get.addFamily(family); } else { @@ -303,20 +320,24 @@ public class ThriftServer { } @Deprecated - public List getVer(byte[] tableName, byte[] row, - byte[] column, int numVersions) throws IOError { - byte [][] famAndQf = KeyValue.parseColumn(column); + @Override + public List getVer(ByteBuffer tableName, ByteBuffer row, + ByteBuffer column, int numVersions) throws IOError { + byte [][] famAndQf = KeyValue.parseColumn(getBytes(column)); if(famAndQf.length == 1) { - return getVer(tableName, row, famAndQf[0], new byte[0], numVersions); + return getVer(tableName, row, famAndQf[0], + new byte[0], numVersions); } - return getVer(tableName, row, famAndQf[0], famAndQf[1], numVersions); + return getVer(tableName, row, + famAndQf[0], famAndQf[1], numVersions); } - public List getVer(byte [] tableName, byte [] row, byte [] family, - byte [] qualifier, int numVersions) throws IOError { + public List getVer(ByteBuffer tableName, ByteBuffer row, + byte[] family, + byte[] qualifier, int numVersions) throws IOError { try { HTable table = getTable(tableName); - Get get = new Get(row); + Get get = new Get(getBytes(row)); get.addColumn(family, qualifier); get.setMaxVersions(numVersions); Result result = table.get(get); @@ -327,9 +348,13 @@ public class ThriftServer { } @Deprecated - public List getVerTs(byte[] tableName, byte[] row, - byte[] column, long timestamp, int numVersions) throws IOError { - byte [][] famAndQf = KeyValue.parseColumn(column); + @Override + public List getVerTs(ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, + long timestamp, + int numVersions) throws IOError { + byte [][] famAndQf = KeyValue.parseColumn(getBytes(column)); if(famAndQf.length == 1) { return getVerTs(tableName, row, famAndQf[0], new byte[0], timestamp, numVersions); @@ -338,11 +363,12 @@ public class ThriftServer { numVersions); } - public List getVerTs(byte [] tableName, byte [] row, byte [] family, + protected List getVerTs(ByteBuffer tableName, + ByteBuffer row, byte [] family, byte [] qualifier, long timestamp, int numVersions) throws IOError { try { HTable table = getTable(tableName); - Get get = new Get(row); + Get get = new Get(getBytes(row)); get.addColumn(family, qualifier); get.setTimeRange(Long.MIN_VALUE, timestamp); get.setMaxVersions(numVersions); @@ -353,36 +379,41 @@ public class ThriftServer { } } - public List getRow(byte[] tableName, byte[] row) + @Override + public List getRow(ByteBuffer tableName, ByteBuffer row) throws IOError { return getRowWithColumnsTs(tableName, row, null, HConstants.LATEST_TIMESTAMP); } - public List getRowWithColumns(byte[] tableName, byte[] row, - List columns) throws IOError { + @Override + public List getRowWithColumns(ByteBuffer tableName, + ByteBuffer row, + List columns) throws IOError { return getRowWithColumnsTs(tableName, row, columns, HConstants.LATEST_TIMESTAMP); } - public List getRowTs(byte[] tableName, byte[] row, + @Override + public List getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws IOError { return getRowWithColumnsTs(tableName, row, null, timestamp); } - public List getRowWithColumnsTs(byte[] tableName, byte[] row, - List columns, long timestamp) throws IOError { + @Override + public List getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, + List columns, long timestamp) throws IOError { try { HTable table = getTable(tableName); if (columns == null) { - Get get = new Get(row); + Get get = new Get(getBytes(row)); get.setTimeRange(Long.MIN_VALUE, timestamp); Result result = table.get(get); return ThriftUtilities.rowResultFromHBase(result); } byte[][] columnArr = columns.toArray(new byte[columns.size()][]); - Get get = new Get(row); + Get get = new Get(getBytes(row)); for(byte [] column : columnArr) { byte [][] famAndQf = KeyValue.parseColumn(column); if (famAndQf.length == 1) { @@ -399,17 +430,21 @@ public class ThriftServer { } } - public void deleteAll(byte[] tableName, byte[] row, byte[] column) + @Override + public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws IOError { deleteAllTs(tableName, row, column, HConstants.LATEST_TIMESTAMP); } - public void deleteAllTs(byte[] tableName, byte[] row, byte[] column, + @Override + public void deleteAllTs(ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, long timestamp) throws IOError { try { HTable table = getTable(tableName); - Delete delete = new Delete(row); - byte [][] famAndQf = KeyValue.parseColumn(column); + Delete delete = new Delete(getBytes(row)); + byte [][] famAndQf = KeyValue.parseColumn(getBytes(column)); if (famAndQf.length == 1) { delete.deleteFamily(famAndQf[0], timestamp); } else { @@ -422,24 +457,28 @@ public class ThriftServer { } } - public void deleteAllRow(byte[] tableName, byte[] row) throws IOError { + @Override + public void deleteAllRow(ByteBuffer tableName, ByteBuffer row) throws IOError { deleteAllRowTs(tableName, row, HConstants.LATEST_TIMESTAMP); } - public void deleteAllRowTs(byte[] tableName, byte[] row, long timestamp) + @Override + public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws IOError { try { HTable table = getTable(tableName); - Delete delete = new Delete(row, timestamp, null); + Delete delete = new Delete(getBytes(row), timestamp, null); table.delete(delete); } catch (IOException e) { throw new IOError(e.getMessage()); } } - public void createTable(byte[] tableName, + @Override + public void createTable(ByteBuffer in_tableName, List columnFamilies) throws IOError, IllegalArgument, AlreadyExists { + byte [] tableName = getBytes(in_tableName); try { if (admin.tableExists(tableName)) { throw new AlreadyExists("table name already in use"); @@ -457,9 +496,11 @@ public class ThriftServer { } } - public void deleteTable(byte[] tableName) throws IOError { + @Override + public void deleteTable(ByteBuffer in_tableName) throws IOError { + byte [] tableName = getBytes(in_tableName); if (LOG.isDebugEnabled()) { - LOG.debug("deleteTable: table=" + new String(tableName)); + LOG.debug("deleteTable: table=" + Bytes.toString(tableName)); } try { if (!admin.tableExists(tableName)) { @@ -471,23 +512,25 @@ public class ThriftServer { } } - public void mutateRow(byte[] tableName, byte[] row, + @Override + public void mutateRow(ByteBuffer tableName, ByteBuffer row, List mutations) throws IOError, IllegalArgument { mutateRowTs(tableName, row, mutations, HConstants.LATEST_TIMESTAMP); } - public void mutateRowTs(byte[] tableName, byte[] row, + @Override + public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List mutations, long timestamp) throws IOError, IllegalArgument { HTable table = null; try { table = getTable(tableName); - Put put = new Put(row, timestamp, null); + Put put = new Put(getBytes(row), timestamp, null); - Delete delete = new Delete(row); + Delete delete = new Delete(getBytes(row)); // I apologize for all this mess :) for (Mutation m : mutations) { - byte[][] famAndQf = KeyValue.parseColumn(m.column); + byte[][] famAndQf = KeyValue.parseColumn(getBytes(m.column)); if (m.isDelete) { if (famAndQf.length == 1) { delete.deleteFamily(famAndQf[0], timestamp); @@ -496,9 +539,9 @@ public class ThriftServer { } } else { if(famAndQf.length == 1) { - put.add(famAndQf[0], new byte[0], m.value); + put.add(famAndQf[0], new byte[0], getBytes(m.value)); } else { - put.add(famAndQf[0], famAndQf[1], m.value); + put.add(famAndQf[0], famAndQf[1], getBytes(m.value)); } } } @@ -513,23 +556,25 @@ public class ThriftServer { } } - public void mutateRows(byte[] tableName, List rowBatches) + @Override + public void mutateRows(ByteBuffer tableName, List rowBatches) throws IOError, IllegalArgument, TException { mutateRowsTs(tableName, rowBatches, HConstants.LATEST_TIMESTAMP); } - public void mutateRowsTs(byte[] tableName, List rowBatches, long timestamp) + @Override + public void mutateRowsTs(ByteBuffer tableName, List rowBatches, long timestamp) throws IOError, IllegalArgument, TException { List puts = new ArrayList(); List deletes = new ArrayList(); for (BatchMutation batch : rowBatches) { - byte[] row = batch.row; + byte[] row = getBytes(batch.row); List mutations = batch.mutations; Delete delete = new Delete(row); Put put = new Put(row, timestamp, null); for (Mutation m : mutations) { - byte[][] famAndQf = KeyValue.parseColumn(m.column); + byte[][] famAndQf = KeyValue.parseColumn(getBytes(m.column)); if (m.isDelete) { // no qualifier, family only. if (famAndQf.length == 1) { @@ -539,9 +584,9 @@ public class ThriftServer { } } else { if(famAndQf.length == 1) { - put.add(famAndQf[0], new byte[0], m.value); + put.add(famAndQf[0], new byte[0], getBytes(m.value)); } else { - put.add(famAndQf[0], famAndQf[1], m.value); + put.add(famAndQf[0], famAndQf[1], getBytes(m.value)); } } } @@ -567,9 +612,10 @@ public class ThriftServer { } @Deprecated - public long atomicIncrement(byte[] tableName, byte[] row, byte[] column, + @Override + public long atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long amount) throws IOError, IllegalArgument, TException { - byte [][] famAndQf = KeyValue.parseColumn(column); + byte [][] famAndQf = KeyValue.parseColumn(getBytes(column)); if(famAndQf.length == 1) { return atomicIncrement(tableName, row, famAndQf[0], new byte[0], amount); @@ -606,13 +652,14 @@ public class ThriftServer { } } - public long atomicIncrement(byte [] tableName, byte [] row, byte [] family, + + protected long atomicIncrement(ByteBuffer tableName, ByteBuffer row, byte [] family, byte [] qualifier, long amount) throws IOError, IllegalArgument, TException { HTable table; try { table = getTable(tableName); - return table.incrementColumnValue(row, family, qualifier, amount); + return table.incrementColumnValue(getBytes(row), family, qualifier, amount); } catch (IOException e) { throw new IOError(e.getMessage()); } @@ -629,17 +676,17 @@ public class ThriftServer { } @Override - public List parallelGet(byte[] tableName, - byte[] column, - List rows) throws TException, IOError { + public List parallelGet(ByteBuffer tableName, + ByteBuffer column, + List rows) throws TException, IOError { try { HTable table = getTable(tableName); - byte [][] famAndQual = KeyValue.parseColumn(column); + byte [][] famAndQual = KeyValue.parseColumn(getBytes(column)); List gets = new ArrayList(rows.size()); - for (byte[] row : rows) { - Get g = new Get(row); + for (ByteBuffer row : rows) { + Get g = new Get(getBytes(row)); if (famAndQual.length == 1) { g.addFamily(famAndQual[0]); } else { @@ -661,6 +708,7 @@ public class ThriftServer { } } + @Override public List scannerGetList(int id,int nbRows) throws IllegalArgument, IOError { LOG.debug("scannerGetList: id=" + id); ResultScanner scanner = getScanner(id); @@ -679,17 +727,19 @@ public class ThriftServer { } return ThriftUtilities.rowResultFromHBase(results); } + @Override public List scannerGet(int id) throws IllegalArgument, IOError { return scannerGetList(id,1); } - public int scannerOpen(byte[] tableName, byte[] startRow, - List columns) throws IOError { + @Override + public int scannerOpen(ByteBuffer tableName, ByteBuffer startRow, + List columns) throws IOError { try { HTable table = getTable(tableName); - Scan scan = new Scan(startRow); + Scan scan = new Scan(getBytes(startRow)); if(columns != null && columns.size() != 0) { - for(byte [] column : columns) { - byte [][] famQf = KeyValue.parseColumn(column); + for(ByteBuffer column : columns) { + byte [][] famQf = KeyValue.parseColumn(getBytes(column)); if(famQf.length == 1) { scan.addFamily(famQf[0]); } else { @@ -703,14 +753,15 @@ public class ThriftServer { } } - public int scannerOpenWithStop(byte[] tableName, byte[] startRow, - byte[] stopRow, List columns) throws IOError, TException { + @Override + public int scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, + ByteBuffer stopRow, List columns) throws IOError, TException { try { HTable table = getTable(tableName); - Scan scan = new Scan(startRow, stopRow); + Scan scan = new Scan(getBytes(startRow), getBytes(stopRow)); if(columns != null && columns.size() != 0) { - for(byte [] column : columns) { - byte [][] famQf = KeyValue.parseColumn(column); + for(ByteBuffer column : columns) { + byte [][] famQf = KeyValue.parseColumn(getBytes(column)); if(famQf.length == 1) { scan.addFamily(famQf[0]); } else { @@ -725,16 +776,19 @@ public class ThriftServer { } @Override - public int scannerOpenWithPrefix(byte[] tableName, byte[] startAndPrefix, List columns) throws IOError, TException { + public int scannerOpenWithPrefix(ByteBuffer tableName, + ByteBuffer startAndPrefix, + List columns) + throws IOError, TException { try { HTable table = getTable(tableName); - Scan scan = new Scan(startAndPrefix); + Scan scan = new Scan(getBytes(startAndPrefix)); Filter f = new WhileMatchFilter( - new PrefixFilter(startAndPrefix)); + new PrefixFilter(getBytes(startAndPrefix))); scan.setFilter(f); if(columns != null && columns.size() != 0) { - for(byte [] column : columns) { - byte [][] famQf = KeyValue.parseColumn(column); + for(ByteBuffer column : columns) { + byte [][] famQf = KeyValue.parseColumn(getBytes(column)); if(famQf.length == 1) { scan.addFamily(famQf[0]); } else { @@ -748,15 +802,16 @@ public class ThriftServer { } } - public int scannerOpenTs(byte[] tableName, byte[] startRow, - List columns, long timestamp) throws IOError, TException { + @Override + public int scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, + List columns, long timestamp) throws IOError, TException { try { HTable table = getTable(tableName); - Scan scan = new Scan(startRow); + Scan scan = new Scan(getBytes(startRow)); scan.setTimeRange(Long.MIN_VALUE, timestamp); if(columns != null && columns.size() != 0) { - for(byte [] column : columns) { - byte [][] famQf = KeyValue.parseColumn(column); + for(ByteBuffer column : columns) { + byte [][] famQf = KeyValue.parseColumn(getBytes(column)); if(famQf.length == 1) { scan.addFamily(famQf[0]); } else { @@ -770,16 +825,17 @@ public class ThriftServer { } } - public int scannerOpenWithStopTs(byte[] tableName, byte[] startRow, - byte[] stopRow, List columns, long timestamp) + @Override + public int scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, + ByteBuffer stopRow, List columns, long timestamp) throws IOError, TException { try { HTable table = getTable(tableName); - Scan scan = new Scan(startRow, stopRow); + Scan scan = new Scan(getBytes(startRow), getBytes(stopRow)); scan.setTimeRange(Long.MIN_VALUE, timestamp); if(columns != null && columns.size() != 0) { - for(byte [] column : columns) { - byte [][] famQf = KeyValue.parseColumn(column); + for(ByteBuffer column : columns) { + byte [][] famQf = KeyValue.parseColumn(getBytes(column)); if(famQf.length == 1) { scan.addFamily(famQf[0]); } else { @@ -794,11 +850,12 @@ public class ThriftServer { } } - public Map getColumnDescriptors( - byte[] tableName) throws IOError, TException { + @Override + public Map getColumnDescriptors( + ByteBuffer tableName) throws IOError, TException { try { - TreeMap columns = - new TreeMap(Bytes.BYTES_COMPARATOR); + TreeMap columns = + new TreeMap(); HTable table = getTable(tableName); HTableDescriptor desc = table.getTableDescriptor(); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java b/src/main/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java index 518aa41..5018267 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java @@ -18,6 +18,7 @@ package org.apache.hadoop.hbase.thrift; +import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import java.util.TreeMap; @@ -52,10 +53,10 @@ public class ThriftUtilities { StoreFile.BloomType bt = BloomType.valueOf(in.bloomFilterType); - if (in.name == null || in.name.length <= 0) { + if (in.name == null || !in.name.hasRemaining()) { throw new IllegalArgument("column name is empty"); } - byte [] parsedName = KeyValue.parseColumn(in.name)[0]; + byte [] parsedName = KeyValue.parseColumn(Bytes.getBytes(in.name))[0]; HColumnDescriptor col = new HColumnDescriptor(parsedName, in.maxVersions, comp.getName(), in.inMemory, in.blockCacheEnabled, in.timeToLive, bt.toString()); @@ -72,7 +73,7 @@ public class ThriftUtilities { */ static public ColumnDescriptor colDescFromHbase(HColumnDescriptor in) { ColumnDescriptor col = new ColumnDescriptor(); - col.name = Bytes.add(in.getName(), KeyValue.COLUMN_FAMILY_DELIM_ARRAY); + col.name = ByteBuffer.wrap(Bytes.add(in.getName(), KeyValue.COLUMN_FAMILY_DELIM_ARRAY)); col.maxVersions = in.getMaxVersions(); col.compression = in.getCompression().toString(); col.inMemory = in.isInMemory(); @@ -92,7 +93,7 @@ public class ThriftUtilities { static public List cellFromHBase(KeyValue in) { List list = new ArrayList(1); if (in != null) { - list.add(new TCell(in.getValue(), in.getTimestamp())); + list.add(new TCell(ByteBuffer.wrap(in.getValue()), in.getTimestamp())); } return list; } @@ -108,7 +109,7 @@ public class ThriftUtilities { if (in != null) { list = new ArrayList(in.length); for (int i = 0; i < in.length; i++) { - list.add(new TCell(in[i].getValue(), in[i].getTimestamp())); + list.add(new TCell(ByteBuffer.wrap(in[i].getValue()), in[i].getTimestamp())); } } else { list = new ArrayList(0); @@ -132,13 +133,15 @@ public class ThriftUtilities { continue; } TRowResult result = new TRowResult(); - result.row = result_.getRow(); - result.columns = new TreeMap(Bytes.BYTES_COMPARATOR); + result.row = ByteBuffer.wrap(result_.getRow()); + result.columns = new TreeMap(); for(KeyValue kv : result_.sorted()) { - result.columns.put(KeyValue.makeColumn(kv.getFamily(), - kv.getQualifier()), new TCell(kv.getValue(), kv.getTimestamp())); + result.columns.put( + ByteBuffer.wrap(KeyValue.makeColumn(kv.getFamily(), + kv.getQualifier())), + new TCell(ByteBuffer.wrap(kv.getValue()), kv.getTimestamp())); } - results.add(result); + results.add(result); } return results; } diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java b/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java index f071fbe..910b9d4 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java @@ -15,19 +15,22 @@ 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; /** * An AlreadyExists exceptions signals that a table with the specified * name already exists */ -public class AlreadyExists extends Exception implements TBase, java.io.Serializable, Cloneable, Comparable { +public class AlreadyExists extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("AlreadyExists"); private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); @@ -38,12 +41,10 @@ public class AlreadyExists extends Exception implements TBase byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -52,7 +53,12 @@ public class AlreadyExists extends Exception implements TBase metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(AlreadyExists.class, metaDataMap); } @@ -123,9 +129,9 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializable, Cloneable, Comparable { +public class BatchMutation implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("BatchMutation"); private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)1); private static final TField MUTATIONS_FIELD_DESC = new TField("mutations", TType.LIST, (short)2); - public byte[] row; + public ByteBuffer row; public List mutations; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -40,12 +43,10 @@ public class BatchMutation implements TBase, java.io.Seri ROW((short)1, "row"), MUTATIONS((short)2, "mutations"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -54,7 +55,14 @@ public class BatchMutation implements TBase, java.io.Seri * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // ROW + return ROW; + case 2: // MUTATIONS + return MUTATIONS; + default: + return null; + } } /** @@ -93,15 +101,15 @@ public class BatchMutation implements TBase, java.io.Seri // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.MUTATIONS, new FieldMetaData("mutations", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.MUTATIONS, new FieldMetaData("mutations", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Mutation.class)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(BatchMutation.class, metaDataMap); } @@ -109,7 +117,7 @@ public class BatchMutation implements TBase, java.io.Seri } public BatchMutation( - byte[] row, + ByteBuffer row, List mutations) { this(); @@ -137,16 +145,27 @@ public class BatchMutation implements TBase, java.io.Seri return new BatchMutation(this); } - @Deprecated - public BatchMutation clone() { - return new BatchMutation(this); + @Override + public void clear() { + this.row = null; + this.mutations = null; } public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } public BatchMutation setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public BatchMutation setRow(ByteBuffer row) { this.row = row; return this; } @@ -211,7 +230,7 @@ public class BatchMutation implements TBase, java.io.Seri if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -226,10 +245,6 @@ public class BatchMutation implements TBase, java.io.Seri } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ROW: @@ -242,12 +257,12 @@ public class BatchMutation implements TBase, java.io.Seri throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case ROW: return isSetRow(); @@ -257,10 +272,6 @@ public class BatchMutation implements TBase, java.io.Seri throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -279,7 +290,7 @@ public class BatchMutation implements TBase, java.io.Seri if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -308,25 +319,33 @@ public class BatchMutation implements TBase, java.io.Seri int lastComparison = 0; BatchMutation typedOther = (BatchMutation)other; - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetMutations()).compareTo(isSetMutations()); + lastComparison = Boolean.valueOf(isSetMutations()).compareTo(typedOther.isSetMutations()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(mutations, typedOther.mutations); - if (lastComparison != 0) { - return lastComparison; + if (isSetMutations()) { + lastComparison = TBaseHelper.compareTo(this.mutations, typedOther.mutations); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -336,39 +355,36 @@ public class BatchMutation implements TBase, java.io.Seri if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MUTATIONS: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // MUTATIONS + if (field.type == TType.LIST) { + { + TList _list0 = iprot.readListBegin(); + this.mutations = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) { - TList _list0 = iprot.readListBegin(); - this.mutations = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - Mutation _elem2; - _elem2 = new Mutation(); - _elem2.read(iprot); - this.mutations.add(_elem2); - } - iprot.readListEnd(); + Mutation _elem2; + _elem2 = new Mutation(); + _elem2.read(iprot); + this.mutations.add(_elem2); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java b/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java index a071f3a..eae7ae4 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java @@ -15,12 +15,15 @@ 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; /** @@ -28,7 +31,7 @@ import org.apache.thrift.protocol.*; * such as the number of versions, compression settings, etc. It is * used as input when creating a table or adding a column. */ -public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable, Comparable { +public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("ColumnDescriptor"); private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); @@ -41,7 +44,7 @@ public class ColumnDescriptor implements TBase, java.i private static final TField BLOCK_CACHE_ENABLED_FIELD_DESC = new TField("blockCacheEnabled", TType.BOOL, (short)8); private static final TField TIME_TO_LIVE_FIELD_DESC = new TField("timeToLive", TType.I32, (short)9); - public byte[] name; + public ByteBuffer name; public int maxVersions; public String compression; public boolean inMemory; @@ -63,12 +66,10 @@ public class ColumnDescriptor implements TBase, java.i BLOCK_CACHE_ENABLED((short)8, "blockCacheEnabled"), TIME_TO_LIVE((short)9, "timeToLive"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -77,7 +78,28 @@ public class ColumnDescriptor implements TBase, java.i * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // NAME + return NAME; + case 2: // MAX_VERSIONS + return MAX_VERSIONS; + case 3: // COMPRESSION + return COMPRESSION; + case 4: // IN_MEMORY + return IN_MEMORY; + case 5: // BLOOM_FILTER_TYPE + return BLOOM_FILTER_TYPE; + case 6: // BLOOM_FILTER_VECTOR_SIZE + return BLOOM_FILTER_VECTOR_SIZE; + case 7: // BLOOM_FILTER_NB_HASHES + return BLOOM_FILTER_NB_HASHES; + case 8: // BLOCK_CACHE_ENABLED + return BLOCK_CACHE_ENABLED; + case 9: // TIME_TO_LIVE + return TIME_TO_LIVE; + default: + return null; + } } /** @@ -123,28 +145,28 @@ public class ColumnDescriptor implements TBase, java.i private static final int __TIMETOLIVE_ISSET_ID = 5; private BitSet __isset_bit_vector = new BitSet(6); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.MAX_VERSIONS, new FieldMetaData("maxVersions", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.MAX_VERSIONS, new FieldMetaData("maxVersions", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(_Fields.COMPRESSION, new FieldMetaData("compression", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.COMPRESSION, new FieldMetaData("compression", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(_Fields.IN_MEMORY, new FieldMetaData("inMemory", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IN_MEMORY, new FieldMetaData("inMemory", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(_Fields.BLOOM_FILTER_TYPE, new FieldMetaData("bloomFilterType", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BLOOM_FILTER_TYPE, new FieldMetaData("bloomFilterType", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(_Fields.BLOOM_FILTER_VECTOR_SIZE, new FieldMetaData("bloomFilterVectorSize", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BLOOM_FILTER_VECTOR_SIZE, new FieldMetaData("bloomFilterVectorSize", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(_Fields.BLOOM_FILTER_NB_HASHES, new FieldMetaData("bloomFilterNbHashes", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BLOOM_FILTER_NB_HASHES, new FieldMetaData("bloomFilterNbHashes", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(_Fields.BLOCK_CACHE_ENABLED, new FieldMetaData("blockCacheEnabled", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BLOCK_CACHE_ENABLED, new FieldMetaData("blockCacheEnabled", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(_Fields.TIME_TO_LIVE, new FieldMetaData("timeToLive", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TIME_TO_LIVE, new FieldMetaData("timeToLive", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(ColumnDescriptor.class, metaDataMap); } @@ -168,7 +190,7 @@ public class ColumnDescriptor implements TBase, java.i } public ColumnDescriptor( - byte[] name, + ByteBuffer name, int maxVersions, String compression, boolean inMemory, @@ -223,16 +245,42 @@ public class ColumnDescriptor implements TBase, java.i return new ColumnDescriptor(this); } - @Deprecated - public ColumnDescriptor clone() { - return new ColumnDescriptor(this); + @Override + public void clear() { + this.name = null; + this.maxVersions = 3; + + this.compression = "NONE"; + + this.inMemory = false; + + this.bloomFilterType = "NONE"; + + this.bloomFilterVectorSize = 0; + + this.bloomFilterNbHashes = 0; + + this.blockCacheEnabled = false; + + this.timeToLive = -1; + } public byte[] getName() { - return this.name; + setName(TBaseHelper.rightSize(name)); + return name.array(); + } + + public ByteBuffer BufferForName() { + return name; } public ColumnDescriptor setName(byte[] name) { + setName(ByteBuffer.wrap(name)); + return this; + } + + public ColumnDescriptor setName(ByteBuffer name) { this.name = name; return this; } @@ -444,7 +492,7 @@ public class ColumnDescriptor implements TBase, java.i if (value == null) { unsetName(); } else { - setName((byte[])value); + setName((ByteBuffer)value); } break; @@ -515,10 +563,6 @@ public class ColumnDescriptor implements TBase, java.i } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case NAME: @@ -552,12 +596,12 @@ public class ColumnDescriptor implements TBase, java.i throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case NAME: return isSetName(); @@ -581,10 +625,6 @@ public class ColumnDescriptor implements TBase, java.i throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -603,7 +643,7 @@ public class ColumnDescriptor implements TBase, java.i if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; - if (!java.util.Arrays.equals(this.name, that.name)) + if (!this.name.equals(that.name)) return false; } @@ -695,81 +735,103 @@ public class ColumnDescriptor implements TBase, java.i int lastComparison = 0; ColumnDescriptor typedOther = (ColumnDescriptor)other; - lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName()); + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(name, typedOther.name); - if (lastComparison != 0) { - return lastComparison; + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(isSetMaxVersions()); + lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(typedOther.isSetMaxVersions()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(maxVersions, typedOther.maxVersions); - if (lastComparison != 0) { - return lastComparison; + if (isSetMaxVersions()) { + lastComparison = TBaseHelper.compareTo(this.maxVersions, typedOther.maxVersions); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetCompression()).compareTo(isSetCompression()); + lastComparison = Boolean.valueOf(isSetCompression()).compareTo(typedOther.isSetCompression()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(compression, typedOther.compression); - if (lastComparison != 0) { - return lastComparison; + if (isSetCompression()) { + lastComparison = TBaseHelper.compareTo(this.compression, typedOther.compression); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetInMemory()).compareTo(isSetInMemory()); + lastComparison = Boolean.valueOf(isSetInMemory()).compareTo(typedOther.isSetInMemory()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(inMemory, typedOther.inMemory); - if (lastComparison != 0) { - return lastComparison; + if (isSetInMemory()) { + lastComparison = TBaseHelper.compareTo(this.inMemory, typedOther.inMemory); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetBloomFilterType()).compareTo(isSetBloomFilterType()); + lastComparison = Boolean.valueOf(isSetBloomFilterType()).compareTo(typedOther.isSetBloomFilterType()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(bloomFilterType, typedOther.bloomFilterType); - if (lastComparison != 0) { - return lastComparison; + if (isSetBloomFilterType()) { + lastComparison = TBaseHelper.compareTo(this.bloomFilterType, typedOther.bloomFilterType); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetBloomFilterVectorSize()).compareTo(isSetBloomFilterVectorSize()); + lastComparison = Boolean.valueOf(isSetBloomFilterVectorSize()).compareTo(typedOther.isSetBloomFilterVectorSize()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(bloomFilterVectorSize, typedOther.bloomFilterVectorSize); - if (lastComparison != 0) { - return lastComparison; + if (isSetBloomFilterVectorSize()) { + lastComparison = TBaseHelper.compareTo(this.bloomFilterVectorSize, typedOther.bloomFilterVectorSize); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetBloomFilterNbHashes()).compareTo(isSetBloomFilterNbHashes()); + lastComparison = Boolean.valueOf(isSetBloomFilterNbHashes()).compareTo(typedOther.isSetBloomFilterNbHashes()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(bloomFilterNbHashes, typedOther.bloomFilterNbHashes); - if (lastComparison != 0) { - return lastComparison; + if (isSetBloomFilterNbHashes()) { + lastComparison = TBaseHelper.compareTo(this.bloomFilterNbHashes, typedOther.bloomFilterNbHashes); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetBlockCacheEnabled()).compareTo(isSetBlockCacheEnabled()); + lastComparison = Boolean.valueOf(isSetBlockCacheEnabled()).compareTo(typedOther.isSetBlockCacheEnabled()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(blockCacheEnabled, typedOther.blockCacheEnabled); - if (lastComparison != 0) { - return lastComparison; + if (isSetBlockCacheEnabled()) { + lastComparison = TBaseHelper.compareTo(this.blockCacheEnabled, typedOther.blockCacheEnabled); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetTimeToLive()).compareTo(isSetTimeToLive()); + lastComparison = Boolean.valueOf(isSetTimeToLive()).compareTo(typedOther.isSetTimeToLive()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(timeToLive, typedOther.timeToLive); - if (lastComparison != 0) { - return lastComparison; + if (isSetTimeToLive()) { + lastComparison = TBaseHelper.compareTo(this.timeToLive, typedOther.timeToLive); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -779,83 +841,80 @@ public class ColumnDescriptor implements TBase, java.i if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MAX_VERSIONS: - if (field.type == TType.I32) { - this.maxVersions = iprot.readI32(); - setMaxVersionsIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COMPRESSION: - if (field.type == TType.STRING) { - this.compression = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IN_MEMORY: - if (field.type == TType.BOOL) { - this.inMemory = iprot.readBool(); - setInMemoryIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case BLOOM_FILTER_TYPE: - if (field.type == TType.STRING) { - this.bloomFilterType = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case BLOOM_FILTER_VECTOR_SIZE: - if (field.type == TType.I32) { - this.bloomFilterVectorSize = iprot.readI32(); - setBloomFilterVectorSizeIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case BLOOM_FILTER_NB_HASHES: - if (field.type == TType.I32) { - this.bloomFilterNbHashes = iprot.readI32(); - setBloomFilterNbHashesIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case BLOCK_CACHE_ENABLED: - if (field.type == TType.BOOL) { - this.blockCacheEnabled = iprot.readBool(); - setBlockCacheEnabledIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TIME_TO_LIVE: - if (field.type == TType.I32) { - this.timeToLive = iprot.readI32(); - setTimeToLiveIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // MAX_VERSIONS + if (field.type == TType.I32) { + this.maxVersions = iprot.readI32(); + setMaxVersionsIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COMPRESSION + if (field.type == TType.STRING) { + this.compression = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // IN_MEMORY + if (field.type == TType.BOOL) { + this.inMemory = iprot.readBool(); + setInMemoryIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // BLOOM_FILTER_TYPE + if (field.type == TType.STRING) { + this.bloomFilterType = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // BLOOM_FILTER_VECTOR_SIZE + if (field.type == TType.I32) { + this.bloomFilterVectorSize = iprot.readI32(); + setBloomFilterVectorSizeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 7: // BLOOM_FILTER_NB_HASHES + if (field.type == TType.I32) { + this.bloomFilterNbHashes = iprot.readI32(); + setBloomFilterNbHashesIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 8: // BLOCK_CACHE_ENABLED + if (field.type == TType.BOOL) { + this.blockCacheEnabled = iprot.readBool(); + setBlockCacheEnabledIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 9: // TIME_TO_LIVE + if (field.type == TType.I32) { + this.timeToLive = iprot.readI32(); + setTimeToLiveIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java b/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java index c3beec1..568f3a1 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java @@ -15,12 +15,15 @@ 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; public class Hbase { @@ -32,7 +35,7 @@ public class Hbase { * * @param tableName name of the table */ - public void enableTable(byte[] tableName) throws IOError, TException; + public void enableTable(ByteBuffer tableName) throws IOError, TException; /** * Disables a table (takes it off-line) If it is being served, the master @@ -40,25 +43,25 @@ public class Hbase { * * @param tableName name of the table */ - public void disableTable(byte[] tableName) throws IOError, TException; + public void disableTable(ByteBuffer tableName) throws IOError, TException; /** * @return true if table is on-line * * @param tableName name of the table to check */ - public boolean isTableEnabled(byte[] tableName) throws IOError, TException; + public boolean isTableEnabled(ByteBuffer tableName) throws IOError, TException; - public void compact(byte[] tableNameOrRegionName) throws IOError, TException; + public void compact(ByteBuffer tableNameOrRegionName) throws IOError, TException; - public void majorCompact(byte[] tableNameOrRegionName) throws IOError, TException; + public void majorCompact(ByteBuffer tableNameOrRegionName) throws IOError, TException; /** * List all the userspace tables. * * @return returns a list of names */ - public List getTableNames() throws IOError, TException; + public List getTableNames() throws IOError, TException; /** * List all the column families assoicated with a table. @@ -67,7 +70,7 @@ public class Hbase { * * @param tableName table name */ - public Map getColumnDescriptors(byte[] tableName) throws IOError, TException; + public Map getColumnDescriptors(ByteBuffer tableName) throws IOError, TException; /** * List the regions associated with a table. @@ -76,7 +79,7 @@ public class Hbase { * * @param tableName table name */ - public List getTableRegions(byte[] tableName) throws IOError, TException; + public List getTableRegions(ByteBuffer tableName) throws IOError, TException; /** * Create a table with the specified column families. The name @@ -92,7 +95,7 @@ public class Hbase { * * @param columnFamilies list of column family descriptors */ - public void createTable(byte[] tableName, List columnFamilies) throws IOError, IllegalArgument, AlreadyExists, TException; + public void createTable(ByteBuffer tableName, List columnFamilies) throws IOError, IllegalArgument, AlreadyExists, TException; /** * Deletes a table @@ -102,7 +105,7 @@ public class Hbase { * * @param tableName name of table to delete */ - public void deleteTable(byte[] tableName) throws IOError, TException; + public void deleteTable(ByteBuffer tableName) throws IOError, TException; /** * Get a single TCell for the specified table, row, and column at the @@ -116,7 +119,7 @@ public class Hbase { * * @param column column name */ - public List get(byte[] tableName, byte[] row, byte[] column) throws IOError, TException; + public List get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws IOError, TException; /** * Get the specified number of versions for the specified table, @@ -132,7 +135,7 @@ public class Hbase { * * @param numVersions number of versions to retrieve */ - public List getVer(byte[] tableName, byte[] row, byte[] column, int numVersions) throws IOError, TException; + public List getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions) throws IOError, TException; /** * Get the specified number of versions for the specified table, @@ -151,7 +154,7 @@ public class Hbase { * * @param numVersions number of versions to retrieve */ - public List getVerTs(byte[] tableName, byte[] row, byte[] column, long timestamp, int numVersions) throws IOError, TException; + public List getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions) throws IOError, TException; /** * Get all the data for the specified table and row at the latest @@ -163,7 +166,7 @@ public class Hbase { * * @param row row key */ - public List getRow(byte[] tableName, byte[] row) throws IOError, TException; + public List getRow(ByteBuffer tableName, ByteBuffer row) throws IOError, TException; /** * Get the specified columns for the specified table and row at the latest @@ -177,7 +180,7 @@ public class Hbase { * * @param columns List of columns to return, null for all columns */ - public List getRowWithColumns(byte[] tableName, byte[] row, List columns) throws IOError, TException; + public List getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List columns) throws IOError, TException; /** * Get all the data for the specified table and row at the specified @@ -191,7 +194,7 @@ public class Hbase { * * @param timestamp timestamp */ - public List getRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, TException; + public List getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws IOError, TException; /** * Get the specified columns for the specified table and row at the specified @@ -207,7 +210,7 @@ public class Hbase { * * @param timestamp */ - public List getRowWithColumnsTs(byte[] tableName, byte[] row, List columns, long timestamp) throws IOError, TException; + public List getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List columns, long timestamp) throws IOError, TException; /** * Apply a series of mutations (updates/deletes) to a row in a @@ -221,7 +224,7 @@ public class Hbase { * * @param mutations list of mutation commands */ - public void mutateRow(byte[] tableName, byte[] row, List mutations) throws IOError, IllegalArgument, TException; + public void mutateRow(ByteBuffer tableName, ByteBuffer row, List mutations) throws IOError, IllegalArgument, TException; /** * Apply a series of mutations (updates/deletes) to a row in a @@ -237,7 +240,7 @@ public class Hbase { * * @param timestamp timestamp */ - public void mutateRowTs(byte[] tableName, byte[] row, List mutations, long timestamp) throws IOError, IllegalArgument, TException; + public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List mutations, long timestamp) throws IOError, IllegalArgument, TException; /** * Apply a series of batches (each a series of mutations on a single row) @@ -249,7 +252,7 @@ public class Hbase { * * @param rowBatches list of row batches */ - public void mutateRows(byte[] tableName, List rowBatches) throws IOError, IllegalArgument, TException; + public void mutateRows(ByteBuffer tableName, List rowBatches) throws IOError, IllegalArgument, TException; /** * Apply a series of batches (each a series of mutations on a single row) @@ -263,7 +266,7 @@ public class Hbase { * * @param timestamp timestamp */ - public void mutateRowsTs(byte[] tableName, List rowBatches, long timestamp) throws IOError, IllegalArgument, TException; + public void mutateRowsTs(ByteBuffer tableName, List rowBatches, long timestamp) throws IOError, IllegalArgument, TException; /** * Atomically increment the column value specified. Returns the next value post increment. @@ -276,7 +279,7 @@ public class Hbase { * * @param value amount to increment by */ - public long atomicIncrement(byte[] tableName, byte[] row, byte[] column, long value) throws IOError, IllegalArgument, TException; + public long atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value) throws IOError, IllegalArgument, TException; /** * Do an async series of atomic increments. @@ -296,7 +299,7 @@ public class Hbase { * * @param column name of column whose value is to be deleted */ - public void deleteAll(byte[] tableName, byte[] row, byte[] column) throws IOError, TException; + public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws IOError, TException; /** * Delete all cells that match the passed row and column and whose @@ -310,7 +313,7 @@ public class Hbase { * * @param timestamp timestamp */ - public void deleteAllTs(byte[] tableName, byte[] row, byte[] column, long timestamp) throws IOError, TException; + public void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp) throws IOError, TException; /** * Completely delete the row's cells. @@ -319,7 +322,7 @@ public class Hbase { * * @param row key of the row to be completely deleted. */ - public void deleteAllRow(byte[] tableName, byte[] row) throws IOError, TException; + public void deleteAllRow(ByteBuffer tableName, ByteBuffer row) throws IOError, TException; /** * Completely delete the row's cells marked with a timestamp @@ -331,7 +334,7 @@ public class Hbase { * * @param timestamp timestamp */ - public void deleteAllRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, TException; + public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws IOError, TException; /** * Get a scanner on the current table starting at the specified row and @@ -348,7 +351,7 @@ public class Hbase { * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public int scannerOpen(byte[] tableName, byte[] startRow, List columns) throws IOError, TException; + public int scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List columns) throws IOError, TException; /** * Get a scanner on the current table starting and stopping at the @@ -369,7 +372,7 @@ public class Hbase { * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public int scannerOpenWithStop(byte[] tableName, byte[] startRow, byte[] stopRow, List columns) throws IOError, TException; + public int scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns) throws IOError, TException; /** * Open a scanner for a given prefix. That is all rows will have the specified @@ -383,7 +386,7 @@ public class Hbase { * * @param columns the columns you want returned */ - public int scannerOpenWithPrefix(byte[] tableName, byte[] startAndPrefix, List columns) throws IOError, TException; + public int scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List columns) throws IOError, TException; /** * Get a scanner on the current table starting at the specified row and @@ -403,7 +406,7 @@ public class Hbase { * * @param timestamp timestamp */ - public int scannerOpenTs(byte[] tableName, byte[] startRow, List columns, long timestamp) throws IOError, TException; + public int scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List columns, long timestamp) throws IOError, TException; /** * Get a scanner on the current table starting and stopping at the @@ -427,7 +430,7 @@ public class Hbase { * * @param timestamp timestamp */ - public int scannerOpenWithStopTs(byte[] tableName, byte[] startRow, byte[] stopRow, List columns, long timestamp) throws IOError, TException; + public int scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, long timestamp) throws IOError, TException; /** * Returns the scanner's current row value and advances to the next @@ -485,11 +488,97 @@ public class Hbase { * @param column * @param rows */ - public List parallelGet(byte[] tableName, byte[] column, List rows) throws IOError, TException; + public List parallelGet(ByteBuffer tableName, ByteBuffer column, List rows) throws IOError, TException; } - public static class Client implements Iface { + public interface AsyncIface { + + public void enableTable(ByteBuffer tableName, AsyncMethodCallback resultHandler) throws TException; + + public void disableTable(ByteBuffer tableName, AsyncMethodCallback resultHandler) throws TException; + + public void isTableEnabled(ByteBuffer tableName, AsyncMethodCallback resultHandler) throws TException; + + public void compact(ByteBuffer tableNameOrRegionName, AsyncMethodCallback resultHandler) throws TException; + + public void majorCompact(ByteBuffer tableNameOrRegionName, AsyncMethodCallback resultHandler) throws TException; + + public void getTableNames(AsyncMethodCallback resultHandler) throws TException; + + public void getColumnDescriptors(ByteBuffer tableName, AsyncMethodCallback resultHandler) throws TException; + + public void getTableRegions(ByteBuffer tableName, AsyncMethodCallback resultHandler) throws TException; + + public void createTable(ByteBuffer tableName, List columnFamilies, AsyncMethodCallback resultHandler) throws TException; + + public void deleteTable(ByteBuffer tableName, AsyncMethodCallback resultHandler) throws TException; + + public void get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, AsyncMethodCallback resultHandler) throws TException; + + public void getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, AsyncMethodCallback resultHandler) throws TException; + + public void getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, AsyncMethodCallback resultHandler) throws TException; + + public void getRow(ByteBuffer tableName, ByteBuffer row, AsyncMethodCallback resultHandler) throws TException; + + public void getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List columns, AsyncMethodCallback resultHandler) throws TException; + + public void getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, AsyncMethodCallback resultHandler) throws TException; + + public void getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List columns, long timestamp, AsyncMethodCallback resultHandler) throws TException; + + public void mutateRow(ByteBuffer tableName, ByteBuffer row, List mutations, AsyncMethodCallback resultHandler) throws TException; + + public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List mutations, long timestamp, AsyncMethodCallback resultHandler) throws TException; + + public void mutateRows(ByteBuffer tableName, List rowBatches, AsyncMethodCallback resultHandler) throws TException; + + public void mutateRowsTs(ByteBuffer tableName, List rowBatches, long timestamp, AsyncMethodCallback resultHandler) throws TException; + + public void atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value, AsyncMethodCallback resultHandler) throws TException; + + public void asyncAtomicIncrements(List increments, AsyncMethodCallback resultHandler) throws TException; + + public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, AsyncMethodCallback resultHandler) throws TException; + + public void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, AsyncMethodCallback resultHandler) throws TException; + + public void deleteAllRow(ByteBuffer tableName, ByteBuffer row, AsyncMethodCallback resultHandler) throws TException; + + public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, AsyncMethodCallback resultHandler) throws TException; + + public void scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List columns, AsyncMethodCallback resultHandler) throws TException; + + public void scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, AsyncMethodCallback resultHandler) throws TException; + + public void scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List columns, AsyncMethodCallback resultHandler) throws TException; + + public void scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List columns, long timestamp, AsyncMethodCallback resultHandler) throws TException; + + public void scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, long timestamp, AsyncMethodCallback resultHandler) throws TException; + + public void scannerGet(int id, AsyncMethodCallback resultHandler) throws TException; + + public void scannerGetList(int id, int nbRows, AsyncMethodCallback resultHandler) throws TException; + + public void scannerClose(int id, AsyncMethodCallback resultHandler) throws TException; + + public void parallelGet(ByteBuffer tableName, ByteBuffer column, List rows, AsyncMethodCallback resultHandler) throws TException; + + } + + public static class Client implements TServiceClient, Iface { + public static class Factory implements TServiceClientFactory { + public Factory() {} + public Client getClient(TProtocol prot) { + return new Client(prot); + } + public Client getClient(TProtocol iprot, TProtocol oprot) { + return new Client(iprot, oprot); + } + } + public Client(TProtocol prot) { this(prot, prot); @@ -516,17 +605,17 @@ public class Hbase { return this.oprot_; } - public void enableTable(byte[] tableName) throws IOError, TException + public void enableTable(ByteBuffer tableName) throws IOError, TException { send_enableTable(tableName); recv_enableTable(); } - public void send_enableTable(byte[] tableName) throws TException + public void send_enableTable(ByteBuffer tableName) throws TException { - oprot_.writeMessageBegin(new TMessage("enableTable", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("enableTable", TMessageType.CALL, ++seqid_)); enableTable_args args = new enableTable_args(); - args.tableName = tableName; + args.setTableName(tableName); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -540,6 +629,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "enableTable failed: out of sequence response"); + } enableTable_result result = new enableTable_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -549,17 +641,17 @@ public class Hbase { return; } - public void disableTable(byte[] tableName) throws IOError, TException + public void disableTable(ByteBuffer tableName) throws IOError, TException { send_disableTable(tableName); recv_disableTable(); } - public void send_disableTable(byte[] tableName) throws TException + public void send_disableTable(ByteBuffer tableName) throws TException { - oprot_.writeMessageBegin(new TMessage("disableTable", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("disableTable", TMessageType.CALL, ++seqid_)); disableTable_args args = new disableTable_args(); - args.tableName = tableName; + args.setTableName(tableName); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -573,6 +665,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "disableTable failed: out of sequence response"); + } disableTable_result result = new disableTable_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -582,17 +677,17 @@ public class Hbase { return; } - public boolean isTableEnabled(byte[] tableName) throws IOError, TException + public boolean isTableEnabled(ByteBuffer tableName) throws IOError, TException { send_isTableEnabled(tableName); return recv_isTableEnabled(); } - public void send_isTableEnabled(byte[] tableName) throws TException + public void send_isTableEnabled(ByteBuffer tableName) throws TException { - oprot_.writeMessageBegin(new TMessage("isTableEnabled", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("isTableEnabled", TMessageType.CALL, ++seqid_)); isTableEnabled_args args = new isTableEnabled_args(); - args.tableName = tableName; + args.setTableName(tableName); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -606,6 +701,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "isTableEnabled failed: out of sequence response"); + } isTableEnabled_result result = new isTableEnabled_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -618,17 +716,17 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "isTableEnabled failed: unknown result"); } - public void compact(byte[] tableNameOrRegionName) throws IOError, TException + public void compact(ByteBuffer tableNameOrRegionName) throws IOError, TException { send_compact(tableNameOrRegionName); recv_compact(); } - public void send_compact(byte[] tableNameOrRegionName) throws TException + public void send_compact(ByteBuffer tableNameOrRegionName) throws TException { - oprot_.writeMessageBegin(new TMessage("compact", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("compact", TMessageType.CALL, ++seqid_)); compact_args args = new compact_args(); - args.tableNameOrRegionName = tableNameOrRegionName; + args.setTableNameOrRegionName(tableNameOrRegionName); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -642,6 +740,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "compact failed: out of sequence response"); + } compact_result result = new compact_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -651,17 +752,17 @@ public class Hbase { return; } - public void majorCompact(byte[] tableNameOrRegionName) throws IOError, TException + public void majorCompact(ByteBuffer tableNameOrRegionName) throws IOError, TException { send_majorCompact(tableNameOrRegionName); recv_majorCompact(); } - public void send_majorCompact(byte[] tableNameOrRegionName) throws TException + public void send_majorCompact(ByteBuffer tableNameOrRegionName) throws TException { - oprot_.writeMessageBegin(new TMessage("majorCompact", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("majorCompact", TMessageType.CALL, ++seqid_)); majorCompact_args args = new majorCompact_args(); - args.tableNameOrRegionName = tableNameOrRegionName; + args.setTableNameOrRegionName(tableNameOrRegionName); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -675,6 +776,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "majorCompact failed: out of sequence response"); + } majorCompact_result result = new majorCompact_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -684,7 +788,7 @@ public class Hbase { return; } - public List getTableNames() throws IOError, TException + public List getTableNames() throws IOError, TException { send_getTableNames(); return recv_getTableNames(); @@ -692,14 +796,14 @@ public class Hbase { public void send_getTableNames() throws TException { - oprot_.writeMessageBegin(new TMessage("getTableNames", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getTableNames", TMessageType.CALL, ++seqid_)); getTableNames_args args = new getTableNames_args(); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } - public List recv_getTableNames() throws IOError, TException + public List recv_getTableNames() throws IOError, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { @@ -707,6 +811,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getTableNames failed: out of sequence response"); + } getTableNames_result result = new getTableNames_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -719,23 +826,23 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTableNames failed: unknown result"); } - public Map getColumnDescriptors(byte[] tableName) throws IOError, TException + public Map getColumnDescriptors(ByteBuffer tableName) throws IOError, TException { send_getColumnDescriptors(tableName); return recv_getColumnDescriptors(); } - public void send_getColumnDescriptors(byte[] tableName) throws TException + public void send_getColumnDescriptors(ByteBuffer tableName) throws TException { - oprot_.writeMessageBegin(new TMessage("getColumnDescriptors", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getColumnDescriptors", TMessageType.CALL, ++seqid_)); getColumnDescriptors_args args = new getColumnDescriptors_args(); - args.tableName = tableName; + args.setTableName(tableName); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } - public Map recv_getColumnDescriptors() throws IOError, TException + public Map recv_getColumnDescriptors() throws IOError, TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { @@ -743,6 +850,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getColumnDescriptors failed: out of sequence response"); + } getColumnDescriptors_result result = new getColumnDescriptors_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -755,17 +865,17 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "getColumnDescriptors failed: unknown result"); } - public List getTableRegions(byte[] tableName) throws IOError, TException + public List getTableRegions(ByteBuffer tableName) throws IOError, TException { send_getTableRegions(tableName); return recv_getTableRegions(); } - public void send_getTableRegions(byte[] tableName) throws TException + public void send_getTableRegions(ByteBuffer tableName) throws TException { - oprot_.writeMessageBegin(new TMessage("getTableRegions", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getTableRegions", TMessageType.CALL, ++seqid_)); getTableRegions_args args = new getTableRegions_args(); - args.tableName = tableName; + args.setTableName(tableName); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -779,6 +889,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getTableRegions failed: out of sequence response"); + } getTableRegions_result result = new getTableRegions_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -791,18 +904,18 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTableRegions failed: unknown result"); } - public void createTable(byte[] tableName, List columnFamilies) throws IOError, IllegalArgument, AlreadyExists, TException + public void createTable(ByteBuffer tableName, List columnFamilies) throws IOError, IllegalArgument, AlreadyExists, TException { send_createTable(tableName, columnFamilies); recv_createTable(); } - public void send_createTable(byte[] tableName, List columnFamilies) throws TException + public void send_createTable(ByteBuffer tableName, List columnFamilies) throws TException { - oprot_.writeMessageBegin(new TMessage("createTable", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("createTable", TMessageType.CALL, ++seqid_)); createTable_args args = new createTable_args(); - args.tableName = tableName; - args.columnFamilies = columnFamilies; + args.setTableName(tableName); + args.setColumnFamilies(columnFamilies); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -816,6 +929,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "createTable failed: out of sequence response"); + } createTable_result result = new createTable_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -831,17 +947,17 @@ public class Hbase { return; } - public void deleteTable(byte[] tableName) throws IOError, TException + public void deleteTable(ByteBuffer tableName) throws IOError, TException { send_deleteTable(tableName); recv_deleteTable(); } - public void send_deleteTable(byte[] tableName) throws TException + public void send_deleteTable(ByteBuffer tableName) throws TException { - oprot_.writeMessageBegin(new TMessage("deleteTable", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("deleteTable", TMessageType.CALL, ++seqid_)); deleteTable_args args = new deleteTable_args(); - args.tableName = tableName; + args.setTableName(tableName); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -855,6 +971,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "deleteTable failed: out of sequence response"); + } deleteTable_result result = new deleteTable_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -864,19 +983,19 @@ public class Hbase { return; } - public List get(byte[] tableName, byte[] row, byte[] column) throws IOError, TException + public List get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws IOError, TException { send_get(tableName, row, column); return recv_get(); } - public void send_get(byte[] tableName, byte[] row, byte[] column) throws TException + public void send_get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws TException { - oprot_.writeMessageBegin(new TMessage("get", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get", TMessageType.CALL, ++seqid_)); get_args args = new get_args(); - args.tableName = tableName; - args.row = row; - args.column = column; + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -890,6 +1009,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get failed: out of sequence response"); + } get_result result = new get_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -902,20 +1024,20 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "get failed: unknown result"); } - public List getVer(byte[] tableName, byte[] row, byte[] column, int numVersions) throws IOError, TException + public List getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions) throws IOError, TException { send_getVer(tableName, row, column, numVersions); return recv_getVer(); } - public void send_getVer(byte[] tableName, byte[] row, byte[] column, int numVersions) throws TException + public void send_getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions) throws TException { - oprot_.writeMessageBegin(new TMessage("getVer", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getVer", TMessageType.CALL, ++seqid_)); getVer_args args = new getVer_args(); - args.tableName = tableName; - args.row = row; - args.column = column; - args.numVersions = numVersions; + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setNumVersions(numVersions); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -929,6 +1051,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getVer failed: out of sequence response"); + } getVer_result result = new getVer_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -941,21 +1066,21 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "getVer failed: unknown result"); } - public List getVerTs(byte[] tableName, byte[] row, byte[] column, long timestamp, int numVersions) throws IOError, TException + public List getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions) throws IOError, TException { send_getVerTs(tableName, row, column, timestamp, numVersions); return recv_getVerTs(); } - public void send_getVerTs(byte[] tableName, byte[] row, byte[] column, long timestamp, int numVersions) throws TException + public void send_getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions) throws TException { - oprot_.writeMessageBegin(new TMessage("getVerTs", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getVerTs", TMessageType.CALL, ++seqid_)); getVerTs_args args = new getVerTs_args(); - args.tableName = tableName; - args.row = row; - args.column = column; - args.timestamp = timestamp; - args.numVersions = numVersions; + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setTimestamp(timestamp); + args.setNumVersions(numVersions); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -969,6 +1094,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getVerTs failed: out of sequence response"); + } getVerTs_result result = new getVerTs_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -981,18 +1109,18 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "getVerTs failed: unknown result"); } - public List getRow(byte[] tableName, byte[] row) throws IOError, TException + public List getRow(ByteBuffer tableName, ByteBuffer row) throws IOError, TException { send_getRow(tableName, row); return recv_getRow(); } - public void send_getRow(byte[] tableName, byte[] row) throws TException + public void send_getRow(ByteBuffer tableName, ByteBuffer row) throws TException { - oprot_.writeMessageBegin(new TMessage("getRow", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getRow", TMessageType.CALL, ++seqid_)); getRow_args args = new getRow_args(); - args.tableName = tableName; - args.row = row; + args.setTableName(tableName); + args.setRow(row); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1006,6 +1134,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getRow failed: out of sequence response"); + } getRow_result result = new getRow_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1018,19 +1149,19 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRow failed: unknown result"); } - public List getRowWithColumns(byte[] tableName, byte[] row, List columns) throws IOError, TException + public List getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List columns) throws IOError, TException { send_getRowWithColumns(tableName, row, columns); return recv_getRowWithColumns(); } - public void send_getRowWithColumns(byte[] tableName, byte[] row, List columns) throws TException + public void send_getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List columns) throws TException { - oprot_.writeMessageBegin(new TMessage("getRowWithColumns", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getRowWithColumns", TMessageType.CALL, ++seqid_)); getRowWithColumns_args args = new getRowWithColumns_args(); - args.tableName = tableName; - args.row = row; - args.columns = columns; + args.setTableName(tableName); + args.setRow(row); + args.setColumns(columns); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1044,6 +1175,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getRowWithColumns failed: out of sequence response"); + } getRowWithColumns_result result = new getRowWithColumns_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1056,19 +1190,19 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRowWithColumns failed: unknown result"); } - public List getRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, TException + public List getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws IOError, TException { send_getRowTs(tableName, row, timestamp); return recv_getRowTs(); } - public void send_getRowTs(byte[] tableName, byte[] row, long timestamp) throws TException + public void send_getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws TException { - oprot_.writeMessageBegin(new TMessage("getRowTs", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getRowTs", TMessageType.CALL, ++seqid_)); getRowTs_args args = new getRowTs_args(); - args.tableName = tableName; - args.row = row; - args.timestamp = timestamp; + args.setTableName(tableName); + args.setRow(row); + args.setTimestamp(timestamp); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1082,6 +1216,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getRowTs failed: out of sequence response"); + } getRowTs_result result = new getRowTs_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1094,20 +1231,20 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRowTs failed: unknown result"); } - public List getRowWithColumnsTs(byte[] tableName, byte[] row, List columns, long timestamp) throws IOError, TException + public List getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List columns, long timestamp) throws IOError, TException { send_getRowWithColumnsTs(tableName, row, columns, timestamp); return recv_getRowWithColumnsTs(); } - public void send_getRowWithColumnsTs(byte[] tableName, byte[] row, List columns, long timestamp) throws TException + public void send_getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List columns, long timestamp) throws TException { - oprot_.writeMessageBegin(new TMessage("getRowWithColumnsTs", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getRowWithColumnsTs", TMessageType.CALL, ++seqid_)); getRowWithColumnsTs_args args = new getRowWithColumnsTs_args(); - args.tableName = tableName; - args.row = row; - args.columns = columns; - args.timestamp = timestamp; + args.setTableName(tableName); + args.setRow(row); + args.setColumns(columns); + args.setTimestamp(timestamp); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1121,6 +1258,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getRowWithColumnsTs failed: out of sequence response"); + } getRowWithColumnsTs_result result = new getRowWithColumnsTs_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1133,19 +1273,19 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRowWithColumnsTs failed: unknown result"); } - public void mutateRow(byte[] tableName, byte[] row, List mutations) throws IOError, IllegalArgument, TException + public void mutateRow(ByteBuffer tableName, ByteBuffer row, List mutations) throws IOError, IllegalArgument, TException { send_mutateRow(tableName, row, mutations); recv_mutateRow(); } - public void send_mutateRow(byte[] tableName, byte[] row, List mutations) throws TException + public void send_mutateRow(ByteBuffer tableName, ByteBuffer row, List mutations) throws TException { - oprot_.writeMessageBegin(new TMessage("mutateRow", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("mutateRow", TMessageType.CALL, ++seqid_)); mutateRow_args args = new mutateRow_args(); - args.tableName = tableName; - args.row = row; - args.mutations = mutations; + args.setTableName(tableName); + args.setRow(row); + args.setMutations(mutations); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1159,6 +1299,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "mutateRow failed: out of sequence response"); + } mutateRow_result result = new mutateRow_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1171,20 +1314,20 @@ public class Hbase { return; } - public void mutateRowTs(byte[] tableName, byte[] row, List mutations, long timestamp) throws IOError, IllegalArgument, TException + public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List mutations, long timestamp) throws IOError, IllegalArgument, TException { send_mutateRowTs(tableName, row, mutations, timestamp); recv_mutateRowTs(); } - public void send_mutateRowTs(byte[] tableName, byte[] row, List mutations, long timestamp) throws TException + public void send_mutateRowTs(ByteBuffer tableName, ByteBuffer row, List mutations, long timestamp) throws TException { - oprot_.writeMessageBegin(new TMessage("mutateRowTs", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("mutateRowTs", TMessageType.CALL, ++seqid_)); mutateRowTs_args args = new mutateRowTs_args(); - args.tableName = tableName; - args.row = row; - args.mutations = mutations; - args.timestamp = timestamp; + args.setTableName(tableName); + args.setRow(row); + args.setMutations(mutations); + args.setTimestamp(timestamp); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1198,6 +1341,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "mutateRowTs failed: out of sequence response"); + } mutateRowTs_result result = new mutateRowTs_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1210,18 +1356,18 @@ public class Hbase { return; } - public void mutateRows(byte[] tableName, List rowBatches) throws IOError, IllegalArgument, TException + public void mutateRows(ByteBuffer tableName, List rowBatches) throws IOError, IllegalArgument, TException { send_mutateRows(tableName, rowBatches); recv_mutateRows(); } - public void send_mutateRows(byte[] tableName, List rowBatches) throws TException + public void send_mutateRows(ByteBuffer tableName, List rowBatches) throws TException { - oprot_.writeMessageBegin(new TMessage("mutateRows", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("mutateRows", TMessageType.CALL, ++seqid_)); mutateRows_args args = new mutateRows_args(); - args.tableName = tableName; - args.rowBatches = rowBatches; + args.setTableName(tableName); + args.setRowBatches(rowBatches); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1235,6 +1381,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "mutateRows failed: out of sequence response"); + } mutateRows_result result = new mutateRows_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1247,19 +1396,19 @@ public class Hbase { return; } - public void mutateRowsTs(byte[] tableName, List rowBatches, long timestamp) throws IOError, IllegalArgument, TException + public void mutateRowsTs(ByteBuffer tableName, List rowBatches, long timestamp) throws IOError, IllegalArgument, TException { send_mutateRowsTs(tableName, rowBatches, timestamp); recv_mutateRowsTs(); } - public void send_mutateRowsTs(byte[] tableName, List rowBatches, long timestamp) throws TException + public void send_mutateRowsTs(ByteBuffer tableName, List rowBatches, long timestamp) throws TException { - oprot_.writeMessageBegin(new TMessage("mutateRowsTs", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("mutateRowsTs", TMessageType.CALL, ++seqid_)); mutateRowsTs_args args = new mutateRowsTs_args(); - args.tableName = tableName; - args.rowBatches = rowBatches; - args.timestamp = timestamp; + args.setTableName(tableName); + args.setRowBatches(rowBatches); + args.setTimestamp(timestamp); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1273,6 +1422,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "mutateRowsTs failed: out of sequence response"); + } mutateRowsTs_result result = new mutateRowsTs_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1285,20 +1437,20 @@ public class Hbase { return; } - public long atomicIncrement(byte[] tableName, byte[] row, byte[] column, long value) throws IOError, IllegalArgument, TException + public long atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value) throws IOError, IllegalArgument, TException { send_atomicIncrement(tableName, row, column, value); return recv_atomicIncrement(); } - public void send_atomicIncrement(byte[] tableName, byte[] row, byte[] column, long value) throws TException + public void send_atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value) throws TException { - oprot_.writeMessageBegin(new TMessage("atomicIncrement", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("atomicIncrement", TMessageType.CALL, ++seqid_)); atomicIncrement_args args = new atomicIncrement_args(); - args.tableName = tableName; - args.row = row; - args.column = column; - args.value = value; + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setValue(value); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1312,6 +1464,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "atomicIncrement failed: out of sequence response"); + } atomicIncrement_result result = new atomicIncrement_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1334,27 +1489,27 @@ public class Hbase { public void send_asyncAtomicIncrements(List increments) throws TException { - oprot_.writeMessageBegin(new TMessage("asyncAtomicIncrements", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("asyncAtomicIncrements", TMessageType.CALL, ++seqid_)); asyncAtomicIncrements_args args = new asyncAtomicIncrements_args(); - args.increments = increments; + args.setIncrements(increments); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } - public void deleteAll(byte[] tableName, byte[] row, byte[] column) throws IOError, TException + public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws IOError, TException { send_deleteAll(tableName, row, column); recv_deleteAll(); } - public void send_deleteAll(byte[] tableName, byte[] row, byte[] column) throws TException + public void send_deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column) throws TException { - oprot_.writeMessageBegin(new TMessage("deleteAll", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("deleteAll", TMessageType.CALL, ++seqid_)); deleteAll_args args = new deleteAll_args(); - args.tableName = tableName; - args.row = row; - args.column = column; + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1368,6 +1523,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "deleteAll failed: out of sequence response"); + } deleteAll_result result = new deleteAll_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1377,20 +1535,20 @@ public class Hbase { return; } - public void deleteAllTs(byte[] tableName, byte[] row, byte[] column, long timestamp) throws IOError, TException + public void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp) throws IOError, TException { send_deleteAllTs(tableName, row, column, timestamp); recv_deleteAllTs(); } - public void send_deleteAllTs(byte[] tableName, byte[] row, byte[] column, long timestamp) throws TException + public void send_deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp) throws TException { - oprot_.writeMessageBegin(new TMessage("deleteAllTs", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("deleteAllTs", TMessageType.CALL, ++seqid_)); deleteAllTs_args args = new deleteAllTs_args(); - args.tableName = tableName; - args.row = row; - args.column = column; - args.timestamp = timestamp; + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setTimestamp(timestamp); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1404,6 +1562,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "deleteAllTs failed: out of sequence response"); + } deleteAllTs_result result = new deleteAllTs_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1413,18 +1574,18 @@ public class Hbase { return; } - public void deleteAllRow(byte[] tableName, byte[] row) throws IOError, TException + public void deleteAllRow(ByteBuffer tableName, ByteBuffer row) throws IOError, TException { send_deleteAllRow(tableName, row); recv_deleteAllRow(); } - public void send_deleteAllRow(byte[] tableName, byte[] row) throws TException + public void send_deleteAllRow(ByteBuffer tableName, ByteBuffer row) throws TException { - oprot_.writeMessageBegin(new TMessage("deleteAllRow", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("deleteAllRow", TMessageType.CALL, ++seqid_)); deleteAllRow_args args = new deleteAllRow_args(); - args.tableName = tableName; - args.row = row; + args.setTableName(tableName); + args.setRow(row); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1438,6 +1599,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "deleteAllRow failed: out of sequence response"); + } deleteAllRow_result result = new deleteAllRow_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1447,19 +1611,19 @@ public class Hbase { return; } - public void deleteAllRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, TException + public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws IOError, TException { send_deleteAllRowTs(tableName, row, timestamp); recv_deleteAllRowTs(); } - public void send_deleteAllRowTs(byte[] tableName, byte[] row, long timestamp) throws TException + public void send_deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp) throws TException { - oprot_.writeMessageBegin(new TMessage("deleteAllRowTs", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("deleteAllRowTs", TMessageType.CALL, ++seqid_)); deleteAllRowTs_args args = new deleteAllRowTs_args(); - args.tableName = tableName; - args.row = row; - args.timestamp = timestamp; + args.setTableName(tableName); + args.setRow(row); + args.setTimestamp(timestamp); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1473,6 +1637,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "deleteAllRowTs failed: out of sequence response"); + } deleteAllRowTs_result result = new deleteAllRowTs_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1482,19 +1649,19 @@ public class Hbase { return; } - public int scannerOpen(byte[] tableName, byte[] startRow, List columns) throws IOError, TException + public int scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List columns) throws IOError, TException { send_scannerOpen(tableName, startRow, columns); return recv_scannerOpen(); } - public void send_scannerOpen(byte[] tableName, byte[] startRow, List columns) throws TException + public void send_scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List columns) throws TException { - oprot_.writeMessageBegin(new TMessage("scannerOpen", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("scannerOpen", TMessageType.CALL, ++seqid_)); scannerOpen_args args = new scannerOpen_args(); - args.tableName = tableName; - args.startRow = startRow; - args.columns = columns; + args.setTableName(tableName); + args.setStartRow(startRow); + args.setColumns(columns); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1508,6 +1675,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "scannerOpen failed: out of sequence response"); + } scannerOpen_result result = new scannerOpen_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1520,20 +1690,20 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpen failed: unknown result"); } - public int scannerOpenWithStop(byte[] tableName, byte[] startRow, byte[] stopRow, List columns) throws IOError, TException + public int scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns) throws IOError, TException { send_scannerOpenWithStop(tableName, startRow, stopRow, columns); return recv_scannerOpenWithStop(); } - public void send_scannerOpenWithStop(byte[] tableName, byte[] startRow, byte[] stopRow, List columns) throws TException + public void send_scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns) throws TException { - oprot_.writeMessageBegin(new TMessage("scannerOpenWithStop", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("scannerOpenWithStop", TMessageType.CALL, ++seqid_)); scannerOpenWithStop_args args = new scannerOpenWithStop_args(); - args.tableName = tableName; - args.startRow = startRow; - args.stopRow = stopRow; - args.columns = columns; + args.setTableName(tableName); + args.setStartRow(startRow); + args.setStopRow(stopRow); + args.setColumns(columns); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1547,6 +1717,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "scannerOpenWithStop failed: out of sequence response"); + } scannerOpenWithStop_result result = new scannerOpenWithStop_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1559,19 +1732,19 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithStop failed: unknown result"); } - public int scannerOpenWithPrefix(byte[] tableName, byte[] startAndPrefix, List columns) throws IOError, TException + public int scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List columns) throws IOError, TException { send_scannerOpenWithPrefix(tableName, startAndPrefix, columns); return recv_scannerOpenWithPrefix(); } - public void send_scannerOpenWithPrefix(byte[] tableName, byte[] startAndPrefix, List columns) throws TException + public void send_scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List columns) throws TException { - oprot_.writeMessageBegin(new TMessage("scannerOpenWithPrefix", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("scannerOpenWithPrefix", TMessageType.CALL, ++seqid_)); scannerOpenWithPrefix_args args = new scannerOpenWithPrefix_args(); - args.tableName = tableName; - args.startAndPrefix = startAndPrefix; - args.columns = columns; + args.setTableName(tableName); + args.setStartAndPrefix(startAndPrefix); + args.setColumns(columns); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1585,6 +1758,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "scannerOpenWithPrefix failed: out of sequence response"); + } scannerOpenWithPrefix_result result = new scannerOpenWithPrefix_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1597,20 +1773,20 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithPrefix failed: unknown result"); } - public int scannerOpenTs(byte[] tableName, byte[] startRow, List columns, long timestamp) throws IOError, TException + public int scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List columns, long timestamp) throws IOError, TException { send_scannerOpenTs(tableName, startRow, columns, timestamp); return recv_scannerOpenTs(); } - public void send_scannerOpenTs(byte[] tableName, byte[] startRow, List columns, long timestamp) throws TException + public void send_scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List columns, long timestamp) throws TException { - oprot_.writeMessageBegin(new TMessage("scannerOpenTs", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("scannerOpenTs", TMessageType.CALL, ++seqid_)); scannerOpenTs_args args = new scannerOpenTs_args(); - args.tableName = tableName; - args.startRow = startRow; - args.columns = columns; - args.timestamp = timestamp; + args.setTableName(tableName); + args.setStartRow(startRow); + args.setColumns(columns); + args.setTimestamp(timestamp); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1624,6 +1800,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "scannerOpenTs failed: out of sequence response"); + } scannerOpenTs_result result = new scannerOpenTs_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1636,21 +1815,21 @@ public class Hbase { throw new TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenTs failed: unknown result"); } - public int scannerOpenWithStopTs(byte[] tableName, byte[] startRow, byte[] stopRow, List columns, long timestamp) throws IOError, TException + public int scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, long timestamp) throws IOError, TException { send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp); return recv_scannerOpenWithStopTs(); } - public void send_scannerOpenWithStopTs(byte[] tableName, byte[] startRow, byte[] stopRow, List columns, long timestamp) throws TException + public void send_scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, long timestamp) throws TException { - oprot_.writeMessageBegin(new TMessage("scannerOpenWithStopTs", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("scannerOpenWithStopTs", TMessageType.CALL, ++seqid_)); scannerOpenWithStopTs_args args = new scannerOpenWithStopTs_args(); - args.tableName = tableName; - args.startRow = startRow; - args.stopRow = stopRow; - args.columns = columns; - args.timestamp = timestamp; + args.setTableName(tableName); + args.setStartRow(startRow); + args.setStopRow(stopRow); + args.setColumns(columns); + args.setTimestamp(timestamp); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1664,6 +1843,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "scannerOpenWithStopTs failed: out of sequence response"); + } scannerOpenWithStopTs_result result = new scannerOpenWithStopTs_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1684,9 +1866,9 @@ public class Hbase { public void send_scannerGet(int id) throws TException { - oprot_.writeMessageBegin(new TMessage("scannerGet", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("scannerGet", TMessageType.CALL, ++seqid_)); scannerGet_args args = new scannerGet_args(); - args.id = id; + args.setId(id); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1700,6 +1882,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "scannerGet failed: out of sequence response"); + } scannerGet_result result = new scannerGet_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1723,10 +1908,10 @@ public class Hbase { public void send_scannerGetList(int id, int nbRows) throws TException { - oprot_.writeMessageBegin(new TMessage("scannerGetList", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("scannerGetList", TMessageType.CALL, ++seqid_)); scannerGetList_args args = new scannerGetList_args(); - args.id = id; - args.nbRows = nbRows; + args.setId(id); + args.setNbRows(nbRows); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1740,6 +1925,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "scannerGetList failed: out of sequence response"); + } scannerGetList_result result = new scannerGetList_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1763,9 +1951,9 @@ public class Hbase { public void send_scannerClose(int id) throws TException { - oprot_.writeMessageBegin(new TMessage("scannerClose", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("scannerClose", TMessageType.CALL, ++seqid_)); scannerClose_args args = new scannerClose_args(); - args.id = id; + args.setId(id); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1779,6 +1967,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "scannerClose failed: out of sequence response"); + } scannerClose_result result = new scannerClose_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1791,19 +1982,19 @@ public class Hbase { return; } - public List parallelGet(byte[] tableName, byte[] column, List rows) throws IOError, TException + public List parallelGet(ByteBuffer tableName, ByteBuffer column, List rows) throws IOError, TException { send_parallelGet(tableName, column, rows); return recv_parallelGet(); } - public void send_parallelGet(byte[] tableName, byte[] column, List rows) throws TException + public void send_parallelGet(ByteBuffer tableName, ByteBuffer column, List rows) throws TException { - oprot_.writeMessageBegin(new TMessage("parallelGet", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("parallelGet", TMessageType.CALL, ++seqid_)); parallelGet_args args = new parallelGet_args(); - args.tableName = tableName; - args.column = column; - args.rows = rows; + args.setTableName(tableName); + args.setColumn(column); + args.setRows(rows); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1817,6 +2008,9 @@ public class Hbase { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "parallelGet failed: out of sequence response"); + } parallelGet_result result = new parallelGet_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1830,6 +2024,1299 @@ public class Hbase { } } + public static class AsyncClient extends TAsyncClient implements AsyncIface { + public static class Factory implements TAsyncClientFactory { + private TAsyncClientManager clientManager; + private TProtocolFactory protocolFactory; + public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) { + this.clientManager = clientManager; + this.protocolFactory = protocolFactory; + } + public AsyncClient getAsyncClient(TNonblockingTransport transport) { + return new AsyncClient(protocolFactory, clientManager, transport); + } + } + + public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) { + super(protocolFactory, clientManager, transport); + } + + public void enableTable(ByteBuffer tableName, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + enableTable_call method_call = new enableTable_call(tableName, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class enableTable_call extends TAsyncMethodCall { + private ByteBuffer tableName; + public enableTable_call(ByteBuffer tableName, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("enableTable", TMessageType.CALL, 0)); + enableTable_args args = new enableTable_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_enableTable(); + } + } + + public void disableTable(ByteBuffer tableName, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + disableTable_call method_call = new disableTable_call(tableName, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class disableTable_call extends TAsyncMethodCall { + private ByteBuffer tableName; + public disableTable_call(ByteBuffer tableName, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("disableTable", TMessageType.CALL, 0)); + disableTable_args args = new disableTable_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_disableTable(); + } + } + + public void isTableEnabled(ByteBuffer tableName, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + isTableEnabled_call method_call = new isTableEnabled_call(tableName, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class isTableEnabled_call extends TAsyncMethodCall { + private ByteBuffer tableName; + public isTableEnabled_call(ByteBuffer tableName, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("isTableEnabled", TMessageType.CALL, 0)); + isTableEnabled_args args = new isTableEnabled_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_isTableEnabled(); + } + } + + public void compact(ByteBuffer tableNameOrRegionName, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + compact_call method_call = new compact_call(tableNameOrRegionName, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class compact_call extends TAsyncMethodCall { + private ByteBuffer tableNameOrRegionName; + public compact_call(ByteBuffer tableNameOrRegionName, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableNameOrRegionName = tableNameOrRegionName; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("compact", TMessageType.CALL, 0)); + compact_args args = new compact_args(); + args.setTableNameOrRegionName(tableNameOrRegionName); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_compact(); + } + } + + public void majorCompact(ByteBuffer tableNameOrRegionName, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + majorCompact_call method_call = new majorCompact_call(tableNameOrRegionName, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class majorCompact_call extends TAsyncMethodCall { + private ByteBuffer tableNameOrRegionName; + public majorCompact_call(ByteBuffer tableNameOrRegionName, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableNameOrRegionName = tableNameOrRegionName; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("majorCompact", TMessageType.CALL, 0)); + majorCompact_args args = new majorCompact_args(); + args.setTableNameOrRegionName(tableNameOrRegionName); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_majorCompact(); + } + } + + public void getTableNames(AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getTableNames_call method_call = new getTableNames_call(resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getTableNames_call extends TAsyncMethodCall { + public getTableNames_call(AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getTableNames", TMessageType.CALL, 0)); + getTableNames_args args = new getTableNames_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getTableNames(); + } + } + + public void getColumnDescriptors(ByteBuffer tableName, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getColumnDescriptors_call method_call = new getColumnDescriptors_call(tableName, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getColumnDescriptors_call extends TAsyncMethodCall { + private ByteBuffer tableName; + public getColumnDescriptors_call(ByteBuffer tableName, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getColumnDescriptors", TMessageType.CALL, 0)); + getColumnDescriptors_args args = new getColumnDescriptors_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); + } + + public Map getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getColumnDescriptors(); + } + } + + public void getTableRegions(ByteBuffer tableName, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getTableRegions_call method_call = new getTableRegions_call(tableName, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getTableRegions_call extends TAsyncMethodCall { + private ByteBuffer tableName; + public getTableRegions_call(ByteBuffer tableName, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getTableRegions", TMessageType.CALL, 0)); + getTableRegions_args args = new getTableRegions_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getTableRegions(); + } + } + + public void createTable(ByteBuffer tableName, List columnFamilies, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + createTable_call method_call = new createTable_call(tableName, columnFamilies, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class createTable_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private List columnFamilies; + public createTable_call(ByteBuffer tableName, List columnFamilies, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.columnFamilies = columnFamilies; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("createTable", TMessageType.CALL, 0)); + createTable_args args = new createTable_args(); + args.setTableName(tableName); + args.setColumnFamilies(columnFamilies); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, IllegalArgument, AlreadyExists, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_createTable(); + } + } + + public void deleteTable(ByteBuffer tableName, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + deleteTable_call method_call = new deleteTable_call(tableName, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class deleteTable_call extends TAsyncMethodCall { + private ByteBuffer tableName; + public deleteTable_call(ByteBuffer tableName, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("deleteTable", TMessageType.CALL, 0)); + deleteTable_args args = new deleteTable_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_deleteTable(); + } + } + + public void get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_call method_call = new get_call(tableName, row, column, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private ByteBuffer column; + public get_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.column = column; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get", TMessageType.CALL, 0)); + get_args args = new get_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get(); + } + } + + public void getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getVer_call method_call = new getVer_call(tableName, row, column, numVersions, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getVer_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private ByteBuffer column; + private int numVersions; + public getVer_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.column = column; + this.numVersions = numVersions; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getVer", TMessageType.CALL, 0)); + getVer_args args = new getVer_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setNumVersions(numVersions); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getVer(); + } + } + + public void getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getVerTs_call method_call = new getVerTs_call(tableName, row, column, timestamp, numVersions, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getVerTs_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private ByteBuffer column; + private long timestamp; + private int numVersions; + public getVerTs_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.column = column; + this.timestamp = timestamp; + this.numVersions = numVersions; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getVerTs", TMessageType.CALL, 0)); + getVerTs_args args = new getVerTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setTimestamp(timestamp); + args.setNumVersions(numVersions); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getVerTs(); + } + } + + public void getRow(ByteBuffer tableName, ByteBuffer row, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getRow_call method_call = new getRow_call(tableName, row, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getRow_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + public getRow_call(ByteBuffer tableName, ByteBuffer row, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getRow", TMessageType.CALL, 0)); + getRow_args args = new getRow_args(); + args.setTableName(tableName); + args.setRow(row); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRow(); + } + } + + public void getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List columns, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getRowWithColumns_call method_call = new getRowWithColumns_call(tableName, row, columns, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getRowWithColumns_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private List columns; + public getRowWithColumns_call(ByteBuffer tableName, ByteBuffer row, List columns, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.columns = columns; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getRowWithColumns", TMessageType.CALL, 0)); + getRowWithColumns_args args = new getRowWithColumns_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumns(columns); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRowWithColumns(); + } + } + + public void getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getRowTs_call method_call = new getRowTs_call(tableName, row, timestamp, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getRowTs_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private long timestamp; + public getRowTs_call(ByteBuffer tableName, ByteBuffer row, long timestamp, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.timestamp = timestamp; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getRowTs", TMessageType.CALL, 0)); + getRowTs_args args = new getRowTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setTimestamp(timestamp); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRowTs(); + } + } + + public void getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List columns, long timestamp, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getRowWithColumnsTs_call method_call = new getRowWithColumnsTs_call(tableName, row, columns, timestamp, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getRowWithColumnsTs_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private List columns; + private long timestamp; + public getRowWithColumnsTs_call(ByteBuffer tableName, ByteBuffer row, List columns, long timestamp, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.columns = columns; + this.timestamp = timestamp; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getRowWithColumnsTs", TMessageType.CALL, 0)); + getRowWithColumnsTs_args args = new getRowWithColumnsTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumns(columns); + args.setTimestamp(timestamp); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRowWithColumnsTs(); + } + } + + public void mutateRow(ByteBuffer tableName, ByteBuffer row, List mutations, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + mutateRow_call method_call = new mutateRow_call(tableName, row, mutations, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class mutateRow_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private List mutations; + public mutateRow_call(ByteBuffer tableName, ByteBuffer row, List mutations, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.mutations = mutations; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("mutateRow", TMessageType.CALL, 0)); + mutateRow_args args = new mutateRow_args(); + args.setTableName(tableName); + args.setRow(row); + args.setMutations(mutations); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, IllegalArgument, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_mutateRow(); + } + } + + public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List mutations, long timestamp, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + mutateRowTs_call method_call = new mutateRowTs_call(tableName, row, mutations, timestamp, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class mutateRowTs_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private List mutations; + private long timestamp; + public mutateRowTs_call(ByteBuffer tableName, ByteBuffer row, List mutations, long timestamp, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.mutations = mutations; + this.timestamp = timestamp; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("mutateRowTs", TMessageType.CALL, 0)); + mutateRowTs_args args = new mutateRowTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setMutations(mutations); + args.setTimestamp(timestamp); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, IllegalArgument, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_mutateRowTs(); + } + } + + public void mutateRows(ByteBuffer tableName, List rowBatches, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + mutateRows_call method_call = new mutateRows_call(tableName, rowBatches, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class mutateRows_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private List rowBatches; + public mutateRows_call(ByteBuffer tableName, List rowBatches, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.rowBatches = rowBatches; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("mutateRows", TMessageType.CALL, 0)); + mutateRows_args args = new mutateRows_args(); + args.setTableName(tableName); + args.setRowBatches(rowBatches); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, IllegalArgument, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_mutateRows(); + } + } + + public void mutateRowsTs(ByteBuffer tableName, List rowBatches, long timestamp, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + mutateRowsTs_call method_call = new mutateRowsTs_call(tableName, rowBatches, timestamp, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class mutateRowsTs_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private List rowBatches; + private long timestamp; + public mutateRowsTs_call(ByteBuffer tableName, List rowBatches, long timestamp, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.rowBatches = rowBatches; + this.timestamp = timestamp; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("mutateRowsTs", TMessageType.CALL, 0)); + mutateRowsTs_args args = new mutateRowsTs_args(); + args.setTableName(tableName); + args.setRowBatches(rowBatches); + args.setTimestamp(timestamp); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, IllegalArgument, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_mutateRowsTs(); + } + } + + public void atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + atomicIncrement_call method_call = new atomicIncrement_call(tableName, row, column, value, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class atomicIncrement_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private ByteBuffer column; + private long value; + public atomicIncrement_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.column = column; + this.value = value; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("atomicIncrement", TMessageType.CALL, 0)); + atomicIncrement_args args = new atomicIncrement_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setValue(value); + args.write(prot); + prot.writeMessageEnd(); + } + + public long getResult() throws IOError, IllegalArgument, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_atomicIncrement(); + } + } + + public void asyncAtomicIncrements(List increments, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + asyncAtomicIncrements_call method_call = new asyncAtomicIncrements_call(increments, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class asyncAtomicIncrements_call extends TAsyncMethodCall { + private List increments; + public asyncAtomicIncrements_call(List increments, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, true); + this.increments = increments; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("asyncAtomicIncrements", TMessageType.CALL, 0)); + asyncAtomicIncrements_args args = new asyncAtomicIncrements_args(); + args.setIncrements(increments); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + } + } + + public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + deleteAll_call method_call = new deleteAll_call(tableName, row, column, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class deleteAll_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private ByteBuffer column; + public deleteAll_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.column = column; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("deleteAll", TMessageType.CALL, 0)); + deleteAll_args args = new deleteAll_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_deleteAll(); + } + } + + public void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + deleteAllTs_call method_call = new deleteAllTs_call(tableName, row, column, timestamp, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class deleteAllTs_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private ByteBuffer column; + private long timestamp; + public deleteAllTs_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.column = column; + this.timestamp = timestamp; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("deleteAllTs", TMessageType.CALL, 0)); + deleteAllTs_args args = new deleteAllTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setTimestamp(timestamp); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_deleteAllTs(); + } + } + + public void deleteAllRow(ByteBuffer tableName, ByteBuffer row, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + deleteAllRow_call method_call = new deleteAllRow_call(tableName, row, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class deleteAllRow_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + public deleteAllRow_call(ByteBuffer tableName, ByteBuffer row, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("deleteAllRow", TMessageType.CALL, 0)); + deleteAllRow_args args = new deleteAllRow_args(); + args.setTableName(tableName); + args.setRow(row); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_deleteAllRow(); + } + } + + public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + deleteAllRowTs_call method_call = new deleteAllRowTs_call(tableName, row, timestamp, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class deleteAllRowTs_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private long timestamp; + public deleteAllRowTs_call(ByteBuffer tableName, ByteBuffer row, long timestamp, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.timestamp = timestamp; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("deleteAllRowTs", TMessageType.CALL, 0)); + deleteAllRowTs_args args = new deleteAllRowTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setTimestamp(timestamp); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_deleteAllRowTs(); + } + } + + public void scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List columns, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + scannerOpen_call method_call = new scannerOpen_call(tableName, startRow, columns, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class scannerOpen_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer startRow; + private List columns; + public scannerOpen_call(ByteBuffer tableName, ByteBuffer startRow, List columns, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.startRow = startRow; + this.columns = columns; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("scannerOpen", TMessageType.CALL, 0)); + scannerOpen_args args = new scannerOpen_args(); + args.setTableName(tableName); + args.setStartRow(startRow); + args.setColumns(columns); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerOpen(); + } + } + + public void scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + scannerOpenWithStop_call method_call = new scannerOpenWithStop_call(tableName, startRow, stopRow, columns, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class scannerOpenWithStop_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer startRow; + private ByteBuffer stopRow; + private List columns; + public scannerOpenWithStop_call(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.startRow = startRow; + this.stopRow = stopRow; + this.columns = columns; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("scannerOpenWithStop", TMessageType.CALL, 0)); + scannerOpenWithStop_args args = new scannerOpenWithStop_args(); + args.setTableName(tableName); + args.setStartRow(startRow); + args.setStopRow(stopRow); + args.setColumns(columns); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerOpenWithStop(); + } + } + + public void scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List columns, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + scannerOpenWithPrefix_call method_call = new scannerOpenWithPrefix_call(tableName, startAndPrefix, columns, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class scannerOpenWithPrefix_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer startAndPrefix; + private List columns; + public scannerOpenWithPrefix_call(ByteBuffer tableName, ByteBuffer startAndPrefix, List columns, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.startAndPrefix = startAndPrefix; + this.columns = columns; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("scannerOpenWithPrefix", TMessageType.CALL, 0)); + scannerOpenWithPrefix_args args = new scannerOpenWithPrefix_args(); + args.setTableName(tableName); + args.setStartAndPrefix(startAndPrefix); + args.setColumns(columns); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerOpenWithPrefix(); + } + } + + public void scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List columns, long timestamp, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + scannerOpenTs_call method_call = new scannerOpenTs_call(tableName, startRow, columns, timestamp, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class scannerOpenTs_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer startRow; + private List columns; + private long timestamp; + public scannerOpenTs_call(ByteBuffer tableName, ByteBuffer startRow, List columns, long timestamp, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.startRow = startRow; + this.columns = columns; + this.timestamp = timestamp; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("scannerOpenTs", TMessageType.CALL, 0)); + scannerOpenTs_args args = new scannerOpenTs_args(); + args.setTableName(tableName); + args.setStartRow(startRow); + args.setColumns(columns); + args.setTimestamp(timestamp); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerOpenTs(); + } + } + + public void scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, long timestamp, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + scannerOpenWithStopTs_call method_call = new scannerOpenWithStopTs_call(tableName, startRow, stopRow, columns, timestamp, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class scannerOpenWithStopTs_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer startRow; + private ByteBuffer stopRow; + private List columns; + private long timestamp; + public scannerOpenWithStopTs_call(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, long timestamp, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.startRow = startRow; + this.stopRow = stopRow; + this.columns = columns; + this.timestamp = timestamp; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("scannerOpenWithStopTs", TMessageType.CALL, 0)); + scannerOpenWithStopTs_args args = new scannerOpenWithStopTs_args(); + args.setTableName(tableName); + args.setStartRow(startRow); + args.setStopRow(stopRow); + args.setColumns(columns); + args.setTimestamp(timestamp); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerOpenWithStopTs(); + } + } + + public void scannerGet(int id, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + scannerGet_call method_call = new scannerGet_call(id, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class scannerGet_call extends TAsyncMethodCall { + private int id; + public scannerGet_call(int id, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.id = id; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("scannerGet", TMessageType.CALL, 0)); + scannerGet_args args = new scannerGet_args(); + args.setId(id); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, IllegalArgument, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerGet(); + } + } + + public void scannerGetList(int id, int nbRows, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + scannerGetList_call method_call = new scannerGetList_call(id, nbRows, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class scannerGetList_call extends TAsyncMethodCall { + private int id; + private int nbRows; + public scannerGetList_call(int id, int nbRows, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.id = id; + this.nbRows = nbRows; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("scannerGetList", TMessageType.CALL, 0)); + scannerGetList_args args = new scannerGetList_args(); + args.setId(id); + args.setNbRows(nbRows); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, IllegalArgument, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerGetList(); + } + } + + public void scannerClose(int id, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + scannerClose_call method_call = new scannerClose_call(id, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class scannerClose_call extends TAsyncMethodCall { + private int id; + public scannerClose_call(int id, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.id = id; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("scannerClose", TMessageType.CALL, 0)); + scannerClose_args args = new scannerClose_args(); + args.setId(id); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, IllegalArgument, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_scannerClose(); + } + } + + public void parallelGet(ByteBuffer tableName, ByteBuffer column, List rows, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + parallelGet_call method_call = new parallelGet_call(tableName, column, rows, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class parallelGet_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer column; + private List rows; + public parallelGet_call(ByteBuffer tableName, ByteBuffer column, List rows, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.column = column; + this.rows = rows; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("parallelGet", TMessageType.CALL, 0)); + parallelGet_args args = new parallelGet_args(); + args.setTableName(tableName); + args.setColumn(column); + args.setRows(rows); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_parallelGet(); + } + } + + } + public static class Processor implements TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(Iface iface) @@ -1902,7 +3389,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { enableTable_args args = new enableTable_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("enableTable", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); enableTable_result result = new enableTable_result(); try { @@ -1930,7 +3427,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { disableTable_args args = new disableTable_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("disableTable", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); disableTable_result result = new disableTable_result(); try { @@ -1958,7 +3465,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { isTableEnabled_args args = new isTableEnabled_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("isTableEnabled", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); isTableEnabled_result result = new isTableEnabled_result(); try { @@ -1987,7 +3504,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { compact_args args = new compact_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("compact", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); compact_result result = new compact_result(); try { @@ -2015,7 +3542,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { majorCompact_args args = new majorCompact_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("majorCompact", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); majorCompact_result result = new majorCompact_result(); try { @@ -2043,7 +3580,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getTableNames_args args = new getTableNames_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("getTableNames", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getTableNames_result result = new getTableNames_result(); try { @@ -2071,7 +3618,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getColumnDescriptors_args args = new getColumnDescriptors_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("getColumnDescriptors", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getColumnDescriptors_result result = new getColumnDescriptors_result(); try { @@ -2099,7 +3656,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getTableRegions_args args = new getTableRegions_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("getTableRegions", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getTableRegions_result result = new getTableRegions_result(); try { @@ -2127,7 +3694,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { createTable_args args = new createTable_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("createTable", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); createTable_result result = new createTable_result(); try { @@ -2159,7 +3736,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { deleteTable_args args = new deleteTable_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("deleteTable", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); deleteTable_result result = new deleteTable_result(); try { @@ -2187,7 +3774,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_args args = new get_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_result result = new get_result(); try { @@ -2215,7 +3812,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getVer_args args = new getVer_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("getVer", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getVer_result result = new getVer_result(); try { @@ -2243,7 +3850,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getVerTs_args args = new getVerTs_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("getVerTs", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getVerTs_result result = new getVerTs_result(); try { @@ -2271,7 +3888,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getRow_args args = new getRow_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("getRow", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getRow_result result = new getRow_result(); try { @@ -2299,7 +3926,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getRowWithColumns_args args = new getRowWithColumns_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("getRowWithColumns", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getRowWithColumns_result result = new getRowWithColumns_result(); try { @@ -2327,7 +3964,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getRowTs_args args = new getRowTs_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("getRowTs", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getRowTs_result result = new getRowTs_result(); try { @@ -2355,7 +4002,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getRowWithColumnsTs_args args = new getRowWithColumnsTs_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("getRowWithColumnsTs", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getRowWithColumnsTs_result result = new getRowWithColumnsTs_result(); try { @@ -2383,7 +4040,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { mutateRow_args args = new mutateRow_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("mutateRow", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); mutateRow_result result = new mutateRow_result(); try { @@ -2413,7 +4080,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { mutateRowTs_args args = new mutateRowTs_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("mutateRowTs", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); mutateRowTs_result result = new mutateRowTs_result(); try { @@ -2443,7 +4120,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { mutateRows_args args = new mutateRows_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("mutateRows", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); mutateRows_result result = new mutateRows_result(); try { @@ -2473,7 +4160,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { mutateRowsTs_args args = new mutateRowsTs_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("mutateRowsTs", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); mutateRowsTs_result result = new mutateRowsTs_result(); try { @@ -2503,7 +4200,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { atomicIncrement_args args = new atomicIncrement_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("atomicIncrement", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); atomicIncrement_result result = new atomicIncrement_result(); try { @@ -2534,7 +4241,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { asyncAtomicIncrements_args args = new asyncAtomicIncrements_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("asyncAtomicIncrements", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); iface_.asyncAtomicIncrements(args.increments); return; @@ -2545,7 +4262,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { deleteAll_args args = new deleteAll_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("deleteAll", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); deleteAll_result result = new deleteAll_result(); try { @@ -2573,7 +4300,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { deleteAllTs_args args = new deleteAllTs_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("deleteAllTs", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); deleteAllTs_result result = new deleteAllTs_result(); try { @@ -2601,7 +4338,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { deleteAllRow_args args = new deleteAllRow_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("deleteAllRow", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); deleteAllRow_result result = new deleteAllRow_result(); try { @@ -2629,7 +4376,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { deleteAllRowTs_args args = new deleteAllRowTs_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("deleteAllRowTs", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); deleteAllRowTs_result result = new deleteAllRowTs_result(); try { @@ -2657,7 +4414,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { scannerOpen_args args = new scannerOpen_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("scannerOpen", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); scannerOpen_result result = new scannerOpen_result(); try { @@ -2686,7 +4453,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { scannerOpenWithStop_args args = new scannerOpenWithStop_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("scannerOpenWithStop", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); scannerOpenWithStop_result result = new scannerOpenWithStop_result(); try { @@ -2715,7 +4492,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { scannerOpenWithPrefix_args args = new scannerOpenWithPrefix_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("scannerOpenWithPrefix", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); scannerOpenWithPrefix_result result = new scannerOpenWithPrefix_result(); try { @@ -2744,7 +4531,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { scannerOpenTs_args args = new scannerOpenTs_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("scannerOpenTs", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); scannerOpenTs_result result = new scannerOpenTs_result(); try { @@ -2773,7 +4570,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { scannerOpenWithStopTs_args args = new scannerOpenWithStopTs_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("scannerOpenWithStopTs", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); scannerOpenWithStopTs_result result = new scannerOpenWithStopTs_result(); try { @@ -2802,7 +4609,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { scannerGet_args args = new scannerGet_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("scannerGet", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); scannerGet_result result = new scannerGet_result(); try { @@ -2832,7 +4649,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { scannerGetList_args args = new scannerGetList_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("scannerGetList", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); scannerGetList_result result = new scannerGetList_result(); try { @@ -2862,7 +4689,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { scannerClose_args args = new scannerClose_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("scannerClose", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); scannerClose_result result = new scannerClose_result(); try { @@ -2892,7 +4729,17 @@ public class Hbase { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { parallelGet_args args = new parallelGet_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("parallelGet", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); parallelGet_result result = new parallelGet_result(); try { @@ -2918,7 +4765,7 @@ public class Hbase { } - public static class enableTable_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class enableTable_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("enableTable_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -2926,7 +4773,7 @@ public class Hbase { /** * name of the table */ - public byte[] tableName; + public ByteBuffer tableName; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -2935,12 +4782,10 @@ public class Hbase { */ TABLE_NAME((short)1, "tableName"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -2949,7 +4794,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } } /** @@ -2988,12 +4838,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Bytes"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(enableTable_args.class, metaDataMap); } @@ -3001,7 +4851,7 @@ public class Hbase { } public enableTable_args( - byte[] tableName) + ByteBuffer tableName) { this(); this.tableName = tableName; @@ -3020,22 +4870,32 @@ public class Hbase { return new enableTable_args(this); } - @Deprecated - public enableTable_args clone() { - return new enableTable_args(this); + @Override + public void clear() { + this.tableName = null; } /** * name of the table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of the table */ public enableTable_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public enableTable_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -3061,17 +4921,13 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -3081,12 +4937,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -3094,10 +4950,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -3116,7 +4968,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -3136,17 +4988,23 @@ public class Hbase { int lastComparison = 0; enableTable_args typedOther = (enableTable_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3156,21 +5014,18 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -3213,7 +5068,7 @@ public class Hbase { } - public static class enableTable_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class enableTable_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("enableTable_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -3224,12 +5079,10 @@ public class Hbase { public enum _Fields implements TFieldIdEnum { IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -3238,7 +5091,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } } /** @@ -3277,12 +5135,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(enableTable_result.class, metaDataMap); } @@ -3309,9 +5167,9 @@ public class Hbase { return new enableTable_result(this); } - @Deprecated - public enableTable_result clone() { - return new enableTable_result(this); + @Override + public void clear() { + this.io = null; } public IOError getIo() { @@ -3351,10 +5209,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -3364,12 +5218,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -3377,10 +5231,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -3419,17 +5269,23 @@ public class Hbase { int lastComparison = 0; enableTable_result typedOther = (enableTable_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3439,22 +5295,19 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -3496,7 +5349,7 @@ public class Hbase { } - public static class disableTable_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class disableTable_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("disableTable_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -3504,7 +5357,7 @@ public class Hbase { /** * name of the table */ - public byte[] tableName; + public ByteBuffer tableName; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -3513,12 +5366,10 @@ public class Hbase { */ TABLE_NAME((short)1, "tableName"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -3527,7 +5378,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } } /** @@ -3566,12 +5422,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Bytes"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(disableTable_args.class, metaDataMap); } @@ -3579,7 +5435,7 @@ public class Hbase { } public disableTable_args( - byte[] tableName) + ByteBuffer tableName) { this(); this.tableName = tableName; @@ -3598,22 +5454,32 @@ public class Hbase { return new disableTable_args(this); } - @Deprecated - public disableTable_args clone() { - return new disableTable_args(this); + @Override + public void clear() { + this.tableName = null; } /** * name of the table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of the table */ public disableTable_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public disableTable_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -3639,17 +5505,13 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -3659,12 +5521,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -3672,10 +5534,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -3694,7 +5552,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -3714,17 +5572,23 @@ public class Hbase { int lastComparison = 0; disableTable_args typedOther = (disableTable_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3734,21 +5598,18 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -3791,7 +5652,7 @@ public class Hbase { } - public static class disableTable_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class disableTable_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("disableTable_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -3802,12 +5663,10 @@ public class Hbase { public enum _Fields implements TFieldIdEnum { IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -3816,7 +5675,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } } /** @@ -3855,12 +5719,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(disableTable_result.class, metaDataMap); } @@ -3887,9 +5751,9 @@ public class Hbase { return new disableTable_result(this); } - @Deprecated - public disableTable_result clone() { - return new disableTable_result(this); + @Override + public void clear() { + this.io = null; } public IOError getIo() { @@ -3929,10 +5793,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -3942,12 +5802,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -3955,10 +5815,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -3997,17 +5853,23 @@ public class Hbase { int lastComparison = 0; disableTable_result typedOther = (disableTable_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -4017,22 +5879,19 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -4074,7 +5933,7 @@ public class Hbase { } - public static class isTableEnabled_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class isTableEnabled_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("isTableEnabled_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -4082,7 +5941,7 @@ public class Hbase { /** * name of the table to check */ - public byte[] tableName; + public ByteBuffer tableName; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -4091,12 +5950,10 @@ public class Hbase { */ TABLE_NAME((short)1, "tableName"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -4105,7 +5962,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } } /** @@ -4144,12 +6006,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Bytes"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(isTableEnabled_args.class, metaDataMap); } @@ -4157,7 +6019,7 @@ public class Hbase { } public isTableEnabled_args( - byte[] tableName) + ByteBuffer tableName) { this(); this.tableName = tableName; @@ -4176,22 +6038,32 @@ public class Hbase { return new isTableEnabled_args(this); } - @Deprecated - public isTableEnabled_args clone() { - return new isTableEnabled_args(this); + @Override + public void clear() { + this.tableName = null; } /** * name of the table to check */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of the table to check */ public isTableEnabled_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public isTableEnabled_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -4217,17 +6089,13 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -4237,12 +6105,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -4250,10 +6118,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -4272,7 +6136,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -4292,17 +6156,23 @@ public class Hbase { int lastComparison = 0; isTableEnabled_args typedOther = (isTableEnabled_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -4312,21 +6182,18 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -4369,7 +6236,7 @@ public class Hbase { } - public static class isTableEnabled_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class isTableEnabled_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("isTableEnabled_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); @@ -4383,12 +6250,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -4397,7 +6262,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -4438,14 +6310,14 @@ public class Hbase { private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(isTableEnabled_result.class, metaDataMap); } @@ -4478,9 +6350,11 @@ public class Hbase { return new isTableEnabled_result(this); } - @Deprecated - public isTableEnabled_result clone() { - return new isTableEnabled_result(this); + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.io = null; } public boolean isSuccess() { @@ -4551,10 +6425,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -4567,12 +6437,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -4582,10 +6452,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -4633,25 +6499,33 @@ public class Hbase { int lastComparison = 0; isTableEnabled_result typedOther = (isTableEnabled_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -4661,30 +6535,27 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -4734,23 +6605,21 @@ public class Hbase { } - public static class compact_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class compact_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("compact_args"); private static final TField TABLE_NAME_OR_REGION_NAME_FIELD_DESC = new TField("tableNameOrRegionName", TType.STRING, (short)1); - public byte[] tableNameOrRegionName; + public ByteBuffer tableNameOrRegionName; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { TABLE_NAME_OR_REGION_NAME((short)1, "tableNameOrRegionName"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -4759,7 +6628,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME_OR_REGION_NAME + return TABLE_NAME_OR_REGION_NAME; + default: + return null; + } } /** @@ -4798,12 +6672,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME_OR_REGION_NAME, new FieldMetaData("tableNameOrRegionName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME_OR_REGION_NAME, new FieldMetaData("tableNameOrRegionName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Bytes"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(compact_args.class, metaDataMap); } @@ -4811,7 +6685,7 @@ public class Hbase { } public compact_args( - byte[] tableNameOrRegionName) + ByteBuffer tableNameOrRegionName) { this(); this.tableNameOrRegionName = tableNameOrRegionName; @@ -4830,16 +6704,26 @@ public class Hbase { return new compact_args(this); } - @Deprecated - public compact_args clone() { - return new compact_args(this); + @Override + public void clear() { + this.tableNameOrRegionName = null; } public byte[] getTableNameOrRegionName() { - return this.tableNameOrRegionName; + setTableNameOrRegionName(TBaseHelper.rightSize(tableNameOrRegionName)); + return tableNameOrRegionName.array(); + } + + public ByteBuffer BufferForTableNameOrRegionName() { + return tableNameOrRegionName; } public compact_args setTableNameOrRegionName(byte[] tableNameOrRegionName) { + setTableNameOrRegionName(ByteBuffer.wrap(tableNameOrRegionName)); + return this; + } + + public compact_args setTableNameOrRegionName(ByteBuffer tableNameOrRegionName) { this.tableNameOrRegionName = tableNameOrRegionName; return this; } @@ -4865,17 +6749,13 @@ public class Hbase { if (value == null) { unsetTableNameOrRegionName(); } else { - setTableNameOrRegionName((byte[])value); + setTableNameOrRegionName((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME_OR_REGION_NAME: @@ -4885,12 +6765,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME_OR_REGION_NAME: return isSetTableNameOrRegionName(); @@ -4898,10 +6778,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -4920,7 +6796,7 @@ public class Hbase { if (this_present_tableNameOrRegionName || that_present_tableNameOrRegionName) { if (!(this_present_tableNameOrRegionName && that_present_tableNameOrRegionName)) return false; - if (!java.util.Arrays.equals(this.tableNameOrRegionName, that.tableNameOrRegionName)) + if (!this.tableNameOrRegionName.equals(that.tableNameOrRegionName)) return false; } @@ -4940,17 +6816,23 @@ public class Hbase { int lastComparison = 0; compact_args typedOther = (compact_args)other; - lastComparison = Boolean.valueOf(isSetTableNameOrRegionName()).compareTo(isSetTableNameOrRegionName()); + lastComparison = Boolean.valueOf(isSetTableNameOrRegionName()).compareTo(typedOther.isSetTableNameOrRegionName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableNameOrRegionName, typedOther.tableNameOrRegionName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableNameOrRegionName()) { + lastComparison = TBaseHelper.compareTo(this.tableNameOrRegionName, typedOther.tableNameOrRegionName); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -4960,21 +6842,18 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME_OR_REGION_NAME: - if (field.type == TType.STRING) { - this.tableNameOrRegionName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // TABLE_NAME_OR_REGION_NAME + if (field.type == TType.STRING) { + this.tableNameOrRegionName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -5017,7 +6896,7 @@ public class Hbase { } - public static class compact_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class compact_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("compact_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -5028,12 +6907,10 @@ public class Hbase { public enum _Fields implements TFieldIdEnum { IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -5042,7 +6919,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } } /** @@ -5081,12 +6963,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(compact_result.class, metaDataMap); } @@ -5113,9 +6995,9 @@ public class Hbase { return new compact_result(this); } - @Deprecated - public compact_result clone() { - return new compact_result(this); + @Override + public void clear() { + this.io = null; } public IOError getIo() { @@ -5155,10 +7037,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -5168,12 +7046,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -5181,10 +7059,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -5223,17 +7097,23 @@ public class Hbase { int lastComparison = 0; compact_result typedOther = (compact_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -5243,22 +7123,19 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -5300,23 +7177,21 @@ public class Hbase { } - public static class majorCompact_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class majorCompact_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("majorCompact_args"); private static final TField TABLE_NAME_OR_REGION_NAME_FIELD_DESC = new TField("tableNameOrRegionName", TType.STRING, (short)1); - public byte[] tableNameOrRegionName; + public ByteBuffer tableNameOrRegionName; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { TABLE_NAME_OR_REGION_NAME((short)1, "tableNameOrRegionName"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -5325,7 +7200,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME_OR_REGION_NAME + return TABLE_NAME_OR_REGION_NAME; + default: + return null; + } } /** @@ -5364,12 +7244,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME_OR_REGION_NAME, new FieldMetaData("tableNameOrRegionName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME_OR_REGION_NAME, new FieldMetaData("tableNameOrRegionName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Bytes"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(majorCompact_args.class, metaDataMap); } @@ -5377,7 +7257,7 @@ public class Hbase { } public majorCompact_args( - byte[] tableNameOrRegionName) + ByteBuffer tableNameOrRegionName) { this(); this.tableNameOrRegionName = tableNameOrRegionName; @@ -5396,16 +7276,26 @@ public class Hbase { return new majorCompact_args(this); } - @Deprecated - public majorCompact_args clone() { - return new majorCompact_args(this); + @Override + public void clear() { + this.tableNameOrRegionName = null; } public byte[] getTableNameOrRegionName() { - return this.tableNameOrRegionName; + setTableNameOrRegionName(TBaseHelper.rightSize(tableNameOrRegionName)); + return tableNameOrRegionName.array(); + } + + public ByteBuffer BufferForTableNameOrRegionName() { + return tableNameOrRegionName; } public majorCompact_args setTableNameOrRegionName(byte[] tableNameOrRegionName) { + setTableNameOrRegionName(ByteBuffer.wrap(tableNameOrRegionName)); + return this; + } + + public majorCompact_args setTableNameOrRegionName(ByteBuffer tableNameOrRegionName) { this.tableNameOrRegionName = tableNameOrRegionName; return this; } @@ -5431,17 +7321,13 @@ public class Hbase { if (value == null) { unsetTableNameOrRegionName(); } else { - setTableNameOrRegionName((byte[])value); + setTableNameOrRegionName((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME_OR_REGION_NAME: @@ -5451,12 +7337,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME_OR_REGION_NAME: return isSetTableNameOrRegionName(); @@ -5464,10 +7350,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -5486,7 +7368,7 @@ public class Hbase { if (this_present_tableNameOrRegionName || that_present_tableNameOrRegionName) { if (!(this_present_tableNameOrRegionName && that_present_tableNameOrRegionName)) return false; - if (!java.util.Arrays.equals(this.tableNameOrRegionName, that.tableNameOrRegionName)) + if (!this.tableNameOrRegionName.equals(that.tableNameOrRegionName)) return false; } @@ -5506,17 +7388,23 @@ public class Hbase { int lastComparison = 0; majorCompact_args typedOther = (majorCompact_args)other; - lastComparison = Boolean.valueOf(isSetTableNameOrRegionName()).compareTo(isSetTableNameOrRegionName()); + lastComparison = Boolean.valueOf(isSetTableNameOrRegionName()).compareTo(typedOther.isSetTableNameOrRegionName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableNameOrRegionName, typedOther.tableNameOrRegionName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableNameOrRegionName()) { + lastComparison = TBaseHelper.compareTo(this.tableNameOrRegionName, typedOther.tableNameOrRegionName); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -5526,21 +7414,18 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME_OR_REGION_NAME: - if (field.type == TType.STRING) { - this.tableNameOrRegionName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // TABLE_NAME_OR_REGION_NAME + if (field.type == TType.STRING) { + this.tableNameOrRegionName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -5583,7 +7468,7 @@ public class Hbase { } - public static class majorCompact_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class majorCompact_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("majorCompact_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -5594,12 +7479,10 @@ public class Hbase { public enum _Fields implements TFieldIdEnum { IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -5608,7 +7491,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } } /** @@ -5647,12 +7535,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(majorCompact_result.class, metaDataMap); } @@ -5679,9 +7567,9 @@ public class Hbase { return new majorCompact_result(this); } - @Deprecated - public majorCompact_result clone() { - return new majorCompact_result(this); + @Override + public void clear() { + this.io = null; } public IOError getIo() { @@ -5721,10 +7609,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -5734,12 +7618,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -5747,10 +7631,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -5789,17 +7669,23 @@ public class Hbase { int lastComparison = 0; majorCompact_result typedOther = (majorCompact_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -5809,22 +7695,19 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -5866,7 +7749,7 @@ public class Hbase { } - public static class getTableNames_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getTableNames_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getTableNames_args"); @@ -5875,12 +7758,10 @@ public class Hbase { public enum _Fields implements TFieldIdEnum { ; - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -5889,7 +7770,10 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + default: + return null; + } } /** @@ -5925,10 +7809,10 @@ public class Hbase { return _fieldName; } } - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getTableNames_args.class, metaDataMap); } @@ -5945,9 +7829,8 @@ public class Hbase { return new getTableNames_args(this); } - @Deprecated - public getTableNames_args clone() { - return new getTableNames_args(this); + @Override + public void clear() { } public void setFieldValue(_Fields field, Object value) { @@ -5955,31 +7838,23 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { } throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -6012,6 +7887,10 @@ public class Hbase { return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -6021,14 +7900,11 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - } - iprot.readFieldEnd(); + switch (field.id) { + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -6059,13 +7935,13 @@ public class Hbase { } - public static class getTableNames_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getTableNames_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getTableNames_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public List success; + public List success; public IOError io; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -6073,12 +7949,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -6087,7 +7961,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -6126,15 +8007,15 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text")))); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getTableNames_result.class, metaDataMap); } @@ -6142,7 +8023,7 @@ public class Hbase { } public getTableNames_result( - List success, + List success, IOError io) { this(); @@ -6155,8 +8036,8 @@ public class Hbase { */ public getTableNames_result(getTableNames_result other) { if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (byte[] other_element : other.success) { + List __this__success = new ArrayList(); + for (ByteBuffer other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; @@ -6170,31 +8051,32 @@ public class Hbase { return new getTableNames_result(this); } - @Deprecated - public getTableNames_result clone() { - return new getTableNames_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() { + public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } - public void addToSuccess(byte[] elem) { + public void addToSuccess(ByteBuffer elem) { if (this.success == null) { - this.success = new ArrayList(); + this.success = new ArrayList(); } this.success.add(elem); } - public List getSuccess() { + public List getSuccess() { return this.success; } - public getTableNames_result setSuccess(List success) { + public getTableNames_result setSuccess(List success) { this.success = success; return this; } @@ -6244,7 +8126,7 @@ public class Hbase { if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((List)value); } break; @@ -6259,10 +8141,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -6275,12 +8153,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -6290,10 +8168,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -6341,25 +8215,33 @@ public class Hbase { int lastComparison = 0; getTableNames_result typedOther = (getTableNames_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -6369,39 +8251,36 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.LIST) { + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list9 = iprot.readListBegin(); + this.success = new ArrayList(_list9.size); + for (int _i10 = 0; _i10 < _list9.size; ++_i10) { - TList _list9 = iprot.readListBegin(); - this.success = new ArrayList(_list9.size); - for (int _i10 = 0; _i10 < _list9.size; ++_i10) - { - byte[] _elem11; - _elem11 = iprot.readBinary(); - this.success.add(_elem11); - } - iprot.readListEnd(); + ByteBuffer _elem11; + _elem11 = iprot.readBinary(); + this.success.add(_elem11); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -6416,7 +8295,7 @@ public class Hbase { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (byte[] _iter12 : this.success) + for (ByteBuffer _iter12 : this.success) { oprot.writeBinary(_iter12); } @@ -6462,7 +8341,7 @@ public class Hbase { } - public static class getColumnDescriptors_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getColumnDescriptors_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getColumnDescriptors_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -6470,7 +8349,7 @@ public class Hbase { /** * table name */ - public byte[] tableName; + public ByteBuffer tableName; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -6479,12 +8358,10 @@ public class Hbase { */ TABLE_NAME((short)1, "tableName"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -6493,7 +8370,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } } /** @@ -6532,12 +8414,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getColumnDescriptors_args.class, metaDataMap); } @@ -6545,7 +8427,7 @@ public class Hbase { } public getColumnDescriptors_args( - byte[] tableName) + ByteBuffer tableName) { this(); this.tableName = tableName; @@ -6564,22 +8446,32 @@ public class Hbase { return new getColumnDescriptors_args(this); } - @Deprecated - public getColumnDescriptors_args clone() { - return new getColumnDescriptors_args(this); + @Override + public void clear() { + this.tableName = null; } /** * table name */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * table name */ public getColumnDescriptors_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public getColumnDescriptors_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -6605,17 +8497,13 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -6625,12 +8513,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -6638,10 +8526,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -6660,7 +8544,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -6680,17 +8564,23 @@ public class Hbase { int lastComparison = 0; getColumnDescriptors_args typedOther = (getColumnDescriptors_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -6700,21 +8590,18 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -6757,13 +8644,13 @@ public class Hbase { } - public static class getColumnDescriptors_result implements TBase, java.io.Serializable, Cloneable { + public static class getColumnDescriptors_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getColumnDescriptors_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); - public Map success; + public Map success; public IOError io; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -6771,12 +8658,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -6785,7 +8670,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -6824,16 +8716,16 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING , "Text"), new StructMetaData(TType.STRUCT, ColumnDescriptor.class)))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getColumnDescriptors_result.class, metaDataMap); } @@ -6841,7 +8733,7 @@ public class Hbase { } public getColumnDescriptors_result( - Map success, + Map success, IOError io) { this(); @@ -6854,13 +8746,13 @@ public class Hbase { */ public getColumnDescriptors_result(getColumnDescriptors_result other) { if (other.isSetSuccess()) { - Map __this__success = new HashMap(); - for (Map.Entry other_element : other.success.entrySet()) { + Map __this__success = new HashMap(); + for (Map.Entry other_element : other.success.entrySet()) { - byte[] other_element_key = other_element.getKey(); + ByteBuffer other_element_key = other_element.getKey(); ColumnDescriptor other_element_value = other_element.getValue(); - byte[] __this__success_copy_key = other_element_key; + ByteBuffer __this__success_copy_key = other_element_key; ColumnDescriptor __this__success_copy_value = new ColumnDescriptor(other_element_value); @@ -6877,27 +8769,28 @@ public class Hbase { return new getColumnDescriptors_result(this); } - @Deprecated - public getColumnDescriptors_result clone() { - return new getColumnDescriptors_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } - public void putToSuccess(byte[] key, ColumnDescriptor val) { + public void putToSuccess(ByteBuffer key, ColumnDescriptor val) { if (this.success == null) { - this.success = new HashMap(); + this.success = new HashMap(); } this.success.put(key, val); } - public Map getSuccess() { + public Map getSuccess() { return this.success; } - public getColumnDescriptors_result setSuccess(Map success) { + public getColumnDescriptors_result setSuccess(Map success) { this.success = success; return this; } @@ -6947,7 +8840,7 @@ public class Hbase { if (value == null) { unsetSuccess(); } else { - setSuccess((Map)value); + setSuccess((Map)value); } break; @@ -6962,10 +8855,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -6978,12 +8867,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -6993,10 +8882,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -7036,6 +8921,41 @@ public class Hbase { return 0; } + public int compareTo(getColumnDescriptors_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getColumnDescriptors_result typedOther = (getColumnDescriptors_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -7045,42 +8965,39 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.MAP) { + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.MAP) { + { + TMap _map13 = iprot.readMapBegin(); + this.success = new HashMap(2*_map13.size); + for (int _i14 = 0; _i14 < _map13.size; ++_i14) { - TMap _map13 = iprot.readMapBegin(); - this.success = new HashMap(2*_map13.size); - for (int _i14 = 0; _i14 < _map13.size; ++_i14) - { - byte[] _key15; - ColumnDescriptor _val16; - _key15 = iprot.readBinary(); - _val16 = new ColumnDescriptor(); - _val16.read(iprot); - this.success.put(_key15, _val16); - } - iprot.readMapEnd(); + ByteBuffer _key15; + ColumnDescriptor _val16; + _key15 = iprot.readBinary(); + _val16 = new ColumnDescriptor(); + _val16.read(iprot); + this.success.put(_key15, _val16); } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readMapEnd(); } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -7095,7 +9012,7 @@ public class Hbase { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size())); - for (Map.Entry _iter17 : this.success.entrySet()) + for (Map.Entry _iter17 : this.success.entrySet()) { oprot.writeBinary(_iter17.getKey()); _iter17.getValue().write(oprot); @@ -7142,7 +9059,7 @@ public class Hbase { } - public static class getTableRegions_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getTableRegions_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getTableRegions_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -7150,7 +9067,7 @@ public class Hbase { /** * table name */ - public byte[] tableName; + public ByteBuffer tableName; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -7159,12 +9076,10 @@ public class Hbase { */ TABLE_NAME((short)1, "tableName"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -7173,7 +9088,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } } /** @@ -7212,12 +9132,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getTableRegions_args.class, metaDataMap); } @@ -7225,7 +9145,7 @@ public class Hbase { } public getTableRegions_args( - byte[] tableName) + ByteBuffer tableName) { this(); this.tableName = tableName; @@ -7244,22 +9164,32 @@ public class Hbase { return new getTableRegions_args(this); } - @Deprecated - public getTableRegions_args clone() { - return new getTableRegions_args(this); + @Override + public void clear() { + this.tableName = null; } /** * table name */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * table name */ public getTableRegions_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public getTableRegions_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -7285,17 +9215,13 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -7305,12 +9231,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -7318,10 +9244,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -7340,7 +9262,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -7360,17 +9282,23 @@ public class Hbase { int lastComparison = 0; getTableRegions_args typedOther = (getTableRegions_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -7380,21 +9308,18 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -7437,7 +9362,7 @@ public class Hbase { } - public static class getTableRegions_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getTableRegions_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getTableRegions_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -7451,12 +9376,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -7465,7 +9388,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -7504,15 +9434,15 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, TRegionInfo.class)))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getTableRegions_result.class, metaDataMap); } @@ -7548,9 +9478,10 @@ public class Hbase { return new getTableRegions_result(this); } - @Deprecated - public getTableRegions_result clone() { - return new getTableRegions_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { @@ -7637,10 +9568,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -7653,12 +9580,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -7668,10 +9595,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -7719,25 +9642,33 @@ public class Hbase { int lastComparison = 0; getTableRegions_result typedOther = (getTableRegions_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -7747,40 +9678,37 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.LIST) { + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list18 = iprot.readListBegin(); + this.success = new ArrayList(_list18.size); + for (int _i19 = 0; _i19 < _list18.size; ++_i19) { - TList _list18 = iprot.readListBegin(); - this.success = new ArrayList(_list18.size); - for (int _i19 = 0; _i19 < _list18.size; ++_i19) - { - TRegionInfo _elem20; - _elem20 = new TRegionInfo(); - _elem20.read(iprot); - this.success.add(_elem20); - } - iprot.readListEnd(); + TRegionInfo _elem20; + _elem20 = new TRegionInfo(); + _elem20.read(iprot); + this.success.add(_elem20); } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -7841,7 +9769,7 @@ public class Hbase { } - public static class createTable_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class createTable_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("createTable_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -7850,7 +9778,7 @@ public class Hbase { /** * name of table to create */ - public byte[] tableName; + public ByteBuffer tableName; /** * list of column family descriptors */ @@ -7867,12 +9795,10 @@ public class Hbase { */ COLUMN_FAMILIES((short)2, "columnFamilies"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -7881,7 +9807,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // COLUMN_FAMILIES + return COLUMN_FAMILIES; + default: + return null; + } } /** @@ -7920,15 +9853,15 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMN_FAMILIES, new FieldMetaData("columnFamilies", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN_FAMILIES, new FieldMetaData("columnFamilies", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, ColumnDescriptor.class)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(createTable_args.class, metaDataMap); } @@ -7936,7 +9869,7 @@ public class Hbase { } public createTable_args( - byte[] tableName, + ByteBuffer tableName, List columnFamilies) { this(); @@ -7964,22 +9897,33 @@ public class Hbase { return new createTable_args(this); } - @Deprecated - public createTable_args clone() { - return new createTable_args(this); + @Override + public void clear() { + this.tableName = null; + this.columnFamilies = null; } /** * name of table to create */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table to create */ public createTable_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public createTable_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -8050,7 +9994,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -8065,10 +10009,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -8081,12 +10021,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -8096,10 +10036,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -8118,7 +10054,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -8147,25 +10083,33 @@ public class Hbase { int lastComparison = 0; createTable_args typedOther = (createTable_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumnFamilies()).compareTo(isSetColumnFamilies()); + lastComparison = Boolean.valueOf(isSetColumnFamilies()).compareTo(typedOther.isSetColumnFamilies()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(columnFamilies, typedOther.columnFamilies); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumnFamilies()) { + lastComparison = TBaseHelper.compareTo(this.columnFamilies, typedOther.columnFamilies); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -8175,39 +10119,36 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMN_FAMILIES: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // COLUMN_FAMILIES + if (field.type == TType.LIST) { + { + TList _list22 = iprot.readListBegin(); + this.columnFamilies = new ArrayList(_list22.size); + for (int _i23 = 0; _i23 < _list22.size; ++_i23) { - TList _list22 = iprot.readListBegin(); - this.columnFamilies = new ArrayList(_list22.size); - for (int _i23 = 0; _i23 < _list22.size; ++_i23) - { - ColumnDescriptor _elem24; - _elem24 = new ColumnDescriptor(); - _elem24.read(iprot); - this.columnFamilies.add(_elem24); - } - iprot.readListEnd(); + ColumnDescriptor _elem24; + _elem24 = new ColumnDescriptor(); + _elem24.read(iprot); + this.columnFamilies.add(_elem24); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -8270,7 +10211,7 @@ public class Hbase { } - public static class createTable_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class createTable_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("createTable_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -8287,12 +10228,10 @@ public class Hbase { IA((short)2, "ia"), EXIST((short)3, "exist"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -8301,7 +10240,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + case 2: // IA + return IA; + case 3: // EXIST + return EXIST; + default: + return null; + } } /** @@ -8340,16 +10288,16 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(_Fields.EXIST, new FieldMetaData("exist", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.EXIST, new FieldMetaData("exist", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(createTable_result.class, metaDataMap); } @@ -8386,9 +10334,11 @@ public class Hbase { return new createTable_result(this); } - @Deprecated - public createTable_result clone() { - return new createTable_result(this); + @Override + public void clear() { + this.io = null; + this.ia = null; + this.exist = null; } public IOError getIo() { @@ -8492,10 +10442,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -8511,12 +10457,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -8528,10 +10474,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -8588,33 +10530,43 @@ public class Hbase { int lastComparison = 0; createTable_result typedOther = (createTable_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIa()).compareTo(isSetIa()); + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(ia, typedOther.ia); - if (lastComparison != 0) { - return lastComparison; + if (isSetIa()) { + lastComparison = TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetExist()).compareTo(isSetExist()); + lastComparison = Boolean.valueOf(isSetExist()).compareTo(typedOther.isSetExist()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(exist, typedOther.exist); - if (lastComparison != 0) { - return lastComparison; + if (isSetExist()) { + lastComparison = TBaseHelper.compareTo(this.exist, typedOther.exist); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -8624,38 +10576,35 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IA: - if (field.type == TType.STRUCT) { - this.ia = new IllegalArgument(); - this.ia.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case EXIST: - if (field.type == TType.STRUCT) { - this.exist = new AlreadyExists(); - this.exist.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IA + if (field.type == TType.STRUCT) { + this.ia = new IllegalArgument(); + this.ia.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // EXIST + if (field.type == TType.STRUCT) { + this.exist = new AlreadyExists(); + this.exist.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -8721,7 +10670,7 @@ public class Hbase { } - public static class deleteTable_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class deleteTable_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("deleteTable_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -8729,7 +10678,7 @@ public class Hbase { /** * name of table to delete */ - public byte[] tableName; + public ByteBuffer tableName; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -8738,12 +10687,10 @@ public class Hbase { */ TABLE_NAME((short)1, "tableName"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -8752,7 +10699,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } } /** @@ -8791,12 +10743,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteTable_args.class, metaDataMap); } @@ -8804,7 +10756,7 @@ public class Hbase { } public deleteTable_args( - byte[] tableName) + ByteBuffer tableName) { this(); this.tableName = tableName; @@ -8823,22 +10775,32 @@ public class Hbase { return new deleteTable_args(this); } - @Deprecated - public deleteTable_args clone() { - return new deleteTable_args(this); + @Override + public void clear() { + this.tableName = null; } /** * name of table to delete */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table to delete */ public deleteTable_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public deleteTable_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -8864,17 +10826,13 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -8884,12 +10842,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -8897,10 +10855,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -8919,7 +10873,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -8939,17 +10893,23 @@ public class Hbase { int lastComparison = 0; deleteTable_args typedOther = (deleteTable_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -8959,21 +10919,18 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -9016,7 +10973,7 @@ public class Hbase { } - public static class deleteTable_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class deleteTable_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("deleteTable_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -9027,12 +10984,10 @@ public class Hbase { public enum _Fields implements TFieldIdEnum { IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -9041,7 +10996,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } } /** @@ -9080,12 +11040,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteTable_result.class, metaDataMap); } @@ -9112,9 +11072,9 @@ public class Hbase { return new deleteTable_result(this); } - @Deprecated - public deleteTable_result clone() { - return new deleteTable_result(this); + @Override + public void clear() { + this.io = null; } public IOError getIo() { @@ -9154,10 +11114,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -9167,12 +11123,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -9180,10 +11136,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -9222,17 +11174,23 @@ public class Hbase { int lastComparison = 0; deleteTable_result typedOther = (deleteTable_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -9242,22 +11200,19 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -9299,7 +11254,7 @@ public class Hbase { } - public static class get_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class get_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -9309,15 +11264,15 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row key */ - public byte[] row; + public ByteBuffer row; /** * column name */ - public byte[] column; + public ByteBuffer column; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -9334,12 +11289,10 @@ public class Hbase { */ COLUMN((short)3, "column"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -9348,7 +11301,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + default: + return null; + } } /** @@ -9387,16 +11349,16 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap); } @@ -9404,9 +11366,9 @@ public class Hbase { } public get_args( - byte[] tableName, - byte[] row, - byte[] column) + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column) { this(); this.tableName = tableName; @@ -9433,22 +11395,34 @@ public class Hbase { return new get_args(this); } - @Deprecated - public get_args clone() { - return new get_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.column = null; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public get_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public get_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -9472,13 +11446,23 @@ public class Hbase { * row key */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * row key */ public get_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public get_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -9502,13 +11486,23 @@ public class Hbase { * column name */ public byte[] getColumn() { - return this.column; + setColumn(TBaseHelper.rightSize(column)); + return column.array(); + } + + public ByteBuffer BufferForColumn() { + return column; } /** * column name */ public get_args setColumn(byte[] column) { + setColumn(ByteBuffer.wrap(column)); + return this; + } + + public get_args setColumn(ByteBuffer column) { this.column = column; return this; } @@ -9534,7 +11528,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -9542,7 +11536,7 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -9550,17 +11544,13 @@ public class Hbase { if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -9576,12 +11566,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -9593,10 +11583,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -9615,7 +11601,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -9624,7 +11610,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -9633,7 +11619,7 @@ public class Hbase { if (this_present_column || that_present_column) { if (!(this_present_column && that_present_column)) return false; - if (!java.util.Arrays.equals(this.column, that.column)) + if (!this.column.equals(that.column)) return false; } @@ -9653,33 +11639,43 @@ public class Hbase { int lastComparison = 0; get_args typedOther = (get_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumn()).compareTo(isSetColumn()); + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(column, typedOther.column); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumn()) { + lastComparison = TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -9689,35 +11685,32 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMN: - if (field.type == TType.STRING) { - this.column = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMN + if (field.type == TType.STRING) { + this.column = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -9786,7 +11779,7 @@ public class Hbase { } - public static class get_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class get_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -9800,12 +11793,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -9814,7 +11805,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -9853,15 +11851,15 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, TCell.class)))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_result.class, metaDataMap); } @@ -9897,9 +11895,10 @@ public class Hbase { return new get_result(this); } - @Deprecated - public get_result clone() { - return new get_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { @@ -9986,10 +11985,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -10002,12 +11997,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -10017,10 +12012,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -10068,25 +12059,33 @@ public class Hbase { int lastComparison = 0; get_result typedOther = (get_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -10096,40 +12095,37 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.LIST) { + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list26 = iprot.readListBegin(); + this.success = new ArrayList(_list26.size); + for (int _i27 = 0; _i27 < _list26.size; ++_i27) { - TList _list26 = iprot.readListBegin(); - this.success = new ArrayList(_list26.size); - for (int _i27 = 0; _i27 < _list26.size; ++_i27) - { - TCell _elem28; - _elem28 = new TCell(); - _elem28.read(iprot); - this.success.add(_elem28); - } - iprot.readListEnd(); + TCell _elem28; + _elem28 = new TCell(); + _elem28.read(iprot); + this.success.add(_elem28); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -10190,7 +12186,7 @@ public class Hbase { } - public static class getVer_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getVer_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getVer_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -10201,15 +12197,15 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row key */ - public byte[] row; + public ByteBuffer row; /** * column name */ - public byte[] column; + public ByteBuffer column; /** * number of versions to retrieve */ @@ -10234,12 +12230,10 @@ public class Hbase { */ NUM_VERSIONS((short)4, "numVersions"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -10248,7 +12242,18 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + case 4: // NUM_VERSIONS + return NUM_VERSIONS; + default: + return null; + } } /** @@ -10289,18 +12294,18 @@ public class Hbase { private static final int __NUMVERSIONS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.NUM_VERSIONS, new FieldMetaData("numVersions", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.NUM_VERSIONS, new FieldMetaData("numVersions", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getVer_args.class, metaDataMap); } @@ -10308,9 +12313,9 @@ public class Hbase { } public getVer_args( - byte[] tableName, - byte[] row, - byte[] column, + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, int numVersions) { this(); @@ -10343,22 +12348,36 @@ public class Hbase { return new getVer_args(this); } - @Deprecated - public getVer_args clone() { - return new getVer_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.column = null; + setNumVersionsIsSet(false); + this.numVersions = 0; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public getVer_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public getVer_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -10382,13 +12401,23 @@ public class Hbase { * row key */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * row key */ public getVer_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public getVer_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -10412,13 +12441,23 @@ public class Hbase { * column name */ public byte[] getColumn() { - return this.column; + setColumn(TBaseHelper.rightSize(column)); + return column.array(); + } + + public ByteBuffer BufferForColumn() { + return column; } /** * column name */ public getVer_args setColumn(byte[] column) { + setColumn(ByteBuffer.wrap(column)); + return this; + } + + public getVer_args setColumn(ByteBuffer column) { this.column = column; return this; } @@ -10473,7 +12512,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -10481,7 +12520,7 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -10489,7 +12528,7 @@ public class Hbase { if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; @@ -10504,10 +12543,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -10526,12 +12561,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -10545,10 +12580,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -10567,7 +12598,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -10576,7 +12607,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -10585,7 +12616,7 @@ public class Hbase { if (this_present_column || that_present_column) { if (!(this_present_column && that_present_column)) return false; - if (!java.util.Arrays.equals(this.column, that.column)) + if (!this.column.equals(that.column)) return false; } @@ -10614,41 +12645,53 @@ public class Hbase { int lastComparison = 0; getVer_args typedOther = (getVer_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumn()).compareTo(isSetColumn()); + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(column, typedOther.column); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumn()) { + lastComparison = TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetNumVersions()).compareTo(isSetNumVersions()); + lastComparison = Boolean.valueOf(isSetNumVersions()).compareTo(typedOther.isSetNumVersions()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(numVersions, typedOther.numVersions); - if (lastComparison != 0) { - return lastComparison; + if (isSetNumVersions()) { + lastComparison = TBaseHelper.compareTo(this.numVersions, typedOther.numVersions); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -10658,43 +12701,40 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMN: - if (field.type == TType.STRING) { - this.column = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case NUM_VERSIONS: - if (field.type == TType.I32) { - this.numVersions = iprot.readI32(); - setNumVersionsIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMN + if (field.type == TType.STRING) { + this.column = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // NUM_VERSIONS + if (field.type == TType.I32) { + this.numVersions = iprot.readI32(); + setNumVersionsIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -10770,7 +12810,7 @@ public class Hbase { } - public static class getVer_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getVer_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getVer_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -10784,12 +12824,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -10798,7 +12836,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -10837,15 +12882,15 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, TCell.class)))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getVer_result.class, metaDataMap); } @@ -10881,9 +12926,10 @@ public class Hbase { return new getVer_result(this); } - @Deprecated - public getVer_result clone() { - return new getVer_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { @@ -10970,10 +13016,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -10986,12 +13028,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -11001,10 +13043,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -11052,25 +13090,33 @@ public class Hbase { int lastComparison = 0; getVer_result typedOther = (getVer_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -11080,40 +13126,37 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.LIST) { + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list30 = iprot.readListBegin(); + this.success = new ArrayList(_list30.size); + for (int _i31 = 0; _i31 < _list30.size; ++_i31) { - TList _list30 = iprot.readListBegin(); - this.success = new ArrayList(_list30.size); - for (int _i31 = 0; _i31 < _list30.size; ++_i31) - { - TCell _elem32; - _elem32 = new TCell(); - _elem32.read(iprot); - this.success.add(_elem32); - } - iprot.readListEnd(); + TCell _elem32; + _elem32 = new TCell(); + _elem32.read(iprot); + this.success.add(_elem32); } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -11174,7 +13217,7 @@ public class Hbase { } - public static class getVerTs_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getVerTs_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getVerTs_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -11186,15 +13229,15 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row key */ - public byte[] row; + public ByteBuffer row; /** * column name */ - public byte[] column; + public ByteBuffer column; /** * timestamp */ @@ -11227,12 +13270,10 @@ public class Hbase { */ NUM_VERSIONS((short)5, "numVersions"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -11241,7 +13282,20 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + case 4: // TIMESTAMP + return TIMESTAMP; + case 5: // NUM_VERSIONS + return NUM_VERSIONS; + default: + return null; + } } /** @@ -11283,20 +13337,20 @@ public class Hbase { private static final int __NUMVERSIONS_ISSET_ID = 1; private BitSet __isset_bit_vector = new BitSet(2); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); - put(_Fields.NUM_VERSIONS, new FieldMetaData("numVersions", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.NUM_VERSIONS, new FieldMetaData("numVersions", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getVerTs_args.class, metaDataMap); } @@ -11304,9 +13358,9 @@ public class Hbase { } public getVerTs_args( - byte[] tableName, - byte[] row, - byte[] column, + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, long timestamp, int numVersions) { @@ -11343,22 +13397,38 @@ public class Hbase { return new getVerTs_args(this); } - @Deprecated - public getVerTs_args clone() { - return new getVerTs_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.column = null; + setTimestampIsSet(false); + this.timestamp = 0; + setNumVersionsIsSet(false); + this.numVersions = 0; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public getVerTs_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public getVerTs_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -11382,13 +13452,23 @@ public class Hbase { * row key */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * row key */ public getVerTs_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public getVerTs_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -11412,13 +13492,23 @@ public class Hbase { * column name */ public byte[] getColumn() { - return this.column; + setColumn(TBaseHelper.rightSize(column)); + return column.array(); + } + + public ByteBuffer BufferForColumn() { + return column; } /** * column name */ public getVerTs_args setColumn(byte[] column) { + setColumn(ByteBuffer.wrap(column)); + return this; + } + + public getVerTs_args setColumn(ByteBuffer column) { this.column = column; return this; } @@ -11502,7 +13592,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -11510,7 +13600,7 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -11518,7 +13608,7 @@ public class Hbase { if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; @@ -11541,10 +13631,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -11566,12 +13652,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -11587,10 +13673,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -11609,7 +13691,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -11618,7 +13700,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -11627,7 +13709,7 @@ public class Hbase { if (this_present_column || that_present_column) { if (!(this_present_column && that_present_column)) return false; - if (!java.util.Arrays.equals(this.column, that.column)) + if (!this.column.equals(that.column)) return false; } @@ -11665,49 +13747,63 @@ public class Hbase { int lastComparison = 0; getVerTs_args typedOther = (getVerTs_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumn()).compareTo(isSetColumn()); + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(column, typedOther.column); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumn()) { + lastComparison = TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp()); + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp); - if (lastComparison != 0) { - return lastComparison; + if (isSetTimestamp()) { + lastComparison = TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetNumVersions()).compareTo(isSetNumVersions()); + lastComparison = Boolean.valueOf(isSetNumVersions()).compareTo(typedOther.isSetNumVersions()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(numVersions, typedOther.numVersions); - if (lastComparison != 0) { - return lastComparison; + if (isSetNumVersions()) { + lastComparison = TBaseHelper.compareTo(this.numVersions, typedOther.numVersions); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -11717,51 +13813,48 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMN: - if (field.type == TType.STRING) { - this.column = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TIMESTAMP: - if (field.type == TType.I64) { - this.timestamp = iprot.readI64(); - setTimestampIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case NUM_VERSIONS: - if (field.type == TType.I32) { - this.numVersions = iprot.readI32(); - setNumVersionsIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMN + if (field.type == TType.STRING) { + this.column = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // TIMESTAMP + if (field.type == TType.I64) { + this.timestamp = iprot.readI64(); + setTimestampIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // NUM_VERSIONS + if (field.type == TType.I32) { + this.numVersions = iprot.readI32(); + setNumVersionsIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -11844,7 +13937,7 @@ public class Hbase { } - public static class getVerTs_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getVerTs_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getVerTs_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -11858,12 +13951,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -11872,7 +13963,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -11911,15 +14009,15 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, TCell.class)))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getVerTs_result.class, metaDataMap); } @@ -11955,9 +14053,10 @@ public class Hbase { return new getVerTs_result(this); } - @Deprecated - public getVerTs_result clone() { - return new getVerTs_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { @@ -12044,10 +14143,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -12060,12 +14155,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -12075,10 +14170,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -12126,25 +14217,33 @@ public class Hbase { int lastComparison = 0; getVerTs_result typedOther = (getVerTs_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -12154,40 +14253,37 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.LIST) { + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list34 = iprot.readListBegin(); + this.success = new ArrayList(_list34.size); + for (int _i35 = 0; _i35 < _list34.size; ++_i35) { - TList _list34 = iprot.readListBegin(); - this.success = new ArrayList(_list34.size); - for (int _i35 = 0; _i35 < _list34.size; ++_i35) - { - TCell _elem36; - _elem36 = new TCell(); - _elem36.read(iprot); - this.success.add(_elem36); - } - iprot.readListEnd(); + TCell _elem36; + _elem36 = new TCell(); + _elem36.read(iprot); + this.success.add(_elem36); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -12248,7 +14344,7 @@ public class Hbase { } - public static class getRow_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getRow_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRow_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -12257,11 +14353,11 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row key */ - public byte[] row; + public ByteBuffer row; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -12274,12 +14370,10 @@ public class Hbase { */ ROW((short)2, "row"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -12288,7 +14382,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + default: + return null; + } } /** @@ -12327,14 +14428,14 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getRow_args.class, metaDataMap); } @@ -12342,8 +14443,8 @@ public class Hbase { } public getRow_args( - byte[] tableName, - byte[] row) + ByteBuffer tableName, + ByteBuffer row) { this(); this.tableName = tableName; @@ -12366,22 +14467,33 @@ public class Hbase { return new getRow_args(this); } - @Deprecated - public getRow_args clone() { - return new getRow_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public getRow_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public getRow_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -12405,13 +14517,23 @@ public class Hbase { * row key */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * row key */ public getRow_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public getRow_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -12437,7 +14559,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -12445,17 +14567,13 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -12468,12 +14586,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -12483,10 +14601,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -12505,7 +14619,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -12514,7 +14628,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -12534,25 +14648,33 @@ public class Hbase { int lastComparison = 0; getRow_args typedOther = (getRow_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -12562,28 +14684,25 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -12639,7 +14758,7 @@ public class Hbase { } - public static class getRow_result implements TBase, java.io.Serializable, Cloneable { + public static class getRow_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRow_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -12653,12 +14772,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -12667,7 +14784,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -12706,15 +14830,15 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, TRowResult.class)))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getRow_result.class, metaDataMap); } @@ -12750,9 +14874,10 @@ public class Hbase { return new getRow_result(this); } - @Deprecated - public getRow_result clone() { - return new getRow_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { @@ -12839,10 +14964,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -12855,12 +14976,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -12870,10 +14991,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -12913,6 +15030,41 @@ public class Hbase { return 0; } + public int compareTo(getRow_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRow_result typedOther = (getRow_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -12922,40 +15074,37 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.LIST) { + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list38 = iprot.readListBegin(); + this.success = new ArrayList(_list38.size); + for (int _i39 = 0; _i39 < _list38.size; ++_i39) { - TList _list38 = iprot.readListBegin(); - this.success = new ArrayList(_list38.size); - for (int _i39 = 0; _i39 < _list38.size; ++_i39) - { - TRowResult _elem40; - _elem40 = new TRowResult(); - _elem40.read(iprot); - this.success.add(_elem40); - } - iprot.readListEnd(); + TRowResult _elem40; + _elem40 = new TRowResult(); + _elem40.read(iprot); + this.success.add(_elem40); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -13016,7 +15165,7 @@ public class Hbase { } - public static class getRowWithColumns_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getRowWithColumns_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRowWithColumns_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -13026,15 +15175,15 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row key */ - public byte[] row; + public ByteBuffer row; /** * List of columns to return, null for all columns */ - public List columns; + public List columns; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -13051,12 +15200,10 @@ public class Hbase { */ COLUMNS((short)3, "columns"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -13065,7 +15212,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMNS + return COLUMNS; + default: + return null; + } } /** @@ -13104,17 +15260,17 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getRowWithColumns_args.class, metaDataMap); } @@ -13122,9 +15278,9 @@ public class Hbase { } public getRowWithColumns_args( - byte[] tableName, - byte[] row, - List columns) + ByteBuffer tableName, + ByteBuffer row, + List columns) { this(); this.tableName = tableName; @@ -13143,8 +15299,8 @@ public class Hbase { this.row = other.row; } if (other.isSetColumns()) { - List __this__columns = new ArrayList(); - for (byte[] other_element : other.columns) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { __this__columns.add(other_element); } this.columns = __this__columns; @@ -13155,22 +15311,34 @@ public class Hbase { return new getRowWithColumns_args(this); } - @Deprecated - public getRowWithColumns_args clone() { - return new getRowWithColumns_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.columns = null; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public getRowWithColumns_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public getRowWithColumns_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -13194,13 +15362,23 @@ public class Hbase { * row key */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * row key */ public getRowWithColumns_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public getRowWithColumns_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -13224,13 +15402,13 @@ public class Hbase { return (this.columns == null) ? 0 : this.columns.size(); } - public java.util.Iterator getColumnsIterator() { + public java.util.Iterator getColumnsIterator() { return (this.columns == null) ? null : this.columns.iterator(); } - public void addToColumns(byte[] elem) { + public void addToColumns(ByteBuffer elem) { if (this.columns == null) { - this.columns = new ArrayList(); + this.columns = new ArrayList(); } this.columns.add(elem); } @@ -13238,14 +15416,14 @@ public class Hbase { /** * List of columns to return, null for all columns */ - public List getColumns() { + public List getColumns() { return this.columns; } /** * List of columns to return, null for all columns */ - public getRowWithColumns_args setColumns(List columns) { + public getRowWithColumns_args setColumns(List columns) { this.columns = columns; return this; } @@ -13271,7 +15449,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -13279,7 +15457,7 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -13287,17 +15465,13 @@ public class Hbase { if (value == null) { unsetColumns(); } else { - setColumns((List)value); + setColumns((List)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -13313,12 +15487,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -13330,10 +15504,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -13352,7 +15522,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -13361,7 +15531,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -13390,33 +15560,43 @@ public class Hbase { int lastComparison = 0; getRowWithColumns_args typedOther = (getRowWithColumns_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumns()).compareTo(isSetColumns()); + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(columns, typedOther.columns); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumns()) { + lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -13426,45 +15606,42 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMNS: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMNS + if (field.type == TType.LIST) { + { + TList _list42 = iprot.readListBegin(); + this.columns = new ArrayList(_list42.size); + for (int _i43 = 0; _i43 < _list42.size; ++_i43) { - TList _list42 = iprot.readListBegin(); - this.columns = new ArrayList(_list42.size); - for (int _i43 = 0; _i43 < _list42.size; ++_i43) - { - byte[] _elem44; - _elem44 = iprot.readBinary(); - this.columns.add(_elem44); - } - iprot.readListEnd(); + ByteBuffer _elem44; + _elem44 = iprot.readBinary(); + this.columns.add(_elem44); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -13490,7 +15667,7 @@ public class Hbase { oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter45 : this.columns) + for (ByteBuffer _iter45 : this.columns) { oprot.writeBinary(_iter45); } @@ -13540,7 +15717,7 @@ public class Hbase { } - public static class getRowWithColumns_result implements TBase, java.io.Serializable, Cloneable { + public static class getRowWithColumns_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRowWithColumns_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -13554,12 +15731,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -13568,7 +15743,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -13607,15 +15789,15 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, TRowResult.class)))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getRowWithColumns_result.class, metaDataMap); } @@ -13651,9 +15833,10 @@ public class Hbase { return new getRowWithColumns_result(this); } - @Deprecated - public getRowWithColumns_result clone() { - return new getRowWithColumns_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { @@ -13740,10 +15923,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -13756,12 +15935,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -13771,10 +15950,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -13814,6 +15989,41 @@ public class Hbase { return 0; } + public int compareTo(getRowWithColumns_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowWithColumns_result typedOther = (getRowWithColumns_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -13823,40 +16033,37 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.LIST) { + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list46 = iprot.readListBegin(); + this.success = new ArrayList(_list46.size); + for (int _i47 = 0; _i47 < _list46.size; ++_i47) { - TList _list46 = iprot.readListBegin(); - this.success = new ArrayList(_list46.size); - for (int _i47 = 0; _i47 < _list46.size; ++_i47) - { - TRowResult _elem48; - _elem48 = new TRowResult(); - _elem48.read(iprot); - this.success.add(_elem48); - } - iprot.readListEnd(); + TRowResult _elem48; + _elem48 = new TRowResult(); + _elem48.read(iprot); + this.success.add(_elem48); } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -13917,7 +16124,7 @@ public class Hbase { } - public static class getRowTs_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getRowTs_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRowTs_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -13927,11 +16134,11 @@ public class Hbase { /** * name of the table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row key */ - public byte[] row; + public ByteBuffer row; /** * timestamp */ @@ -13952,12 +16159,10 @@ public class Hbase { */ TIMESTAMP((short)3, "timestamp"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -13966,7 +16171,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // TIMESTAMP + return TIMESTAMP; + default: + return null; + } } /** @@ -14007,16 +16221,16 @@ public class Hbase { private static final int __TIMESTAMP_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I64))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getRowTs_args.class, metaDataMap); } @@ -14024,8 +16238,8 @@ public class Hbase { } public getRowTs_args( - byte[] tableName, - byte[] row, + ByteBuffer tableName, + ByteBuffer row, long timestamp) { this(); @@ -14054,22 +16268,35 @@ public class Hbase { return new getRowTs_args(this); } - @Deprecated - public getRowTs_args clone() { - return new getRowTs_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; + setTimestampIsSet(false); + this.timestamp = 0; } /** * name of the table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of the table */ public getRowTs_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public getRowTs_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -14093,13 +16320,23 @@ public class Hbase { * row key */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * row key */ public getRowTs_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public getRowTs_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -14154,7 +16391,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -14162,7 +16399,7 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -14177,10 +16414,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -14196,12 +16429,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -14213,10 +16446,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -14235,7 +16464,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -14244,7 +16473,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -14273,33 +16502,43 @@ public class Hbase { int lastComparison = 0; getRowTs_args typedOther = (getRowTs_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp()); + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp); - if (lastComparison != 0) { - return lastComparison; + if (isSetTimestamp()) { + lastComparison = TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -14309,36 +16548,33 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TIMESTAMP: - if (field.type == TType.I64) { - this.timestamp = iprot.readI64(); - setTimestampIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // TIMESTAMP + if (field.type == TType.I64) { + this.timestamp = iprot.readI64(); + setTimestampIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -14401,7 +16637,7 @@ public class Hbase { } - public static class getRowTs_result implements TBase, java.io.Serializable, Cloneable { + public static class getRowTs_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRowTs_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -14415,12 +16651,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -14429,7 +16663,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -14468,15 +16709,15 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, TRowResult.class)))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getRowTs_result.class, metaDataMap); } @@ -14512,9 +16753,10 @@ public class Hbase { return new getRowTs_result(this); } - @Deprecated - public getRowTs_result clone() { - return new getRowTs_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { @@ -14601,10 +16843,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -14617,12 +16855,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -14632,10 +16870,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -14675,6 +16909,41 @@ public class Hbase { return 0; } + public int compareTo(getRowTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowTs_result typedOther = (getRowTs_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -14684,40 +16953,37 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.LIST) { + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list50 = iprot.readListBegin(); + this.success = new ArrayList(_list50.size); + for (int _i51 = 0; _i51 < _list50.size; ++_i51) { - TList _list50 = iprot.readListBegin(); - this.success = new ArrayList(_list50.size); - for (int _i51 = 0; _i51 < _list50.size; ++_i51) - { - TRowResult _elem52; - _elem52 = new TRowResult(); - _elem52.read(iprot); - this.success.add(_elem52); - } - iprot.readListEnd(); + TRowResult _elem52; + _elem52 = new TRowResult(); + _elem52.read(iprot); + this.success.add(_elem52); } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -14778,7 +17044,7 @@ public class Hbase { } - public static class getRowWithColumnsTs_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getRowWithColumnsTs_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRowWithColumnsTs_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -14789,15 +17055,15 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row key */ - public byte[] row; + public ByteBuffer row; /** * List of columns to return, null for all columns */ - public List columns; + public List columns; public long timestamp; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -14816,12 +17082,10 @@ public class Hbase { COLUMNS((short)3, "columns"), TIMESTAMP((short)4, "timestamp"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -14830,7 +17094,18 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMNS + return COLUMNS; + case 4: // TIMESTAMP + return TIMESTAMP; + default: + return null; + } } /** @@ -14871,19 +17146,19 @@ public class Hbase { private static final int __TIMESTAMP_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text")))); + tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getRowWithColumnsTs_args.class, metaDataMap); } @@ -14891,9 +17166,9 @@ public class Hbase { } public getRowWithColumnsTs_args( - byte[] tableName, - byte[] row, - List columns, + ByteBuffer tableName, + ByteBuffer row, + List columns, long timestamp) { this(); @@ -14917,8 +17192,8 @@ public class Hbase { this.row = other.row; } if (other.isSetColumns()) { - List __this__columns = new ArrayList(); - for (byte[] other_element : other.columns) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { __this__columns.add(other_element); } this.columns = __this__columns; @@ -14930,22 +17205,36 @@ public class Hbase { return new getRowWithColumnsTs_args(this); } - @Deprecated - public getRowWithColumnsTs_args clone() { - return new getRowWithColumnsTs_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.columns = null; + setTimestampIsSet(false); + this.timestamp = 0; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public getRowWithColumnsTs_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public getRowWithColumnsTs_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -14969,13 +17258,23 @@ public class Hbase { * row key */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * row key */ public getRowWithColumnsTs_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public getRowWithColumnsTs_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -14999,13 +17298,13 @@ public class Hbase { return (this.columns == null) ? 0 : this.columns.size(); } - public java.util.Iterator getColumnsIterator() { + public java.util.Iterator getColumnsIterator() { return (this.columns == null) ? null : this.columns.iterator(); } - public void addToColumns(byte[] elem) { + public void addToColumns(ByteBuffer elem) { if (this.columns == null) { - this.columns = new ArrayList(); + this.columns = new ArrayList(); } this.columns.add(elem); } @@ -15013,14 +17312,14 @@ public class Hbase { /** * List of columns to return, null for all columns */ - public List getColumns() { + public List getColumns() { return this.columns; } /** * List of columns to return, null for all columns */ - public getRowWithColumnsTs_args setColumns(List columns) { + public getRowWithColumnsTs_args setColumns(List columns) { this.columns = columns; return this; } @@ -15069,7 +17368,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -15077,7 +17376,7 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -15085,7 +17384,7 @@ public class Hbase { if (value == null) { unsetColumns(); } else { - setColumns((List)value); + setColumns((List)value); } break; @@ -15100,10 +17399,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -15122,12 +17417,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -15141,10 +17436,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -15163,7 +17454,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -15172,7 +17463,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -15210,41 +17501,53 @@ public class Hbase { int lastComparison = 0; getRowWithColumnsTs_args typedOther = (getRowWithColumnsTs_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumns()).compareTo(isSetColumns()); + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(columns, typedOther.columns); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumns()) { + lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp()); + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp); - if (lastComparison != 0) { - return lastComparison; + if (isSetTimestamp()) { + lastComparison = TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -15254,53 +17557,50 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMNS: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMNS + if (field.type == TType.LIST) { + { + TList _list54 = iprot.readListBegin(); + this.columns = new ArrayList(_list54.size); + for (int _i55 = 0; _i55 < _list54.size; ++_i55) { - TList _list54 = iprot.readListBegin(); - this.columns = new ArrayList(_list54.size); - for (int _i55 = 0; _i55 < _list54.size; ++_i55) - { - byte[] _elem56; - _elem56 = iprot.readBinary(); - this.columns.add(_elem56); - } - iprot.readListEnd(); + ByteBuffer _elem56; + _elem56 = iprot.readBinary(); + this.columns.add(_elem56); } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TIMESTAMP: - if (field.type == TType.I64) { - this.timestamp = iprot.readI64(); - setTimestampIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // TIMESTAMP + if (field.type == TType.I64) { + this.timestamp = iprot.readI64(); + setTimestampIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -15326,7 +17626,7 @@ public class Hbase { oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter57 : this.columns) + for (ByteBuffer _iter57 : this.columns) { oprot.writeBinary(_iter57); } @@ -15383,7 +17683,7 @@ public class Hbase { } - public static class getRowWithColumnsTs_result implements TBase, java.io.Serializable, Cloneable { + public static class getRowWithColumnsTs_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRowWithColumnsTs_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -15397,12 +17697,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -15411,7 +17709,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -15450,15 +17755,15 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, TRowResult.class)))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getRowWithColumnsTs_result.class, metaDataMap); } @@ -15494,9 +17799,10 @@ public class Hbase { return new getRowWithColumnsTs_result(this); } - @Deprecated - public getRowWithColumnsTs_result clone() { - return new getRowWithColumnsTs_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { @@ -15583,10 +17889,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -15599,12 +17901,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -15614,10 +17916,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -15657,6 +17955,41 @@ public class Hbase { return 0; } + public int compareTo(getRowWithColumnsTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowWithColumnsTs_result typedOther = (getRowWithColumnsTs_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -15666,40 +17999,37 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.LIST) { + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list58 = iprot.readListBegin(); + this.success = new ArrayList(_list58.size); + for (int _i59 = 0; _i59 < _list58.size; ++_i59) { - TList _list58 = iprot.readListBegin(); - this.success = new ArrayList(_list58.size); - for (int _i59 = 0; _i59 < _list58.size; ++_i59) - { - TRowResult _elem60; - _elem60 = new TRowResult(); - _elem60.read(iprot); - this.success.add(_elem60); - } - iprot.readListEnd(); + TRowResult _elem60; + _elem60 = new TRowResult(); + _elem60.read(iprot); + this.success.add(_elem60); } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -15760,7 +18090,7 @@ public class Hbase { } - public static class mutateRow_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class mutateRow_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("mutateRow_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -15770,11 +18100,11 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row key */ - public byte[] row; + public ByteBuffer row; /** * list of mutation commands */ @@ -15795,12 +18125,10 @@ public class Hbase { */ MUTATIONS((short)3, "mutations"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -15809,7 +18137,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // MUTATIONS + return MUTATIONS; + default: + return null; + } } /** @@ -15848,17 +18185,17 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.MUTATIONS, new FieldMetaData("mutations", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.MUTATIONS, new FieldMetaData("mutations", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Mutation.class)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(mutateRow_args.class, metaDataMap); } @@ -15866,8 +18203,8 @@ public class Hbase { } public mutateRow_args( - byte[] tableName, - byte[] row, + ByteBuffer tableName, + ByteBuffer row, List mutations) { this(); @@ -15899,22 +18236,34 @@ public class Hbase { return new mutateRow_args(this); } - @Deprecated - public mutateRow_args clone() { - return new mutateRow_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.mutations = null; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public mutateRow_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public mutateRow_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -15938,13 +18287,23 @@ public class Hbase { * row key */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * row key */ public mutateRow_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public mutateRow_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -16015,7 +18374,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -16023,7 +18382,7 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -16038,10 +18397,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -16057,12 +18412,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -16074,10 +18429,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -16096,7 +18447,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -16105,7 +18456,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -16134,33 +18485,43 @@ public class Hbase { int lastComparison = 0; mutateRow_args typedOther = (mutateRow_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetMutations()).compareTo(isSetMutations()); + lastComparison = Boolean.valueOf(isSetMutations()).compareTo(typedOther.isSetMutations()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(mutations, typedOther.mutations); - if (lastComparison != 0) { - return lastComparison; + if (isSetMutations()) { + lastComparison = TBaseHelper.compareTo(this.mutations, typedOther.mutations); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -16170,46 +18531,43 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MUTATIONS: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // MUTATIONS + if (field.type == TType.LIST) { + { + TList _list62 = iprot.readListBegin(); + this.mutations = new ArrayList(_list62.size); + for (int _i63 = 0; _i63 < _list62.size; ++_i63) { - TList _list62 = iprot.readListBegin(); - this.mutations = new ArrayList(_list62.size); - for (int _i63 = 0; _i63 < _list62.size; ++_i63) - { - Mutation _elem64; - _elem64 = new Mutation(); - _elem64.read(iprot); - this.mutations.add(_elem64); - } - iprot.readListEnd(); + Mutation _elem64; + _elem64 = new Mutation(); + _elem64.read(iprot); + this.mutations.add(_elem64); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -16285,7 +18643,7 @@ public class Hbase { } - public static class mutateRow_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class mutateRow_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("mutateRow_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -16299,12 +18657,10 @@ public class Hbase { IO((short)1, "io"), IA((short)2, "ia"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -16313,7 +18669,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } } /** @@ -16352,14 +18715,14 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(mutateRow_result.class, metaDataMap); } @@ -16391,9 +18754,10 @@ public class Hbase { return new mutateRow_result(this); } - @Deprecated - public mutateRow_result clone() { - return new mutateRow_result(this); + @Override + public void clear() { + this.io = null; + this.ia = null; } public IOError getIo() { @@ -16465,10 +18829,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -16481,12 +18841,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -16496,10 +18856,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -16547,25 +18903,33 @@ public class Hbase { int lastComparison = 0; mutateRow_result typedOther = (mutateRow_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIa()).compareTo(isSetIa()); + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(ia, typedOther.ia); - if (lastComparison != 0) { - return lastComparison; + if (isSetIa()) { + lastComparison = TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -16575,30 +18939,27 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IA: - if (field.type == TType.STRUCT) { - this.ia = new IllegalArgument(); - this.ia.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IA + if (field.type == TType.STRUCT) { + this.ia = new IllegalArgument(); + this.ia.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -16652,7 +19013,7 @@ public class Hbase { } - public static class mutateRowTs_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class mutateRowTs_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("mutateRowTs_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -16663,11 +19024,11 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row key */ - public byte[] row; + public ByteBuffer row; /** * list of mutation commands */ @@ -16696,12 +19057,10 @@ public class Hbase { */ TIMESTAMP((short)4, "timestamp"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -16710,7 +19069,18 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // MUTATIONS + return MUTATIONS; + case 4: // TIMESTAMP + return TIMESTAMP; + default: + return null; + } } /** @@ -16751,19 +19121,19 @@ public class Hbase { private static final int __TIMESTAMP_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.MUTATIONS, new FieldMetaData("mutations", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.MUTATIONS, new FieldMetaData("mutations", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Mutation.class)))); - put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(mutateRowTs_args.class, metaDataMap); } @@ -16771,8 +19141,8 @@ public class Hbase { } public mutateRowTs_args( - byte[] tableName, - byte[] row, + ByteBuffer tableName, + ByteBuffer row, List mutations, long timestamp) { @@ -16810,22 +19180,36 @@ public class Hbase { return new mutateRowTs_args(this); } - @Deprecated - public mutateRowTs_args clone() { - return new mutateRowTs_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.mutations = null; + setTimestampIsSet(false); + this.timestamp = 0; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public mutateRowTs_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public mutateRowTs_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -16849,13 +19233,23 @@ public class Hbase { * row key */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * row key */ public mutateRowTs_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public mutateRowTs_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -16955,7 +19349,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -16963,7 +19357,7 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -16986,10 +19380,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -17008,12 +19398,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -17027,10 +19417,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -17049,7 +19435,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -17058,7 +19444,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -17096,41 +19482,53 @@ public class Hbase { int lastComparison = 0; mutateRowTs_args typedOther = (mutateRowTs_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetMutations()).compareTo(isSetMutations()); + lastComparison = Boolean.valueOf(isSetMutations()).compareTo(typedOther.isSetMutations()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(mutations, typedOther.mutations); - if (lastComparison != 0) { - return lastComparison; + if (isSetMutations()) { + lastComparison = TBaseHelper.compareTo(this.mutations, typedOther.mutations); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp()); + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp); - if (lastComparison != 0) { - return lastComparison; + if (isSetTimestamp()) { + lastComparison = TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -17140,54 +19538,51 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MUTATIONS: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // MUTATIONS + if (field.type == TType.LIST) { + { + TList _list66 = iprot.readListBegin(); + this.mutations = new ArrayList(_list66.size); + for (int _i67 = 0; _i67 < _list66.size; ++_i67) { - TList _list66 = iprot.readListBegin(); - this.mutations = new ArrayList(_list66.size); - for (int _i67 = 0; _i67 < _list66.size; ++_i67) - { - Mutation _elem68; - _elem68 = new Mutation(); - _elem68.read(iprot); - this.mutations.add(_elem68); - } - iprot.readListEnd(); + Mutation _elem68; + _elem68 = new Mutation(); + _elem68.read(iprot); + this.mutations.add(_elem68); } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TIMESTAMP: - if (field.type == TType.I64) { - this.timestamp = iprot.readI64(); - setTimestampIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // TIMESTAMP + if (field.type == TType.I64) { + this.timestamp = iprot.readI64(); + setTimestampIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -17270,7 +19665,7 @@ public class Hbase { } - public static class mutateRowTs_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class mutateRowTs_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("mutateRowTs_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -17284,12 +19679,10 @@ public class Hbase { IO((short)1, "io"), IA((short)2, "ia"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -17298,7 +19691,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } } /** @@ -17337,14 +19737,14 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(mutateRowTs_result.class, metaDataMap); } @@ -17376,9 +19776,10 @@ public class Hbase { return new mutateRowTs_result(this); } - @Deprecated - public mutateRowTs_result clone() { - return new mutateRowTs_result(this); + @Override + public void clear() { + this.io = null; + this.ia = null; } public IOError getIo() { @@ -17450,10 +19851,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -17466,12 +19863,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -17481,10 +19878,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -17532,25 +19925,33 @@ public class Hbase { int lastComparison = 0; mutateRowTs_result typedOther = (mutateRowTs_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIa()).compareTo(isSetIa()); + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(ia, typedOther.ia); - if (lastComparison != 0) { - return lastComparison; + if (isSetIa()) { + lastComparison = TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -17560,30 +19961,27 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IA: - if (field.type == TType.STRUCT) { - this.ia = new IllegalArgument(); - this.ia.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IA + if (field.type == TType.STRUCT) { + this.ia = new IllegalArgument(); + this.ia.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -17637,7 +20035,7 @@ public class Hbase { } - public static class mutateRows_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class mutateRows_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("mutateRows_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -17646,7 +20044,7 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * list of row batches */ @@ -17663,12 +20061,10 @@ public class Hbase { */ ROW_BATCHES((short)2, "rowBatches"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -17677,7 +20073,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW_BATCHES + return ROW_BATCHES; + default: + return null; + } } /** @@ -17716,15 +20119,15 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW_BATCHES, new FieldMetaData("rowBatches", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW_BATCHES, new FieldMetaData("rowBatches", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, BatchMutation.class)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(mutateRows_args.class, metaDataMap); } @@ -17732,7 +20135,7 @@ public class Hbase { } public mutateRows_args( - byte[] tableName, + ByteBuffer tableName, List rowBatches) { this(); @@ -17760,22 +20163,33 @@ public class Hbase { return new mutateRows_args(this); } - @Deprecated - public mutateRows_args clone() { - return new mutateRows_args(this); + @Override + public void clear() { + this.tableName = null; + this.rowBatches = null; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public mutateRows_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public mutateRows_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -17846,7 +20260,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -17861,10 +20275,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -17877,12 +20287,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -17892,10 +20302,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -17914,7 +20320,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -17943,25 +20349,33 @@ public class Hbase { int lastComparison = 0; mutateRows_args typedOther = (mutateRows_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRowBatches()).compareTo(isSetRowBatches()); + lastComparison = Boolean.valueOf(isSetRowBatches()).compareTo(typedOther.isSetRowBatches()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(rowBatches, typedOther.rowBatches); - if (lastComparison != 0) { - return lastComparison; + if (isSetRowBatches()) { + lastComparison = TBaseHelper.compareTo(this.rowBatches, typedOther.rowBatches); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -17971,39 +20385,36 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW_BATCHES: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW_BATCHES + if (field.type == TType.LIST) { + { + TList _list70 = iprot.readListBegin(); + this.rowBatches = new ArrayList(_list70.size); + for (int _i71 = 0; _i71 < _list70.size; ++_i71) { - TList _list70 = iprot.readListBegin(); - this.rowBatches = new ArrayList(_list70.size); - for (int _i71 = 0; _i71 < _list70.size; ++_i71) - { - BatchMutation _elem72; - _elem72 = new BatchMutation(); - _elem72.read(iprot); - this.rowBatches.add(_elem72); - } - iprot.readListEnd(); + BatchMutation _elem72; + _elem72 = new BatchMutation(); + _elem72.read(iprot); + this.rowBatches.add(_elem72); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -18066,7 +20477,7 @@ public class Hbase { } - public static class mutateRows_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class mutateRows_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("mutateRows_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -18080,12 +20491,10 @@ public class Hbase { IO((short)1, "io"), IA((short)2, "ia"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -18094,7 +20503,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } } /** @@ -18133,14 +20549,14 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(mutateRows_result.class, metaDataMap); } @@ -18172,9 +20588,10 @@ public class Hbase { return new mutateRows_result(this); } - @Deprecated - public mutateRows_result clone() { - return new mutateRows_result(this); + @Override + public void clear() { + this.io = null; + this.ia = null; } public IOError getIo() { @@ -18246,10 +20663,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -18262,12 +20675,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -18277,10 +20690,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -18328,25 +20737,33 @@ public class Hbase { int lastComparison = 0; mutateRows_result typedOther = (mutateRows_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIa()).compareTo(isSetIa()); + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(ia, typedOther.ia); - if (lastComparison != 0) { - return lastComparison; + if (isSetIa()) { + lastComparison = TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -18356,30 +20773,27 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IA: - if (field.type == TType.STRUCT) { - this.ia = new IllegalArgument(); - this.ia.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IA + if (field.type == TType.STRUCT) { + this.ia = new IllegalArgument(); + this.ia.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -18433,7 +20847,7 @@ public class Hbase { } - public static class mutateRowsTs_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class mutateRowsTs_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("mutateRowsTs_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -18443,7 +20857,7 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * list of row batches */ @@ -18468,12 +20882,10 @@ public class Hbase { */ TIMESTAMP((short)3, "timestamp"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -18482,7 +20894,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW_BATCHES + return ROW_BATCHES; + case 3: // TIMESTAMP + return TIMESTAMP; + default: + return null; + } } /** @@ -18523,17 +20944,17 @@ public class Hbase { private static final int __TIMESTAMP_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW_BATCHES, new FieldMetaData("rowBatches", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW_BATCHES, new FieldMetaData("rowBatches", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, BatchMutation.class)))); - put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(mutateRowsTs_args.class, metaDataMap); } @@ -18541,7 +20962,7 @@ public class Hbase { } public mutateRowsTs_args( - byte[] tableName, + ByteBuffer tableName, List rowBatches, long timestamp) { @@ -18575,22 +20996,35 @@ public class Hbase { return new mutateRowsTs_args(this); } - @Deprecated - public mutateRowsTs_args clone() { - return new mutateRowsTs_args(this); + @Override + public void clear() { + this.tableName = null; + this.rowBatches = null; + setTimestampIsSet(false); + this.timestamp = 0; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public mutateRowsTs_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public mutateRowsTs_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -18690,7 +21124,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -18713,10 +21147,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -18732,12 +21162,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -18749,10 +21179,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -18771,7 +21197,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -18809,33 +21235,43 @@ public class Hbase { int lastComparison = 0; mutateRowsTs_args typedOther = (mutateRowsTs_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRowBatches()).compareTo(isSetRowBatches()); + lastComparison = Boolean.valueOf(isSetRowBatches()).compareTo(typedOther.isSetRowBatches()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(rowBatches, typedOther.rowBatches); - if (lastComparison != 0) { - return lastComparison; + if (isSetRowBatches()) { + lastComparison = TBaseHelper.compareTo(this.rowBatches, typedOther.rowBatches); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp()); + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp); - if (lastComparison != 0) { - return lastComparison; + if (isSetTimestamp()) { + lastComparison = TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -18845,47 +21281,44 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW_BATCHES: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW_BATCHES + if (field.type == TType.LIST) { + { + TList _list74 = iprot.readListBegin(); + this.rowBatches = new ArrayList(_list74.size); + for (int _i75 = 0; _i75 < _list74.size; ++_i75) { - TList _list74 = iprot.readListBegin(); - this.rowBatches = new ArrayList(_list74.size); - for (int _i75 = 0; _i75 < _list74.size; ++_i75) - { - BatchMutation _elem76; - _elem76 = new BatchMutation(); - _elem76.read(iprot); - this.rowBatches.add(_elem76); - } - iprot.readListEnd(); + BatchMutation _elem76; + _elem76 = new BatchMutation(); + _elem76.read(iprot); + this.rowBatches.add(_elem76); } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TIMESTAMP: - if (field.type == TType.I64) { - this.timestamp = iprot.readI64(); - setTimestampIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // TIMESTAMP + if (field.type == TType.I64) { + this.timestamp = iprot.readI64(); + setTimestampIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -18955,7 +21388,7 @@ public class Hbase { } - public static class mutateRowsTs_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class mutateRowsTs_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("mutateRowsTs_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -18969,12 +21402,10 @@ public class Hbase { IO((short)1, "io"), IA((short)2, "ia"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -18983,7 +21414,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } } /** @@ -19022,14 +21460,14 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(mutateRowsTs_result.class, metaDataMap); } @@ -19061,9 +21499,10 @@ public class Hbase { return new mutateRowsTs_result(this); } - @Deprecated - public mutateRowsTs_result clone() { - return new mutateRowsTs_result(this); + @Override + public void clear() { + this.io = null; + this.ia = null; } public IOError getIo() { @@ -19135,10 +21574,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -19151,12 +21586,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -19166,10 +21601,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -19217,25 +21648,33 @@ public class Hbase { int lastComparison = 0; mutateRowsTs_result typedOther = (mutateRowsTs_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIa()).compareTo(isSetIa()); + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(ia, typedOther.ia); - if (lastComparison != 0) { - return lastComparison; + if (isSetIa()) { + lastComparison = TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -19245,30 +21684,27 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IA: - if (field.type == TType.STRUCT) { - this.ia = new IllegalArgument(); - this.ia.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IA + if (field.type == TType.STRUCT) { + this.ia = new IllegalArgument(); + this.ia.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -19322,7 +21758,7 @@ public class Hbase { } - public static class atomicIncrement_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class atomicIncrement_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("atomicIncrement_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -19333,15 +21769,15 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row to increment */ - public byte[] row; + public ByteBuffer row; /** * name of column */ - public byte[] column; + public ByteBuffer column; /** * amount to increment by */ @@ -19366,12 +21802,10 @@ public class Hbase { */ VALUE((short)4, "value"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -19380,7 +21814,18 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + case 4: // VALUE + return VALUE; + default: + return null; + } } /** @@ -19421,18 +21866,18 @@ public class Hbase { private static final int __VALUE_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I64))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(atomicIncrement_args.class, metaDataMap); } @@ -19440,9 +21885,9 @@ public class Hbase { } public atomicIncrement_args( - byte[] tableName, - byte[] row, - byte[] column, + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, long value) { this(); @@ -19475,22 +21920,36 @@ public class Hbase { return new atomicIncrement_args(this); } - @Deprecated - public atomicIncrement_args clone() { - return new atomicIncrement_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.column = null; + setValueIsSet(false); + this.value = 0; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public atomicIncrement_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public atomicIncrement_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -19514,13 +21973,23 @@ public class Hbase { * row to increment */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * row to increment */ public atomicIncrement_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public atomicIncrement_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -19544,13 +22013,23 @@ public class Hbase { * name of column */ public byte[] getColumn() { - return this.column; + setColumn(TBaseHelper.rightSize(column)); + return column.array(); + } + + public ByteBuffer BufferForColumn() { + return column; } /** * name of column */ public atomicIncrement_args setColumn(byte[] column) { + setColumn(ByteBuffer.wrap(column)); + return this; + } + + public atomicIncrement_args setColumn(ByteBuffer column) { this.column = column; return this; } @@ -19605,7 +22084,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -19613,7 +22092,7 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -19621,7 +22100,7 @@ public class Hbase { if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; @@ -19636,10 +22115,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -19658,12 +22133,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -19677,10 +22152,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -19699,7 +22170,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -19708,7 +22179,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -19717,7 +22188,7 @@ public class Hbase { if (this_present_column || that_present_column) { if (!(this_present_column && that_present_column)) return false; - if (!java.util.Arrays.equals(this.column, that.column)) + if (!this.column.equals(that.column)) return false; } @@ -19746,41 +22217,53 @@ public class Hbase { int lastComparison = 0; atomicIncrement_args typedOther = (atomicIncrement_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumn()).compareTo(isSetColumn()); + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(column, typedOther.column); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumn()) { + lastComparison = TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetValue()).compareTo(isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(value, typedOther.value); - if (lastComparison != 0) { - return lastComparison; + if (isSetValue()) { + lastComparison = TBaseHelper.compareTo(this.value, typedOther.value); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -19790,43 +22273,40 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMN: - if (field.type == TType.STRING) { - this.column = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case VALUE: - if (field.type == TType.I64) { - this.value = iprot.readI64(); - setValueIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMN + if (field.type == TType.STRING) { + this.column = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // VALUE + if (field.type == TType.I64) { + this.value = iprot.readI64(); + setValueIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -19902,7 +22382,7 @@ public class Hbase { } - public static class atomicIncrement_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class atomicIncrement_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("atomicIncrement_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0); @@ -19919,12 +22399,10 @@ public class Hbase { IO((short)1, "io"), IA((short)2, "ia"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -19933,7 +22411,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } } /** @@ -19974,16 +22461,16 @@ public class Hbase { private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(atomicIncrement_result.class, metaDataMap); } @@ -20021,9 +22508,12 @@ public class Hbase { return new atomicIncrement_result(this); } - @Deprecated - public atomicIncrement_result clone() { - return new atomicIncrement_result(this); + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; + this.ia = null; } public long getSuccess() { @@ -20126,10 +22616,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -20145,12 +22631,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -20162,10 +22648,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -20222,33 +22704,43 @@ public class Hbase { int lastComparison = 0; atomicIncrement_result typedOther = (atomicIncrement_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIa()).compareTo(isSetIa()); + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(ia, typedOther.ia); - if (lastComparison != 0) { - return lastComparison; + if (isSetIa()) { + lastComparison = TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -20258,38 +22750,35 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.I64) { - this.success = iprot.readI64(); - setSuccessIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IA: - if (field.type == TType.STRUCT) { - this.ia = new IllegalArgument(); - this.ia.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.I64) { + this.success = iprot.readI64(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IA + if (field.type == TType.STRUCT) { + this.ia = new IllegalArgument(); + this.ia.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -20351,7 +22840,7 @@ public class Hbase { } - public static class asyncAtomicIncrements_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class asyncAtomicIncrements_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("asyncAtomicIncrements_args"); private static final TField INCREMENTS_FIELD_DESC = new TField("increments", TType.LIST, (short)1); @@ -20362,12 +22851,10 @@ public class Hbase { public enum _Fields implements TFieldIdEnum { INCREMENTS((short)1, "increments"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -20376,7 +22863,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // INCREMENTS + return INCREMENTS; + default: + return null; + } } /** @@ -20415,13 +22907,13 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.INCREMENTS, new FieldMetaData("increments", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.INCREMENTS, new FieldMetaData("increments", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Increment.class)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(asyncAtomicIncrements_args.class, metaDataMap); } @@ -20452,9 +22944,9 @@ public class Hbase { return new asyncAtomicIncrements_args(this); } - @Deprecated - public asyncAtomicIncrements_args clone() { - return new asyncAtomicIncrements_args(this); + @Override + public void clear() { + this.increments = null; } public int getIncrementsSize() { @@ -20509,10 +23001,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case INCREMENTS: @@ -20522,12 +23010,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case INCREMENTS: return isSetIncrements(); @@ -20535,10 +23023,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -20577,17 +23061,23 @@ public class Hbase { int lastComparison = 0; asyncAtomicIncrements_args typedOther = (asyncAtomicIncrements_args)other; - lastComparison = Boolean.valueOf(isSetIncrements()).compareTo(isSetIncrements()); + lastComparison = Boolean.valueOf(isSetIncrements()).compareTo(typedOther.isSetIncrements()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(increments, typedOther.increments); - if (lastComparison != 0) { - return lastComparison; + if (isSetIncrements()) { + lastComparison = TBaseHelper.compareTo(this.increments, typedOther.increments); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -20597,32 +23087,29 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case INCREMENTS: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // INCREMENTS + if (field.type == TType.LIST) { + { + TList _list78 = iprot.readListBegin(); + this.increments = new ArrayList(_list78.size); + for (int _i79 = 0; _i79 < _list78.size; ++_i79) { - TList _list78 = iprot.readListBegin(); - this.increments = new ArrayList(_list78.size); - for (int _i79 = 0; _i79 < _list78.size; ++_i79) - { - Increment _elem80; - _elem80 = new Increment(); - _elem80.read(iprot); - this.increments.add(_elem80); - } - iprot.readListEnd(); + Increment _elem80; + _elem80 = new Increment(); + _elem80.read(iprot); + this.increments.add(_elem80); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -20672,7 +23159,7 @@ public class Hbase { } - public static class deleteAll_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class deleteAll_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("deleteAll_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -20682,15 +23169,15 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * Row to update */ - public byte[] row; + public ByteBuffer row; /** * name of column whose value is to be deleted */ - public byte[] column; + public ByteBuffer column; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -20707,12 +23194,10 @@ public class Hbase { */ COLUMN((short)3, "column"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -20721,7 +23206,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + default: + return null; + } } /** @@ -20760,16 +23254,16 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAll_args.class, metaDataMap); } @@ -20777,9 +23271,9 @@ public class Hbase { } public deleteAll_args( - byte[] tableName, - byte[] row, - byte[] column) + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column) { this(); this.tableName = tableName; @@ -20806,22 +23300,34 @@ public class Hbase { return new deleteAll_args(this); } - @Deprecated - public deleteAll_args clone() { - return new deleteAll_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.column = null; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public deleteAll_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public deleteAll_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -20845,13 +23351,23 @@ public class Hbase { * Row to update */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * Row to update */ public deleteAll_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public deleteAll_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -20875,13 +23391,23 @@ public class Hbase { * name of column whose value is to be deleted */ public byte[] getColumn() { - return this.column; + setColumn(TBaseHelper.rightSize(column)); + return column.array(); + } + + public ByteBuffer BufferForColumn() { + return column; } /** * name of column whose value is to be deleted */ public deleteAll_args setColumn(byte[] column) { + setColumn(ByteBuffer.wrap(column)); + return this; + } + + public deleteAll_args setColumn(ByteBuffer column) { this.column = column; return this; } @@ -20907,7 +23433,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -20915,7 +23441,7 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -20923,17 +23449,13 @@ public class Hbase { if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -20949,12 +23471,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -20966,10 +23488,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -20988,7 +23506,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -20997,7 +23515,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -21006,7 +23524,7 @@ public class Hbase { if (this_present_column || that_present_column) { if (!(this_present_column && that_present_column)) return false; - if (!java.util.Arrays.equals(this.column, that.column)) + if (!this.column.equals(that.column)) return false; } @@ -21026,33 +23544,43 @@ public class Hbase { int lastComparison = 0; deleteAll_args typedOther = (deleteAll_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumn()).compareTo(isSetColumn()); + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(column, typedOther.column); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumn()) { + lastComparison = TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -21062,35 +23590,32 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMN: - if (field.type == TType.STRING) { - this.column = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMN + if (field.type == TType.STRING) { + this.column = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -21159,7 +23684,7 @@ public class Hbase { } - public static class deleteAll_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class deleteAll_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("deleteAll_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -21170,12 +23695,10 @@ public class Hbase { public enum _Fields implements TFieldIdEnum { IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -21184,7 +23707,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } } /** @@ -21223,12 +23751,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAll_result.class, metaDataMap); } @@ -21255,9 +23783,9 @@ public class Hbase { return new deleteAll_result(this); } - @Deprecated - public deleteAll_result clone() { - return new deleteAll_result(this); + @Override + public void clear() { + this.io = null; } public IOError getIo() { @@ -21297,10 +23825,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -21310,12 +23834,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -21323,10 +23847,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -21365,17 +23885,23 @@ public class Hbase { int lastComparison = 0; deleteAll_result typedOther = (deleteAll_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -21385,22 +23911,19 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -21442,7 +23965,7 @@ public class Hbase { } - public static class deleteAllTs_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class deleteAllTs_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("deleteAllTs_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -21453,15 +23976,15 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * Row to update */ - public byte[] row; + public ByteBuffer row; /** * name of column whose value is to be deleted */ - public byte[] column; + public ByteBuffer column; /** * timestamp */ @@ -21486,12 +24009,10 @@ public class Hbase { */ TIMESTAMP((short)4, "timestamp"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -21500,7 +24021,18 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + case 4: // TIMESTAMP + return TIMESTAMP; + default: + return null; + } } /** @@ -21541,18 +24073,18 @@ public class Hbase { private static final int __TIMESTAMP_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I64))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAllTs_args.class, metaDataMap); } @@ -21560,9 +24092,9 @@ public class Hbase { } public deleteAllTs_args( - byte[] tableName, - byte[] row, - byte[] column, + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, long timestamp) { this(); @@ -21595,22 +24127,36 @@ public class Hbase { return new deleteAllTs_args(this); } - @Deprecated - public deleteAllTs_args clone() { - return new deleteAllTs_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.column = null; + setTimestampIsSet(false); + this.timestamp = 0; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public deleteAllTs_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public deleteAllTs_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -21634,13 +24180,23 @@ public class Hbase { * Row to update */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * Row to update */ public deleteAllTs_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public deleteAllTs_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -21664,13 +24220,23 @@ public class Hbase { * name of column whose value is to be deleted */ public byte[] getColumn() { - return this.column; + setColumn(TBaseHelper.rightSize(column)); + return column.array(); + } + + public ByteBuffer BufferForColumn() { + return column; } /** * name of column whose value is to be deleted */ public deleteAllTs_args setColumn(byte[] column) { + setColumn(ByteBuffer.wrap(column)); + return this; + } + + public deleteAllTs_args setColumn(ByteBuffer column) { this.column = column; return this; } @@ -21725,7 +24291,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -21733,7 +24299,7 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -21741,7 +24307,7 @@ public class Hbase { if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; @@ -21756,10 +24322,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -21778,12 +24340,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -21797,10 +24359,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -21819,7 +24377,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -21828,7 +24386,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -21837,7 +24395,7 @@ public class Hbase { if (this_present_column || that_present_column) { if (!(this_present_column && that_present_column)) return false; - if (!java.util.Arrays.equals(this.column, that.column)) + if (!this.column.equals(that.column)) return false; } @@ -21866,41 +24424,53 @@ public class Hbase { int lastComparison = 0; deleteAllTs_args typedOther = (deleteAllTs_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumn()).compareTo(isSetColumn()); + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(column, typedOther.column); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumn()) { + lastComparison = TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp()); + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp); - if (lastComparison != 0) { - return lastComparison; + if (isSetTimestamp()) { + lastComparison = TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -21910,43 +24480,40 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMN: - if (field.type == TType.STRING) { - this.column = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TIMESTAMP: - if (field.type == TType.I64) { - this.timestamp = iprot.readI64(); - setTimestampIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMN + if (field.type == TType.STRING) { + this.column = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // TIMESTAMP + if (field.type == TType.I64) { + this.timestamp = iprot.readI64(); + setTimestampIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -22022,7 +24589,7 @@ public class Hbase { } - public static class deleteAllTs_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class deleteAllTs_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("deleteAllTs_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -22033,12 +24600,10 @@ public class Hbase { public enum _Fields implements TFieldIdEnum { IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -22047,7 +24612,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } } /** @@ -22086,12 +24656,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAllTs_result.class, metaDataMap); } @@ -22118,9 +24688,9 @@ public class Hbase { return new deleteAllTs_result(this); } - @Deprecated - public deleteAllTs_result clone() { - return new deleteAllTs_result(this); + @Override + public void clear() { + this.io = null; } public IOError getIo() { @@ -22160,10 +24730,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -22173,12 +24739,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -22186,10 +24752,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -22228,17 +24790,23 @@ public class Hbase { int lastComparison = 0; deleteAllTs_result typedOther = (deleteAllTs_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -22248,22 +24816,19 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -22305,7 +24870,7 @@ public class Hbase { } - public static class deleteAllRow_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class deleteAllRow_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("deleteAllRow_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -22314,11 +24879,11 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * key of the row to be completely deleted. */ - public byte[] row; + public ByteBuffer row; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -22331,12 +24896,10 @@ public class Hbase { */ ROW((short)2, "row"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -22345,7 +24908,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + default: + return null; + } } /** @@ -22384,14 +24954,14 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAllRow_args.class, metaDataMap); } @@ -22399,8 +24969,8 @@ public class Hbase { } public deleteAllRow_args( - byte[] tableName, - byte[] row) + ByteBuffer tableName, + ByteBuffer row) { this(); this.tableName = tableName; @@ -22423,22 +24993,33 @@ public class Hbase { return new deleteAllRow_args(this); } - @Deprecated - public deleteAllRow_args clone() { - return new deleteAllRow_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public deleteAllRow_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public deleteAllRow_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -22462,13 +25043,23 @@ public class Hbase { * key of the row to be completely deleted. */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * key of the row to be completely deleted. */ public deleteAllRow_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public deleteAllRow_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -22494,7 +25085,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -22502,17 +25093,13 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -22525,12 +25112,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -22540,10 +25127,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -22562,7 +25145,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -22571,7 +25154,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -22591,25 +25174,33 @@ public class Hbase { int lastComparison = 0; deleteAllRow_args typedOther = (deleteAllRow_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -22619,28 +25210,25 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -22696,7 +25284,7 @@ public class Hbase { } - public static class deleteAllRow_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class deleteAllRow_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("deleteAllRow_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -22707,12 +25295,10 @@ public class Hbase { public enum _Fields implements TFieldIdEnum { IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -22721,7 +25307,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } } /** @@ -22760,12 +25351,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAllRow_result.class, metaDataMap); } @@ -22792,9 +25383,9 @@ public class Hbase { return new deleteAllRow_result(this); } - @Deprecated - public deleteAllRow_result clone() { - return new deleteAllRow_result(this); + @Override + public void clear() { + this.io = null; } public IOError getIo() { @@ -22834,10 +25425,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -22847,12 +25434,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -22860,10 +25447,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -22902,17 +25485,23 @@ public class Hbase { int lastComparison = 0; deleteAllRow_result typedOther = (deleteAllRow_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -22922,22 +25511,19 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -22979,7 +25565,7 @@ public class Hbase { } - public static class deleteAllRowTs_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class deleteAllRowTs_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("deleteAllRowTs_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -22989,11 +25575,11 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * key of the row to be completely deleted. */ - public byte[] row; + public ByteBuffer row; /** * timestamp */ @@ -23014,12 +25600,10 @@ public class Hbase { */ TIMESTAMP((short)3, "timestamp"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -23028,7 +25612,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // TIMESTAMP + return TIMESTAMP; + default: + return null; + } } /** @@ -23069,16 +25662,16 @@ public class Hbase { private static final int __TIMESTAMP_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I64))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAllRowTs_args.class, metaDataMap); } @@ -23086,8 +25679,8 @@ public class Hbase { } public deleteAllRowTs_args( - byte[] tableName, - byte[] row, + ByteBuffer tableName, + ByteBuffer row, long timestamp) { this(); @@ -23116,22 +25709,35 @@ public class Hbase { return new deleteAllRowTs_args(this); } - @Deprecated - public deleteAllRowTs_args clone() { - return new deleteAllRowTs_args(this); + @Override + public void clear() { + this.tableName = null; + this.row = null; + setTimestampIsSet(false); + this.timestamp = 0; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public deleteAllRowTs_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public deleteAllRowTs_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -23155,13 +25761,23 @@ public class Hbase { * key of the row to be completely deleted. */ public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } /** * key of the row to be completely deleted. */ public deleteAllRowTs_args setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public deleteAllRowTs_args setRow(ByteBuffer row) { this.row = row; return this; } @@ -23216,7 +25832,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -23224,7 +25840,7 @@ public class Hbase { if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -23239,10 +25855,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -23258,12 +25870,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -23275,10 +25887,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -23297,7 +25905,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -23306,7 +25914,7 @@ public class Hbase { if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -23335,33 +25943,43 @@ public class Hbase { int lastComparison = 0; deleteAllRowTs_args typedOther = (deleteAllRowTs_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp()); + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp); - if (lastComparison != 0) { - return lastComparison; + if (isSetTimestamp()) { + lastComparison = TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -23371,36 +25989,33 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TIMESTAMP: - if (field.type == TType.I64) { - this.timestamp = iprot.readI64(); - setTimestampIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // TIMESTAMP + if (field.type == TType.I64) { + this.timestamp = iprot.readI64(); + setTimestampIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -23463,7 +26078,7 @@ public class Hbase { } - public static class deleteAllRowTs_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class deleteAllRowTs_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("deleteAllRowTs_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -23474,12 +26089,10 @@ public class Hbase { public enum _Fields implements TFieldIdEnum { IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -23488,7 +26101,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } } /** @@ -23527,12 +26145,12 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAllRowTs_result.class, metaDataMap); } @@ -23559,9 +26177,9 @@ public class Hbase { return new deleteAllRowTs_result(this); } - @Deprecated - public deleteAllRowTs_result clone() { - return new deleteAllRowTs_result(this); + @Override + public void clear() { + this.io = null; } public IOError getIo() { @@ -23601,10 +26219,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -23614,12 +26228,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -23627,10 +26241,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -23669,17 +26279,23 @@ public class Hbase { int lastComparison = 0; deleteAllRowTs_result typedOther = (deleteAllRowTs_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -23689,22 +26305,19 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -23746,7 +26359,7 @@ public class Hbase { } - public static class scannerOpen_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerOpen_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerOpen_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -23756,18 +26369,18 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * Starting row in table to scan. * Send "" (empty string) to start at the first row. */ - public byte[] startRow; + public ByteBuffer startRow; /** * columns to scan. If column name is a column family, all * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public List columns; + public List columns; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -23787,12 +26400,10 @@ public class Hbase { */ COLUMNS((short)3, "columns"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -23801,7 +26412,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // START_ROW + return START_ROW; + case 3: // COLUMNS + return COLUMNS; + default: + return null; + } } /** @@ -23840,17 +26460,17 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.START_ROW, new FieldMetaData("startRow", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.START_ROW, new FieldMetaData("startRow", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpen_args.class, metaDataMap); } @@ -23858,9 +26478,9 @@ public class Hbase { } public scannerOpen_args( - byte[] tableName, - byte[] startRow, - List columns) + ByteBuffer tableName, + ByteBuffer startRow, + List columns) { this(); this.tableName = tableName; @@ -23879,8 +26499,8 @@ public class Hbase { this.startRow = other.startRow; } if (other.isSetColumns()) { - List __this__columns = new ArrayList(); - for (byte[] other_element : other.columns) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { __this__columns.add(other_element); } this.columns = __this__columns; @@ -23891,22 +26511,34 @@ public class Hbase { return new scannerOpen_args(this); } - @Deprecated - public scannerOpen_args clone() { - return new scannerOpen_args(this); + @Override + public void clear() { + this.tableName = null; + this.startRow = null; + this.columns = null; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public scannerOpen_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public scannerOpen_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -23931,7 +26563,12 @@ public class Hbase { * Send "" (empty string) to start at the first row. */ public byte[] getStartRow() { - return this.startRow; + setStartRow(TBaseHelper.rightSize(startRow)); + return startRow.array(); + } + + public ByteBuffer BufferForStartRow() { + return startRow; } /** @@ -23939,6 +26576,11 @@ public class Hbase { * Send "" (empty string) to start at the first row. */ public scannerOpen_args setStartRow(byte[] startRow) { + setStartRow(ByteBuffer.wrap(startRow)); + return this; + } + + public scannerOpen_args setStartRow(ByteBuffer startRow) { this.startRow = startRow; return this; } @@ -23962,13 +26604,13 @@ public class Hbase { return (this.columns == null) ? 0 : this.columns.size(); } - public java.util.Iterator getColumnsIterator() { + public java.util.Iterator getColumnsIterator() { return (this.columns == null) ? null : this.columns.iterator(); } - public void addToColumns(byte[] elem) { + public void addToColumns(ByteBuffer elem) { if (this.columns == null) { - this.columns = new ArrayList(); + this.columns = new ArrayList(); } this.columns.add(elem); } @@ -23978,7 +26620,7 @@ public class Hbase { * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public List getColumns() { + public List getColumns() { return this.columns; } @@ -23987,7 +26629,7 @@ public class Hbase { * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public scannerOpen_args setColumns(List columns) { + public scannerOpen_args setColumns(List columns) { this.columns = columns; return this; } @@ -24013,7 +26655,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -24021,7 +26663,7 @@ public class Hbase { if (value == null) { unsetStartRow(); } else { - setStartRow((byte[])value); + setStartRow((ByteBuffer)value); } break; @@ -24029,17 +26671,13 @@ public class Hbase { if (value == null) { unsetColumns(); } else { - setColumns((List)value); + setColumns((List)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -24055,12 +26693,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -24072,10 +26710,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -24094,7 +26728,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -24103,7 +26737,7 @@ public class Hbase { if (this_present_startRow || that_present_startRow) { if (!(this_present_startRow && that_present_startRow)) return false; - if (!java.util.Arrays.equals(this.startRow, that.startRow)) + if (!this.startRow.equals(that.startRow)) return false; } @@ -24132,33 +26766,43 @@ public class Hbase { int lastComparison = 0; scannerOpen_args typedOther = (scannerOpen_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(isSetStartRow()); + lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(startRow, typedOther.startRow); - if (lastComparison != 0) { - return lastComparison; + if (isSetStartRow()) { + lastComparison = TBaseHelper.compareTo(this.startRow, typedOther.startRow); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumns()).compareTo(isSetColumns()); + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(columns, typedOther.columns); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumns()) { + lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -24168,45 +26812,42 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case START_ROW: - if (field.type == TType.STRING) { - this.startRow = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMNS: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // START_ROW + if (field.type == TType.STRING) { + this.startRow = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMNS + if (field.type == TType.LIST) { + { + TList _list82 = iprot.readListBegin(); + this.columns = new ArrayList(_list82.size); + for (int _i83 = 0; _i83 < _list82.size; ++_i83) { - TList _list82 = iprot.readListBegin(); - this.columns = new ArrayList(_list82.size); - for (int _i83 = 0; _i83 < _list82.size; ++_i83) - { - byte[] _elem84; - _elem84 = iprot.readBinary(); - this.columns.add(_elem84); - } - iprot.readListEnd(); + ByteBuffer _elem84; + _elem84 = iprot.readBinary(); + this.columns.add(_elem84); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -24232,7 +26873,7 @@ public class Hbase { oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter85 : this.columns) + for (ByteBuffer _iter85 : this.columns) { oprot.writeBinary(_iter85); } @@ -24282,7 +26923,7 @@ public class Hbase { } - public static class scannerOpen_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerOpen_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerOpen_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0); @@ -24296,12 +26937,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -24310,7 +26949,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -24351,14 +26997,14 @@ public class Hbase { private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32 , "ScannerID"))); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpen_result.class, metaDataMap); } @@ -24391,9 +27037,11 @@ public class Hbase { return new scannerOpen_result(this); } - @Deprecated - public scannerOpen_result clone() { - return new scannerOpen_result(this); + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; } public int getSuccess() { @@ -24464,10 +27112,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -24480,12 +27124,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -24495,10 +27139,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -24546,25 +27186,33 @@ public class Hbase { int lastComparison = 0; scannerOpen_result typedOther = (scannerOpen_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -24574,30 +27222,27 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.I32) { - this.success = iprot.readI32(); - setSuccessIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.I32) { + this.success = iprot.readI32(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -24647,7 +27292,7 @@ public class Hbase { } - public static class scannerOpenWithStop_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerOpenWithStop_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerOpenWithStop_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -24658,23 +27303,23 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * Starting row in table to scan. * Send "" (empty string) to start at the first row. */ - public byte[] startRow; + public ByteBuffer startRow; /** * row to stop scanning on. This row is *not* included in the * scanner's results */ - public byte[] stopRow; + public ByteBuffer stopRow; /** * columns to scan. If column name is a column family, all * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public List columns; + public List columns; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -24699,12 +27344,10 @@ public class Hbase { */ COLUMNS((short)4, "columns"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -24713,7 +27356,18 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // START_ROW + return START_ROW; + case 3: // STOP_ROW + return STOP_ROW; + case 4: // COLUMNS + return COLUMNS; + default: + return null; + } } /** @@ -24752,19 +27406,19 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.START_ROW, new FieldMetaData("startRow", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.STOP_ROW, new FieldMetaData("stopRow", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.START_ROW, new FieldMetaData("startRow", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.STOP_ROW, new FieldMetaData("stopRow", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenWithStop_args.class, metaDataMap); } @@ -24772,10 +27426,10 @@ public class Hbase { } public scannerOpenWithStop_args( - byte[] tableName, - byte[] startRow, - byte[] stopRow, - List columns) + ByteBuffer tableName, + ByteBuffer startRow, + ByteBuffer stopRow, + List columns) { this(); this.tableName = tableName; @@ -24798,8 +27452,8 @@ public class Hbase { this.stopRow = other.stopRow; } if (other.isSetColumns()) { - List __this__columns = new ArrayList(); - for (byte[] other_element : other.columns) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { __this__columns.add(other_element); } this.columns = __this__columns; @@ -24810,22 +27464,35 @@ public class Hbase { return new scannerOpenWithStop_args(this); } - @Deprecated - public scannerOpenWithStop_args clone() { - return new scannerOpenWithStop_args(this); + @Override + public void clear() { + this.tableName = null; + this.startRow = null; + this.stopRow = null; + this.columns = null; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public scannerOpenWithStop_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public scannerOpenWithStop_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -24850,7 +27517,12 @@ public class Hbase { * Send "" (empty string) to start at the first row. */ public byte[] getStartRow() { - return this.startRow; + setStartRow(TBaseHelper.rightSize(startRow)); + return startRow.array(); + } + + public ByteBuffer BufferForStartRow() { + return startRow; } /** @@ -24858,6 +27530,11 @@ public class Hbase { * Send "" (empty string) to start at the first row. */ public scannerOpenWithStop_args setStartRow(byte[] startRow) { + setStartRow(ByteBuffer.wrap(startRow)); + return this; + } + + public scannerOpenWithStop_args setStartRow(ByteBuffer startRow) { this.startRow = startRow; return this; } @@ -24882,7 +27559,12 @@ public class Hbase { * scanner's results */ public byte[] getStopRow() { - return this.stopRow; + setStopRow(TBaseHelper.rightSize(stopRow)); + return stopRow.array(); + } + + public ByteBuffer BufferForStopRow() { + return stopRow; } /** @@ -24890,6 +27572,11 @@ public class Hbase { * scanner's results */ public scannerOpenWithStop_args setStopRow(byte[] stopRow) { + setStopRow(ByteBuffer.wrap(stopRow)); + return this; + } + + public scannerOpenWithStop_args setStopRow(ByteBuffer stopRow) { this.stopRow = stopRow; return this; } @@ -24913,13 +27600,13 @@ public class Hbase { return (this.columns == null) ? 0 : this.columns.size(); } - public java.util.Iterator getColumnsIterator() { + public java.util.Iterator getColumnsIterator() { return (this.columns == null) ? null : this.columns.iterator(); } - public void addToColumns(byte[] elem) { + public void addToColumns(ByteBuffer elem) { if (this.columns == null) { - this.columns = new ArrayList(); + this.columns = new ArrayList(); } this.columns.add(elem); } @@ -24929,7 +27616,7 @@ public class Hbase { * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public List getColumns() { + public List getColumns() { return this.columns; } @@ -24938,7 +27625,7 @@ public class Hbase { * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public scannerOpenWithStop_args setColumns(List columns) { + public scannerOpenWithStop_args setColumns(List columns) { this.columns = columns; return this; } @@ -24964,7 +27651,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -24972,7 +27659,7 @@ public class Hbase { if (value == null) { unsetStartRow(); } else { - setStartRow((byte[])value); + setStartRow((ByteBuffer)value); } break; @@ -24980,7 +27667,7 @@ public class Hbase { if (value == null) { unsetStopRow(); } else { - setStopRow((byte[])value); + setStopRow((ByteBuffer)value); } break; @@ -24988,17 +27675,13 @@ public class Hbase { if (value == null) { unsetColumns(); } else { - setColumns((List)value); + setColumns((List)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -25017,12 +27700,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -25036,10 +27719,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -25058,7 +27737,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -25067,7 +27746,7 @@ public class Hbase { if (this_present_startRow || that_present_startRow) { if (!(this_present_startRow && that_present_startRow)) return false; - if (!java.util.Arrays.equals(this.startRow, that.startRow)) + if (!this.startRow.equals(that.startRow)) return false; } @@ -25076,7 +27755,7 @@ public class Hbase { if (this_present_stopRow || that_present_stopRow) { if (!(this_present_stopRow && that_present_stopRow)) return false; - if (!java.util.Arrays.equals(this.stopRow, that.stopRow)) + if (!this.stopRow.equals(that.stopRow)) return false; } @@ -25105,41 +27784,53 @@ public class Hbase { int lastComparison = 0; scannerOpenWithStop_args typedOther = (scannerOpenWithStop_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(isSetStartRow()); + lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(startRow, typedOther.startRow); - if (lastComparison != 0) { - return lastComparison; + if (isSetStartRow()) { + lastComparison = TBaseHelper.compareTo(this.startRow, typedOther.startRow); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(isSetStopRow()); + lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(typedOther.isSetStopRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(stopRow, typedOther.stopRow); - if (lastComparison != 0) { - return lastComparison; + if (isSetStopRow()) { + lastComparison = TBaseHelper.compareTo(this.stopRow, typedOther.stopRow); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumns()).compareTo(isSetColumns()); + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(columns, typedOther.columns); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumns()) { + lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -25149,52 +27840,49 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case START_ROW: - if (field.type == TType.STRING) { - this.startRow = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case STOP_ROW: - if (field.type == TType.STRING) { - this.stopRow = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMNS: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // START_ROW + if (field.type == TType.STRING) { + this.startRow = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // STOP_ROW + if (field.type == TType.STRING) { + this.stopRow = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // COLUMNS + if (field.type == TType.LIST) { + { + TList _list86 = iprot.readListBegin(); + this.columns = new ArrayList(_list86.size); + for (int _i87 = 0; _i87 < _list86.size; ++_i87) { - TList _list86 = iprot.readListBegin(); - this.columns = new ArrayList(_list86.size); - for (int _i87 = 0; _i87 < _list86.size; ++_i87) - { - byte[] _elem88; - _elem88 = iprot.readBinary(); - this.columns.add(_elem88); - } - iprot.readListEnd(); + ByteBuffer _elem88; + _elem88 = iprot.readBinary(); + this.columns.add(_elem88); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -25225,7 +27913,7 @@ public class Hbase { oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter89 : this.columns) + for (ByteBuffer _iter89 : this.columns) { oprot.writeBinary(_iter89); } @@ -25283,7 +27971,7 @@ public class Hbase { } - public static class scannerOpenWithStop_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerOpenWithStop_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerOpenWithStop_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0); @@ -25297,12 +27985,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -25311,7 +27997,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -25352,14 +28045,14 @@ public class Hbase { private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32 , "ScannerID"))); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenWithStop_result.class, metaDataMap); } @@ -25392,9 +28085,11 @@ public class Hbase { return new scannerOpenWithStop_result(this); } - @Deprecated - public scannerOpenWithStop_result clone() { - return new scannerOpenWithStop_result(this); + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; } public int getSuccess() { @@ -25465,10 +28160,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -25481,12 +28172,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -25496,10 +28187,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -25547,25 +28234,33 @@ public class Hbase { int lastComparison = 0; scannerOpenWithStop_result typedOther = (scannerOpenWithStop_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -25575,30 +28270,27 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.I32) { - this.success = iprot.readI32(); - setSuccessIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.I32) { + this.success = iprot.readI32(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -25648,7 +28340,7 @@ public class Hbase { } - public static class scannerOpenWithPrefix_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerOpenWithPrefix_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerOpenWithPrefix_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -25658,15 +28350,15 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * the prefix (and thus start row) of the keys you want */ - public byte[] startAndPrefix; + public ByteBuffer startAndPrefix; /** * the columns you want returned */ - public List columns; + public List columns; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -25683,12 +28375,10 @@ public class Hbase { */ COLUMNS((short)3, "columns"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -25697,7 +28387,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // START_AND_PREFIX + return START_AND_PREFIX; + case 3: // COLUMNS + return COLUMNS; + default: + return null; + } } /** @@ -25736,17 +28435,17 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.START_AND_PREFIX, new FieldMetaData("startAndPrefix", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.START_AND_PREFIX, new FieldMetaData("startAndPrefix", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenWithPrefix_args.class, metaDataMap); } @@ -25754,9 +28453,9 @@ public class Hbase { } public scannerOpenWithPrefix_args( - byte[] tableName, - byte[] startAndPrefix, - List columns) + ByteBuffer tableName, + ByteBuffer startAndPrefix, + List columns) { this(); this.tableName = tableName; @@ -25775,8 +28474,8 @@ public class Hbase { this.startAndPrefix = other.startAndPrefix; } if (other.isSetColumns()) { - List __this__columns = new ArrayList(); - for (byte[] other_element : other.columns) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { __this__columns.add(other_element); } this.columns = __this__columns; @@ -25787,22 +28486,34 @@ public class Hbase { return new scannerOpenWithPrefix_args(this); } - @Deprecated - public scannerOpenWithPrefix_args clone() { - return new scannerOpenWithPrefix_args(this); + @Override + public void clear() { + this.tableName = null; + this.startAndPrefix = null; + this.columns = null; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public scannerOpenWithPrefix_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public scannerOpenWithPrefix_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -25826,13 +28537,23 @@ public class Hbase { * the prefix (and thus start row) of the keys you want */ public byte[] getStartAndPrefix() { - return this.startAndPrefix; + setStartAndPrefix(TBaseHelper.rightSize(startAndPrefix)); + return startAndPrefix.array(); + } + + public ByteBuffer BufferForStartAndPrefix() { + return startAndPrefix; } /** * the prefix (and thus start row) of the keys you want */ public scannerOpenWithPrefix_args setStartAndPrefix(byte[] startAndPrefix) { + setStartAndPrefix(ByteBuffer.wrap(startAndPrefix)); + return this; + } + + public scannerOpenWithPrefix_args setStartAndPrefix(ByteBuffer startAndPrefix) { this.startAndPrefix = startAndPrefix; return this; } @@ -25856,13 +28577,13 @@ public class Hbase { return (this.columns == null) ? 0 : this.columns.size(); } - public java.util.Iterator getColumnsIterator() { + public java.util.Iterator getColumnsIterator() { return (this.columns == null) ? null : this.columns.iterator(); } - public void addToColumns(byte[] elem) { + public void addToColumns(ByteBuffer elem) { if (this.columns == null) { - this.columns = new ArrayList(); + this.columns = new ArrayList(); } this.columns.add(elem); } @@ -25870,14 +28591,14 @@ public class Hbase { /** * the columns you want returned */ - public List getColumns() { + public List getColumns() { return this.columns; } /** * the columns you want returned */ - public scannerOpenWithPrefix_args setColumns(List columns) { + public scannerOpenWithPrefix_args setColumns(List columns) { this.columns = columns; return this; } @@ -25903,7 +28624,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -25911,7 +28632,7 @@ public class Hbase { if (value == null) { unsetStartAndPrefix(); } else { - setStartAndPrefix((byte[])value); + setStartAndPrefix((ByteBuffer)value); } break; @@ -25919,17 +28640,13 @@ public class Hbase { if (value == null) { unsetColumns(); } else { - setColumns((List)value); + setColumns((List)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -25945,12 +28662,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -25962,10 +28679,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -25984,7 +28697,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -25993,7 +28706,7 @@ public class Hbase { if (this_present_startAndPrefix || that_present_startAndPrefix) { if (!(this_present_startAndPrefix && that_present_startAndPrefix)) return false; - if (!java.util.Arrays.equals(this.startAndPrefix, that.startAndPrefix)) + if (!this.startAndPrefix.equals(that.startAndPrefix)) return false; } @@ -26022,33 +28735,43 @@ public class Hbase { int lastComparison = 0; scannerOpenWithPrefix_args typedOther = (scannerOpenWithPrefix_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetStartAndPrefix()).compareTo(isSetStartAndPrefix()); + lastComparison = Boolean.valueOf(isSetStartAndPrefix()).compareTo(typedOther.isSetStartAndPrefix()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(startAndPrefix, typedOther.startAndPrefix); - if (lastComparison != 0) { - return lastComparison; + if (isSetStartAndPrefix()) { + lastComparison = TBaseHelper.compareTo(this.startAndPrefix, typedOther.startAndPrefix); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumns()).compareTo(isSetColumns()); + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(columns, typedOther.columns); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumns()) { + lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -26058,45 +28781,42 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case START_AND_PREFIX: - if (field.type == TType.STRING) { - this.startAndPrefix = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMNS: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // START_AND_PREFIX + if (field.type == TType.STRING) { + this.startAndPrefix = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMNS + if (field.type == TType.LIST) { + { + TList _list90 = iprot.readListBegin(); + this.columns = new ArrayList(_list90.size); + for (int _i91 = 0; _i91 < _list90.size; ++_i91) { - TList _list90 = iprot.readListBegin(); - this.columns = new ArrayList(_list90.size); - for (int _i91 = 0; _i91 < _list90.size; ++_i91) - { - byte[] _elem92; - _elem92 = iprot.readBinary(); - this.columns.add(_elem92); - } - iprot.readListEnd(); + ByteBuffer _elem92; + _elem92 = iprot.readBinary(); + this.columns.add(_elem92); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -26122,7 +28842,7 @@ public class Hbase { oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter93 : this.columns) + for (ByteBuffer _iter93 : this.columns) { oprot.writeBinary(_iter93); } @@ -26172,7 +28892,7 @@ public class Hbase { } - public static class scannerOpenWithPrefix_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerOpenWithPrefix_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerOpenWithPrefix_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0); @@ -26186,12 +28906,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -26200,7 +28918,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -26241,14 +28966,14 @@ public class Hbase { private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32 , "ScannerID"))); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenWithPrefix_result.class, metaDataMap); } @@ -26281,9 +29006,11 @@ public class Hbase { return new scannerOpenWithPrefix_result(this); } - @Deprecated - public scannerOpenWithPrefix_result clone() { - return new scannerOpenWithPrefix_result(this); + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; } public int getSuccess() { @@ -26354,10 +29081,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -26370,12 +29093,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -26385,10 +29108,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -26436,25 +29155,33 @@ public class Hbase { int lastComparison = 0; scannerOpenWithPrefix_result typedOther = (scannerOpenWithPrefix_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -26464,30 +29191,27 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.I32) { - this.success = iprot.readI32(); - setSuccessIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.I32) { + this.success = iprot.readI32(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -26537,7 +29261,7 @@ public class Hbase { } - public static class scannerOpenTs_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerOpenTs_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerOpenTs_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -26548,18 +29272,18 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * Starting row in table to scan. * Send "" (empty string) to start at the first row. */ - public byte[] startRow; + public ByteBuffer startRow; /** * columns to scan. If column name is a column family, all * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public List columns; + public List columns; /** * timestamp */ @@ -26587,12 +29311,10 @@ public class Hbase { */ TIMESTAMP((short)4, "timestamp"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -26601,7 +29323,18 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // START_ROW + return START_ROW; + case 3: // COLUMNS + return COLUMNS; + case 4: // TIMESTAMP + return TIMESTAMP; + default: + return null; + } } /** @@ -26642,19 +29375,19 @@ public class Hbase { private static final int __TIMESTAMP_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.START_ROW, new FieldMetaData("startRow", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.START_ROW, new FieldMetaData("startRow", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text")))); + tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenTs_args.class, metaDataMap); } @@ -26662,9 +29395,9 @@ public class Hbase { } public scannerOpenTs_args( - byte[] tableName, - byte[] startRow, - List columns, + ByteBuffer tableName, + ByteBuffer startRow, + List columns, long timestamp) { this(); @@ -26688,8 +29421,8 @@ public class Hbase { this.startRow = other.startRow; } if (other.isSetColumns()) { - List __this__columns = new ArrayList(); - for (byte[] other_element : other.columns) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { __this__columns.add(other_element); } this.columns = __this__columns; @@ -26701,22 +29434,36 @@ public class Hbase { return new scannerOpenTs_args(this); } - @Deprecated - public scannerOpenTs_args clone() { - return new scannerOpenTs_args(this); + @Override + public void clear() { + this.tableName = null; + this.startRow = null; + this.columns = null; + setTimestampIsSet(false); + this.timestamp = 0; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public scannerOpenTs_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public scannerOpenTs_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -26741,7 +29488,12 @@ public class Hbase { * Send "" (empty string) to start at the first row. */ public byte[] getStartRow() { - return this.startRow; + setStartRow(TBaseHelper.rightSize(startRow)); + return startRow.array(); + } + + public ByteBuffer BufferForStartRow() { + return startRow; } /** @@ -26749,6 +29501,11 @@ public class Hbase { * Send "" (empty string) to start at the first row. */ public scannerOpenTs_args setStartRow(byte[] startRow) { + setStartRow(ByteBuffer.wrap(startRow)); + return this; + } + + public scannerOpenTs_args setStartRow(ByteBuffer startRow) { this.startRow = startRow; return this; } @@ -26772,13 +29529,13 @@ public class Hbase { return (this.columns == null) ? 0 : this.columns.size(); } - public java.util.Iterator getColumnsIterator() { + public java.util.Iterator getColumnsIterator() { return (this.columns == null) ? null : this.columns.iterator(); } - public void addToColumns(byte[] elem) { + public void addToColumns(ByteBuffer elem) { if (this.columns == null) { - this.columns = new ArrayList(); + this.columns = new ArrayList(); } this.columns.add(elem); } @@ -26788,7 +29545,7 @@ public class Hbase { * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public List getColumns() { + public List getColumns() { return this.columns; } @@ -26797,7 +29554,7 @@ public class Hbase { * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public scannerOpenTs_args setColumns(List columns) { + public scannerOpenTs_args setColumns(List columns) { this.columns = columns; return this; } @@ -26852,7 +29609,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -26860,7 +29617,7 @@ public class Hbase { if (value == null) { unsetStartRow(); } else { - setStartRow((byte[])value); + setStartRow((ByteBuffer)value); } break; @@ -26868,7 +29625,7 @@ public class Hbase { if (value == null) { unsetColumns(); } else { - setColumns((List)value); + setColumns((List)value); } break; @@ -26883,10 +29640,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -26905,12 +29658,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -26924,10 +29677,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -26946,7 +29695,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -26955,7 +29704,7 @@ public class Hbase { if (this_present_startRow || that_present_startRow) { if (!(this_present_startRow && that_present_startRow)) return false; - if (!java.util.Arrays.equals(this.startRow, that.startRow)) + if (!this.startRow.equals(that.startRow)) return false; } @@ -26993,41 +29742,53 @@ public class Hbase { int lastComparison = 0; scannerOpenTs_args typedOther = (scannerOpenTs_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(isSetStartRow()); + lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(startRow, typedOther.startRow); - if (lastComparison != 0) { - return lastComparison; + if (isSetStartRow()) { + lastComparison = TBaseHelper.compareTo(this.startRow, typedOther.startRow); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumns()).compareTo(isSetColumns()); + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(columns, typedOther.columns); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumns()) { + lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp()); + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp); - if (lastComparison != 0) { - return lastComparison; + if (isSetTimestamp()) { + lastComparison = TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -27037,53 +29798,50 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case START_ROW: - if (field.type == TType.STRING) { - this.startRow = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMNS: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // START_ROW + if (field.type == TType.STRING) { + this.startRow = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMNS + if (field.type == TType.LIST) { + { + TList _list94 = iprot.readListBegin(); + this.columns = new ArrayList(_list94.size); + for (int _i95 = 0; _i95 < _list94.size; ++_i95) { - TList _list94 = iprot.readListBegin(); - this.columns = new ArrayList(_list94.size); - for (int _i95 = 0; _i95 < _list94.size; ++_i95) - { - byte[] _elem96; - _elem96 = iprot.readBinary(); - this.columns.add(_elem96); - } - iprot.readListEnd(); + ByteBuffer _elem96; + _elem96 = iprot.readBinary(); + this.columns.add(_elem96); } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TIMESTAMP: - if (field.type == TType.I64) { - this.timestamp = iprot.readI64(); - setTimestampIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // TIMESTAMP + if (field.type == TType.I64) { + this.timestamp = iprot.readI64(); + setTimestampIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -27109,7 +29867,7 @@ public class Hbase { oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter97 : this.columns) + for (ByteBuffer _iter97 : this.columns) { oprot.writeBinary(_iter97); } @@ -27166,7 +29924,7 @@ public class Hbase { } - public static class scannerOpenTs_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerOpenTs_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerOpenTs_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0); @@ -27180,12 +29938,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -27194,7 +29950,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -27235,14 +29998,14 @@ public class Hbase { private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32 , "ScannerID"))); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenTs_result.class, metaDataMap); } @@ -27275,9 +30038,11 @@ public class Hbase { return new scannerOpenTs_result(this); } - @Deprecated - public scannerOpenTs_result clone() { - return new scannerOpenTs_result(this); + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; } public int getSuccess() { @@ -27348,10 +30113,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -27364,12 +30125,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -27379,10 +30140,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -27430,25 +30187,33 @@ public class Hbase { int lastComparison = 0; scannerOpenTs_result typedOther = (scannerOpenTs_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -27458,30 +30223,27 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.I32) { - this.success = iprot.readI32(); - setSuccessIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.I32) { + this.success = iprot.readI32(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -27531,7 +30293,7 @@ public class Hbase { } - public static class scannerOpenWithStopTs_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerOpenWithStopTs_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerOpenWithStopTs_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -27543,23 +30305,23 @@ public class Hbase { /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * Starting row in table to scan. * Send "" (empty string) to start at the first row. */ - public byte[] startRow; + public ByteBuffer startRow; /** * row to stop scanning on. This row is *not* included in the * scanner's results */ - public byte[] stopRow; + public ByteBuffer stopRow; /** * columns to scan. If column name is a column family, all * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public List columns; + public List columns; /** * timestamp */ @@ -27592,12 +30354,10 @@ public class Hbase { */ TIMESTAMP((short)5, "timestamp"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -27606,7 +30366,20 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // START_ROW + return START_ROW; + case 3: // STOP_ROW + return STOP_ROW; + case 4: // COLUMNS + return COLUMNS; + case 5: // TIMESTAMP + return TIMESTAMP; + default: + return null; + } } /** @@ -27647,21 +30420,21 @@ public class Hbase { private static final int __TIMESTAMP_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.START_ROW, new FieldMetaData("startRow", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.STOP_ROW, new FieldMetaData("stopRow", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.START_ROW, new FieldMetaData("startRow", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.STOP_ROW, new FieldMetaData("stopRow", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text")))); + tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenWithStopTs_args.class, metaDataMap); } @@ -27669,10 +30442,10 @@ public class Hbase { } public scannerOpenWithStopTs_args( - byte[] tableName, - byte[] startRow, - byte[] stopRow, - List columns, + ByteBuffer tableName, + ByteBuffer startRow, + ByteBuffer stopRow, + List columns, long timestamp) { this(); @@ -27700,8 +30473,8 @@ public class Hbase { this.stopRow = other.stopRow; } if (other.isSetColumns()) { - List __this__columns = new ArrayList(); - for (byte[] other_element : other.columns) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { __this__columns.add(other_element); } this.columns = __this__columns; @@ -27713,22 +30486,37 @@ public class Hbase { return new scannerOpenWithStopTs_args(this); } - @Deprecated - public scannerOpenWithStopTs_args clone() { - return new scannerOpenWithStopTs_args(this); + @Override + public void clear() { + this.tableName = null; + this.startRow = null; + this.stopRow = null; + this.columns = null; + setTimestampIsSet(false); + this.timestamp = 0; } /** * name of table */ public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } /** * name of table */ public scannerOpenWithStopTs_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public scannerOpenWithStopTs_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -27753,7 +30541,12 @@ public class Hbase { * Send "" (empty string) to start at the first row. */ public byte[] getStartRow() { - return this.startRow; + setStartRow(TBaseHelper.rightSize(startRow)); + return startRow.array(); + } + + public ByteBuffer BufferForStartRow() { + return startRow; } /** @@ -27761,6 +30554,11 @@ public class Hbase { * Send "" (empty string) to start at the first row. */ public scannerOpenWithStopTs_args setStartRow(byte[] startRow) { + setStartRow(ByteBuffer.wrap(startRow)); + return this; + } + + public scannerOpenWithStopTs_args setStartRow(ByteBuffer startRow) { this.startRow = startRow; return this; } @@ -27785,7 +30583,12 @@ public class Hbase { * scanner's results */ public byte[] getStopRow() { - return this.stopRow; + setStopRow(TBaseHelper.rightSize(stopRow)); + return stopRow.array(); + } + + public ByteBuffer BufferForStopRow() { + return stopRow; } /** @@ -27793,6 +30596,11 @@ public class Hbase { * scanner's results */ public scannerOpenWithStopTs_args setStopRow(byte[] stopRow) { + setStopRow(ByteBuffer.wrap(stopRow)); + return this; + } + + public scannerOpenWithStopTs_args setStopRow(ByteBuffer stopRow) { this.stopRow = stopRow; return this; } @@ -27816,13 +30624,13 @@ public class Hbase { return (this.columns == null) ? 0 : this.columns.size(); } - public java.util.Iterator getColumnsIterator() { + public java.util.Iterator getColumnsIterator() { return (this.columns == null) ? null : this.columns.iterator(); } - public void addToColumns(byte[] elem) { + public void addToColumns(ByteBuffer elem) { if (this.columns == null) { - this.columns = new ArrayList(); + this.columns = new ArrayList(); } this.columns.add(elem); } @@ -27832,7 +30640,7 @@ public class Hbase { * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public List getColumns() { + public List getColumns() { return this.columns; } @@ -27841,7 +30649,7 @@ public class Hbase { * columns of the specified column family are returned. It's also possible * to pass a regex in the column qualifier. */ - public scannerOpenWithStopTs_args setColumns(List columns) { + public scannerOpenWithStopTs_args setColumns(List columns) { this.columns = columns; return this; } @@ -27896,7 +30704,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -27904,7 +30712,7 @@ public class Hbase { if (value == null) { unsetStartRow(); } else { - setStartRow((byte[])value); + setStartRow((ByteBuffer)value); } break; @@ -27912,7 +30720,7 @@ public class Hbase { if (value == null) { unsetStopRow(); } else { - setStopRow((byte[])value); + setStopRow((ByteBuffer)value); } break; @@ -27920,7 +30728,7 @@ public class Hbase { if (value == null) { unsetColumns(); } else { - setColumns((List)value); + setColumns((List)value); } break; @@ -27935,10 +30743,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -27960,12 +30764,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -27981,10 +30785,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -28003,7 +30803,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -28012,7 +30812,7 @@ public class Hbase { if (this_present_startRow || that_present_startRow) { if (!(this_present_startRow && that_present_startRow)) return false; - if (!java.util.Arrays.equals(this.startRow, that.startRow)) + if (!this.startRow.equals(that.startRow)) return false; } @@ -28021,7 +30821,7 @@ public class Hbase { if (this_present_stopRow || that_present_stopRow) { if (!(this_present_stopRow && that_present_stopRow)) return false; - if (!java.util.Arrays.equals(this.stopRow, that.stopRow)) + if (!this.stopRow.equals(that.stopRow)) return false; } @@ -28059,49 +30859,63 @@ public class Hbase { int lastComparison = 0; scannerOpenWithStopTs_args typedOther = (scannerOpenWithStopTs_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(isSetStartRow()); + lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(startRow, typedOther.startRow); - if (lastComparison != 0) { - return lastComparison; + if (isSetStartRow()) { + lastComparison = TBaseHelper.compareTo(this.startRow, typedOther.startRow); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(isSetStopRow()); + lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(typedOther.isSetStopRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(stopRow, typedOther.stopRow); - if (lastComparison != 0) { - return lastComparison; + if (isSetStopRow()) { + lastComparison = TBaseHelper.compareTo(this.stopRow, typedOther.stopRow); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumns()).compareTo(isSetColumns()); + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(columns, typedOther.columns); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumns()) { + lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp()); + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp); - if (lastComparison != 0) { - return lastComparison; + if (isSetTimestamp()) { + lastComparison = TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -28111,60 +30925,57 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case START_ROW: - if (field.type == TType.STRING) { - this.startRow = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case STOP_ROW: - if (field.type == TType.STRING) { - this.stopRow = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMNS: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // START_ROW + if (field.type == TType.STRING) { + this.startRow = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // STOP_ROW + if (field.type == TType.STRING) { + this.stopRow = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // COLUMNS + if (field.type == TType.LIST) { + { + TList _list98 = iprot.readListBegin(); + this.columns = new ArrayList(_list98.size); + for (int _i99 = 0; _i99 < _list98.size; ++_i99) { - TList _list98 = iprot.readListBegin(); - this.columns = new ArrayList(_list98.size); - for (int _i99 = 0; _i99 < _list98.size; ++_i99) - { - byte[] _elem100; - _elem100 = iprot.readBinary(); - this.columns.add(_elem100); - } - iprot.readListEnd(); + ByteBuffer _elem100; + _elem100 = iprot.readBinary(); + this.columns.add(_elem100); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - case TIMESTAMP: - if (field.type == TType.I64) { - this.timestamp = iprot.readI64(); - setTimestampIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // TIMESTAMP + if (field.type == TType.I64) { + this.timestamp = iprot.readI64(); + setTimestampIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -28195,7 +31006,7 @@ public class Hbase { oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter101 : this.columns) + for (ByteBuffer _iter101 : this.columns) { oprot.writeBinary(_iter101); } @@ -28260,7 +31071,7 @@ public class Hbase { } - public static class scannerOpenWithStopTs_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerOpenWithStopTs_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerOpenWithStopTs_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0); @@ -28274,12 +31085,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -28288,7 +31097,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -28329,14 +31145,14 @@ public class Hbase { private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32 , "ScannerID"))); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenWithStopTs_result.class, metaDataMap); } @@ -28369,9 +31185,11 @@ public class Hbase { return new scannerOpenWithStopTs_result(this); } - @Deprecated - public scannerOpenWithStopTs_result clone() { - return new scannerOpenWithStopTs_result(this); + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; } public int getSuccess() { @@ -28442,10 +31260,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -28458,12 +31272,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -28473,10 +31287,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -28524,25 +31334,33 @@ public class Hbase { int lastComparison = 0; scannerOpenWithStopTs_result typedOther = (scannerOpenWithStopTs_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -28552,30 +31370,27 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.I32) { - this.success = iprot.readI32(); - setSuccessIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.I32) { + this.success = iprot.readI32(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -28625,7 +31440,7 @@ public class Hbase { } - public static class scannerGet_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerGet_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerGet_args"); private static final TField ID_FIELD_DESC = new TField("id", TType.I32, (short)1); @@ -28642,12 +31457,10 @@ public class Hbase { */ ID((short)1, "id"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -28656,7 +31469,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // ID + return ID; + default: + return null; + } } /** @@ -28697,12 +31515,12 @@ public class Hbase { private static final int __ID_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32 , "ScannerID"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerGet_args.class, metaDataMap); } @@ -28730,9 +31548,10 @@ public class Hbase { return new scannerGet_args(this); } - @Deprecated - public scannerGet_args clone() { - return new scannerGet_args(this); + @Override + public void clear() { + setIdIsSet(false); + this.id = 0; } /** @@ -28777,10 +31596,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ID: @@ -28790,12 +31605,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case ID: return isSetId(); @@ -28803,10 +31618,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -28845,17 +31656,23 @@ public class Hbase { int lastComparison = 0; scannerGet_args typedOther = (scannerGet_args)other; - lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId()); + lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(id, typedOther.id); - if (lastComparison != 0) { - return lastComparison; + if (isSetId()) { + lastComparison = TBaseHelper.compareTo(this.id, typedOther.id); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -28865,22 +31682,19 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case ID: - if (field.type == TType.I32) { - this.id = iprot.readI32(); - setIdIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // ID + if (field.type == TType.I32) { + this.id = iprot.readI32(); + setIdIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -28917,7 +31731,7 @@ public class Hbase { } - public static class scannerGet_result implements TBase, java.io.Serializable, Cloneable { + public static class scannerGet_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerGet_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -28934,12 +31748,10 @@ public class Hbase { IO((short)1, "io"), IA((short)2, "ia"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -28948,7 +31760,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } } /** @@ -28987,17 +31808,17 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, TRowResult.class)))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerGet_result.class, metaDataMap); } @@ -29038,9 +31859,11 @@ public class Hbase { return new scannerGet_result(this); } - @Deprecated - public scannerGet_result clone() { - return new scannerGet_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; + this.ia = null; } public int getSuccessSize() { @@ -29159,10 +31982,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -29178,12 +31997,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -29195,10 +32014,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -29247,6 +32062,51 @@ public class Hbase { return 0; } + public int compareTo(scannerGet_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerGet_result typedOther = (scannerGet_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIa()) { + lastComparison = TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -29256,48 +32116,45 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.LIST) { + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list102 = iprot.readListBegin(); + this.success = new ArrayList(_list102.size); + for (int _i103 = 0; _i103 < _list102.size; ++_i103) { - TList _list102 = iprot.readListBegin(); - this.success = new ArrayList(_list102.size); - for (int _i103 = 0; _i103 < _list102.size; ++_i103) - { - TRowResult _elem104; - _elem104 = new TRowResult(); - _elem104.read(iprot); - this.success.add(_elem104); - } - iprot.readListEnd(); + TRowResult _elem104; + _elem104 = new TRowResult(); + _elem104.read(iprot); + this.success.add(_elem104); } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - case IA: - if (field.type == TType.STRUCT) { - this.ia = new IllegalArgument(); - this.ia.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IA + if (field.type == TType.STRUCT) { + this.ia = new IllegalArgument(); + this.ia.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -29370,7 +32227,7 @@ public class Hbase { } - public static class scannerGetList_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerGetList_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerGetList_args"); private static final TField ID_FIELD_DESC = new TField("id", TType.I32, (short)1); @@ -29396,12 +32253,10 @@ public class Hbase { */ NB_ROWS((short)2, "nbRows"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -29410,7 +32265,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // ID + return ID; + case 2: // NB_ROWS + return NB_ROWS; + default: + return null; + } } /** @@ -29452,14 +32314,14 @@ public class Hbase { private static final int __NBROWS_ISSET_ID = 1; private BitSet __isset_bit_vector = new BitSet(2); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(_Fields.NB_ROWS, new FieldMetaData("nbRows", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32 , "ScannerID"))); + tmpMap.put(_Fields.NB_ROWS, new FieldMetaData("nbRows", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerGetList_args.class, metaDataMap); } @@ -29491,9 +32353,12 @@ public class Hbase { return new scannerGetList_args(this); } - @Deprecated - public scannerGetList_args clone() { - return new scannerGetList_args(this); + @Override + public void clear() { + setIdIsSet(false); + this.id = 0; + setNbRowsIsSet(false); + this.nbRows = 0; } /** @@ -29575,10 +32440,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ID: @@ -29591,12 +32452,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case ID: return isSetId(); @@ -29606,10 +32467,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -29657,25 +32514,33 @@ public class Hbase { int lastComparison = 0; scannerGetList_args typedOther = (scannerGetList_args)other; - lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId()); + lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(id, typedOther.id); - if (lastComparison != 0) { - return lastComparison; + if (isSetId()) { + lastComparison = TBaseHelper.compareTo(this.id, typedOther.id); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetNbRows()).compareTo(isSetNbRows()); + lastComparison = Boolean.valueOf(isSetNbRows()).compareTo(typedOther.isSetNbRows()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(nbRows, typedOther.nbRows); - if (lastComparison != 0) { - return lastComparison; + if (isSetNbRows()) { + lastComparison = TBaseHelper.compareTo(this.nbRows, typedOther.nbRows); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -29685,30 +32550,27 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case ID: - if (field.type == TType.I32) { - this.id = iprot.readI32(); - setIdIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case NB_ROWS: - if (field.type == TType.I32) { - this.nbRows = iprot.readI32(); - setNbRowsIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // ID + if (field.type == TType.I32) { + this.id = iprot.readI32(); + setIdIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // NB_ROWS + if (field.type == TType.I32) { + this.nbRows = iprot.readI32(); + setNbRowsIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -29752,7 +32614,7 @@ public class Hbase { } - public static class scannerGetList_result implements TBase, java.io.Serializable, Cloneable { + public static class scannerGetList_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerGetList_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -29769,12 +32631,10 @@ public class Hbase { IO((short)1, "io"), IA((short)2, "ia"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -29783,7 +32643,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } } /** @@ -29822,17 +32691,17 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, TRowResult.class)))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerGetList_result.class, metaDataMap); } @@ -29873,9 +32742,11 @@ public class Hbase { return new scannerGetList_result(this); } - @Deprecated - public scannerGetList_result clone() { - return new scannerGetList_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; + this.ia = null; } public int getSuccessSize() { @@ -29994,10 +32865,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -30013,12 +32880,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -30030,10 +32897,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -30082,6 +32945,51 @@ public class Hbase { return 0; } + public int compareTo(scannerGetList_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerGetList_result typedOther = (scannerGetList_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIa()) { + lastComparison = TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -30091,48 +32999,45 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.LIST) { + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list106 = iprot.readListBegin(); + this.success = new ArrayList(_list106.size); + for (int _i107 = 0; _i107 < _list106.size; ++_i107) { - TList _list106 = iprot.readListBegin(); - this.success = new ArrayList(_list106.size); - for (int _i107 = 0; _i107 < _list106.size; ++_i107) - { - TRowResult _elem108; - _elem108 = new TRowResult(); - _elem108.read(iprot); - this.success.add(_elem108); - } - iprot.readListEnd(); + TRowResult _elem108; + _elem108 = new TRowResult(); + _elem108.read(iprot); + this.success.add(_elem108); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IA: - if (field.type == TType.STRUCT) { - this.ia = new IllegalArgument(); - this.ia.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IA + if (field.type == TType.STRUCT) { + this.ia = new IllegalArgument(); + this.ia.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -30205,7 +33110,7 @@ public class Hbase { } - public static class scannerClose_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerClose_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerClose_args"); private static final TField ID_FIELD_DESC = new TField("id", TType.I32, (short)1); @@ -30222,12 +33127,10 @@ public class Hbase { */ ID((short)1, "id"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -30236,7 +33139,12 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // ID + return ID; + default: + return null; + } } /** @@ -30277,12 +33185,12 @@ public class Hbase { private static final int __ID_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32 , "ScannerID"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerClose_args.class, metaDataMap); } @@ -30310,9 +33218,10 @@ public class Hbase { return new scannerClose_args(this); } - @Deprecated - public scannerClose_args clone() { - return new scannerClose_args(this); + @Override + public void clear() { + setIdIsSet(false); + this.id = 0; } /** @@ -30357,10 +33266,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ID: @@ -30370,12 +33275,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case ID: return isSetId(); @@ -30383,10 +33288,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -30425,17 +33326,23 @@ public class Hbase { int lastComparison = 0; scannerClose_args typedOther = (scannerClose_args)other; - lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId()); + lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(id, typedOther.id); - if (lastComparison != 0) { - return lastComparison; + if (isSetId()) { + lastComparison = TBaseHelper.compareTo(this.id, typedOther.id); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -30445,22 +33352,19 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case ID: - if (field.type == TType.I32) { - this.id = iprot.readI32(); - setIdIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // ID + if (field.type == TType.I32) { + this.id = iprot.readI32(); + setIdIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -30497,7 +33401,7 @@ public class Hbase { } - public static class scannerClose_result implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class scannerClose_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("scannerClose_result"); private static final TField IO_FIELD_DESC = new TField("io", TType.STRUCT, (short)1); @@ -30511,12 +33415,10 @@ public class Hbase { IO((short)1, "io"), IA((short)2, "ia"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -30525,7 +33427,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } } /** @@ -30564,14 +33473,14 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IA, new FieldMetaData("ia", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerClose_result.class, metaDataMap); } @@ -30603,9 +33512,10 @@ public class Hbase { return new scannerClose_result(this); } - @Deprecated - public scannerClose_result clone() { - return new scannerClose_result(this); + @Override + public void clear() { + this.io = null; + this.ia = null; } public IOError getIo() { @@ -30677,10 +33587,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -30693,12 +33599,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IO: return isSetIo(); @@ -30708,10 +33614,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -30759,25 +33661,33 @@ public class Hbase { int lastComparison = 0; scannerClose_result typedOther = (scannerClose_result)other; - lastComparison = Boolean.valueOf(isSetIo()).compareTo(isSetIo()); + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(io, typedOther.io); - if (lastComparison != 0) { - return lastComparison; + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetIa()).compareTo(isSetIa()); + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(ia, typedOther.ia); - if (lastComparison != 0) { - return lastComparison; + if (isSetIa()) { + lastComparison = TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -30787,30 +33697,27 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IA: - if (field.type == TType.STRUCT) { - this.ia = new IllegalArgument(); - this.ia.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + switch (field.id) { + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IA + if (field.type == TType.STRUCT) { + this.ia = new IllegalArgument(); + this.ia.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -30864,16 +33771,16 @@ public class Hbase { } - public static class parallelGet_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class parallelGet_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("parallelGet_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRING, (short)2); private static final TField ROWS_FIELD_DESC = new TField("rows", TType.LIST, (short)3); - public byte[] tableName; - public byte[] column; - public List rows; + public ByteBuffer tableName; + public ByteBuffer column; + public List rows; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -30881,12 +33788,10 @@ public class Hbase { COLUMN((short)2, "column"), ROWS((short)3, "rows"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -30895,7 +33800,16 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // COLUMN + return COLUMN; + case 3: // ROWS + return ROWS; + default: + return null; + } } /** @@ -30934,17 +33848,17 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROWS, new FieldMetaData("rows", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROWS, new FieldMetaData("rows", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(parallelGet_args.class, metaDataMap); } @@ -30952,9 +33866,9 @@ public class Hbase { } public parallelGet_args( - byte[] tableName, - byte[] column, - List rows) + ByteBuffer tableName, + ByteBuffer column, + List rows) { this(); this.tableName = tableName; @@ -30973,8 +33887,8 @@ public class Hbase { this.column = other.column; } if (other.isSetRows()) { - List __this__rows = new ArrayList(); - for (byte[] other_element : other.rows) { + List __this__rows = new ArrayList(); + for (ByteBuffer other_element : other.rows) { __this__rows.add(other_element); } this.rows = __this__rows; @@ -30985,16 +33899,28 @@ public class Hbase { return new parallelGet_args(this); } - @Deprecated - public parallelGet_args clone() { - return new parallelGet_args(this); + @Override + public void clear() { + this.tableName = null; + this.column = null; + this.rows = null; } public byte[] getTableName() { - return this.tableName; + setTableName(TBaseHelper.rightSize(tableName)); + return tableName.array(); + } + + public ByteBuffer BufferForTableName() { + return tableName; } public parallelGet_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public parallelGet_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -31015,10 +33941,20 @@ public class Hbase { } public byte[] getColumn() { - return this.column; + setColumn(TBaseHelper.rightSize(column)); + return column.array(); + } + + public ByteBuffer BufferForColumn() { + return column; } public parallelGet_args setColumn(byte[] column) { + setColumn(ByteBuffer.wrap(column)); + return this; + } + + public parallelGet_args setColumn(ByteBuffer column) { this.column = column; return this; } @@ -31042,22 +33978,22 @@ public class Hbase { return (this.rows == null) ? 0 : this.rows.size(); } - public java.util.Iterator getRowsIterator() { + public java.util.Iterator getRowsIterator() { return (this.rows == null) ? null : this.rows.iterator(); } - public void addToRows(byte[] elem) { + public void addToRows(ByteBuffer elem) { if (this.rows == null) { - this.rows = new ArrayList(); + this.rows = new ArrayList(); } this.rows.add(elem); } - public List getRows() { + public List getRows() { return this.rows; } - public parallelGet_args setRows(List rows) { + public parallelGet_args setRows(List rows) { this.rows = rows; return this; } @@ -31083,7 +34019,7 @@ public class Hbase { if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -31091,7 +34027,7 @@ public class Hbase { if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; @@ -31099,17 +34035,13 @@ public class Hbase { if (value == null) { unsetRows(); } else { - setRows((List)value); + setRows((List)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -31125,12 +34057,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE_NAME: return isSetTableName(); @@ -31142,10 +34074,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -31164,7 +34092,7 @@ public class Hbase { if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName)) return false; - if (!java.util.Arrays.equals(this.tableName, that.tableName)) + if (!this.tableName.equals(that.tableName)) return false; } @@ -31173,7 +34101,7 @@ public class Hbase { if (this_present_column || that_present_column) { if (!(this_present_column && that_present_column)) return false; - if (!java.util.Arrays.equals(this.column, that.column)) + if (!this.column.equals(that.column)) return false; } @@ -31202,33 +34130,43 @@ public class Hbase { int lastComparison = 0; parallelGet_args typedOther = (parallelGet_args)other; - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(tableName, typedOther.tableName); - if (lastComparison != 0) { - return lastComparison; + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumn()).compareTo(isSetColumn()); + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(column, typedOther.column); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumn()) { + lastComparison = TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRows()).compareTo(isSetRows()); + lastComparison = Boolean.valueOf(isSetRows()).compareTo(typedOther.isSetRows()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(rows, typedOther.rows); - if (lastComparison != 0) { - return lastComparison; + if (isSetRows()) { + lastComparison = TBaseHelper.compareTo(this.rows, typedOther.rows); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -31238,45 +34176,42 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE_NAME: - if (field.type == TType.STRING) { - this.tableName = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMN: - if (field.type == TType.STRING) { - this.column = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROWS: - if (field.type == TType.LIST) { + switch (field.id) { + case 1: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // COLUMN + if (field.type == TType.STRING) { + this.column = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // ROWS + if (field.type == TType.LIST) { + { + TList _list110 = iprot.readListBegin(); + this.rows = new ArrayList(_list110.size); + for (int _i111 = 0; _i111 < _list110.size; ++_i111) { - TList _list110 = iprot.readListBegin(); - this.rows = new ArrayList(_list110.size); - for (int _i111 = 0; _i111 < _list110.size; ++_i111) - { - byte[] _elem112; - _elem112 = iprot.readBinary(); - this.rows.add(_elem112); - } - iprot.readListEnd(); + ByteBuffer _elem112; + _elem112 = iprot.readBinary(); + this.rows.add(_elem112); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - } - iprot.readFieldEnd(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -31302,7 +34237,7 @@ public class Hbase { oprot.writeFieldBegin(ROWS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.rows.size())); - for (byte[] _iter113 : this.rows) + for (ByteBuffer _iter113 : this.rows) { oprot.writeBinary(_iter113); } @@ -31352,7 +34287,7 @@ public class Hbase { } - public static class parallelGet_result implements TBase, java.io.Serializable, Cloneable { + public static class parallelGet_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("parallelGet_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -31366,12 +34301,10 @@ public class Hbase { SUCCESS((short)0, "success"), IO((short)1, "io"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -31380,7 +34313,14 @@ public class Hbase { * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } } /** @@ -31419,15 +34359,15 @@ public class Hbase { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, TRowResult.class)))); - put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IO, new FieldMetaData("io", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(parallelGet_result.class, metaDataMap); } @@ -31463,9 +34403,10 @@ public class Hbase { return new parallelGet_result(this); } - @Deprecated - public parallelGet_result clone() { - return new parallelGet_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { @@ -31552,10 +34493,6 @@ public class Hbase { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -31568,12 +34505,12 @@ public class Hbase { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case SUCCESS: return isSetSuccess(); @@ -31583,10 +34520,6 @@ public class Hbase { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -31626,6 +34559,41 @@ public class Hbase { return 0; } + public int compareTo(parallelGet_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + parallelGet_result typedOther = (parallelGet_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -31635,40 +34603,37 @@ public class Hbase { if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case SUCCESS: - if (field.type == TType.LIST) { + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list114 = iprot.readListBegin(); + this.success = new ArrayList(_list114.size); + for (int _i115 = 0; _i115 < _list114.size; ++_i115) { - TList _list114 = iprot.readListBegin(); - this.success = new ArrayList(_list114.size); - for (int _i115 = 0; _i115 < _list114.size; ++_i115) - { - TRowResult _elem116; - _elem116 = new TRowResult(); - _elem116.read(iprot); - this.success.add(_elem116); - } - iprot.readListEnd(); + TRowResult _elem116; + _elem116 = new TRowResult(); + _elem116.read(iprot); + this.success.add(_elem116); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - case IO: - if (field.type == TType.STRUCT) { - this.io = new IOError(); - this.io.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); - } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // IO + if (field.type == TType.STRUCT) { + this.io = new IOError(); + this.io.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); } iprot.readStructEnd(); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java b/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java index 0fc32b3..e991e06 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java @@ -15,12 +15,15 @@ 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; /** @@ -28,7 +31,7 @@ import org.apache.thrift.protocol.*; * to the Hbase master or an Hbase region server. Also used to return * more general Hbase error conditions. */ -public class IOError extends Exception implements TBase, java.io.Serializable, Cloneable, Comparable { +public class IOError extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("IOError"); private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); @@ -39,12 +42,10 @@ public class IOError extends Exception implements TBase, java.i public enum _Fields implements TFieldIdEnum { MESSAGE((short)1, "message"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -53,7 +54,12 @@ public class IOError extends Exception implements TBase, java.i * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } } /** @@ -92,12 +98,12 @@ public class IOError extends Exception implements TBase, java.i // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(IOError.class, metaDataMap); } @@ -124,9 +130,9 @@ public class IOError extends Exception implements TBase, java.i return new IOError(this); } - @Deprecated - public IOError clone() { - return new IOError(this); + @Override + public void clear() { + this.message = null; } public String getMessage() { @@ -166,10 +172,6 @@ public class IOError extends Exception implements TBase, java.i } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case MESSAGE: @@ -179,12 +181,12 @@ public class IOError extends Exception implements TBase, java.i throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case MESSAGE: return isSetMessage(); @@ -192,10 +194,6 @@ public class IOError extends Exception implements TBase, java.i throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -234,17 +232,23 @@ public class IOError extends Exception implements TBase, java.i int lastComparison = 0; IOError typedOther = (IOError)other; - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage()); + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(message, typedOther.message); - if (lastComparison != 0) { - return lastComparison; + if (isSetMessage()) { + lastComparison = TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -254,21 +258,18 @@ public class IOError extends Exception implements TBase, java.i if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case MESSAGE: - if (field.type == TType.STRING) { - this.message = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // MESSAGE + if (field.type == TType.STRING) { + this.message = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java b/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java index fa38ba5..85c560c 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java @@ -15,19 +15,22 @@ 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; /** * An IllegalArgument exception indicates an illegal or invalid * argument was passed into a procedure. */ -public class IllegalArgument extends Exception implements TBase, java.io.Serializable, Cloneable, Comparable { +public class IllegalArgument extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("IllegalArgument"); private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); @@ -38,12 +41,10 @@ public class IllegalArgument extends Exception implements TBase byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -52,7 +53,12 @@ public class IllegalArgument extends Exception implements TBase metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(IllegalArgument.class, metaDataMap); } @@ -123,9 +129,9 @@ public class IllegalArgument extends Exception implements TBase, java.io.Serializable, Cloneable, Comparable { +public class Increment implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Increment"); private static final TField TABLE_FIELD_DESC = new TField("table", TType.STRING, (short)1); @@ -34,9 +37,9 @@ public class Increment implements TBase, java.io.Serializable private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRING, (short)3); private static final TField AMOUNT_FIELD_DESC = new TField("amount", TType.I64, (short)4); - public byte[] table; - public byte[] row; - public byte[] column; + public ByteBuffer table; + public ByteBuffer row; + public ByteBuffer column; public long amount; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -46,12 +49,10 @@ public class Increment implements TBase, java.io.Serializable COLUMN((short)3, "column"), AMOUNT((short)4, "amount"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -60,7 +61,18 @@ public class Increment implements TBase, java.io.Serializable * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + case 4: // AMOUNT + return AMOUNT; + default: + return null; + } } /** @@ -101,18 +113,18 @@ public class Increment implements TBase, java.io.Serializable private static final int __AMOUNT_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.TABLE, new FieldMetaData("table", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.AMOUNT, new FieldMetaData("amount", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I64))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new FieldMetaData("table", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.AMOUNT, new FieldMetaData("amount", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Increment.class, metaDataMap); } @@ -120,9 +132,9 @@ public class Increment implements TBase, java.io.Serializable } public Increment( - byte[] table, - byte[] row, - byte[] column, + ByteBuffer table, + ByteBuffer row, + ByteBuffer column, long amount) { this(); @@ -155,16 +167,30 @@ public class Increment implements TBase, java.io.Serializable return new Increment(this); } - @Deprecated - public Increment clone() { - return new Increment(this); + @Override + public void clear() { + this.table = null; + this.row = null; + this.column = null; + setAmountIsSet(false); + this.amount = 0; } public byte[] getTable() { - return this.table; + setTable(TBaseHelper.rightSize(table)); + return table.array(); + } + + public ByteBuffer BufferForTable() { + return table; } public Increment setTable(byte[] table) { + setTable(ByteBuffer.wrap(table)); + return this; + } + + public Increment setTable(ByteBuffer table) { this.table = table; return this; } @@ -185,10 +211,20 @@ public class Increment implements TBase, java.io.Serializable } public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } public Increment setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public Increment setRow(ByteBuffer row) { this.row = row; return this; } @@ -209,10 +245,20 @@ public class Increment implements TBase, java.io.Serializable } public byte[] getColumn() { - return this.column; + setColumn(TBaseHelper.rightSize(column)); + return column.array(); + } + + public ByteBuffer BufferForColumn() { + return column; } public Increment setColumn(byte[] column) { + setColumn(ByteBuffer.wrap(column)); + return this; + } + + public Increment setColumn(ByteBuffer column) { this.column = column; return this; } @@ -261,7 +307,7 @@ public class Increment implements TBase, java.io.Serializable if (value == null) { unsetTable(); } else { - setTable((byte[])value); + setTable((ByteBuffer)value); } break; @@ -269,7 +315,7 @@ public class Increment implements TBase, java.io.Serializable if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -277,7 +323,7 @@ public class Increment implements TBase, java.io.Serializable if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; @@ -292,10 +338,6 @@ public class Increment implements TBase, java.io.Serializable } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE: @@ -314,12 +356,12 @@ public class Increment implements TBase, java.io.Serializable throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case TABLE: return isSetTable(); @@ -333,10 +375,6 @@ public class Increment implements TBase, java.io.Serializable throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -355,7 +393,7 @@ public class Increment implements TBase, java.io.Serializable if (this_present_table || that_present_table) { if (!(this_present_table && that_present_table)) return false; - if (!java.util.Arrays.equals(this.table, that.table)) + if (!this.table.equals(that.table)) return false; } @@ -364,7 +402,7 @@ public class Increment implements TBase, java.io.Serializable if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -373,7 +411,7 @@ public class Increment implements TBase, java.io.Serializable if (this_present_column || that_present_column) { if (!(this_present_column && that_present_column)) return false; - if (!java.util.Arrays.equals(this.column, that.column)) + if (!this.column.equals(that.column)) return false; } @@ -402,41 +440,53 @@ public class Increment implements TBase, java.io.Serializable int lastComparison = 0; Increment typedOther = (Increment)other; - lastComparison = Boolean.valueOf(isSetTable()).compareTo(isSetTable()); + lastComparison = Boolean.valueOf(isSetTable()).compareTo(typedOther.isSetTable()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(table, typedOther.table); - if (lastComparison != 0) { - return lastComparison; + if (isSetTable()) { + lastComparison = TBaseHelper.compareTo(this.table, typedOther.table); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow()); + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(row, typedOther.row); - if (lastComparison != 0) { - return lastComparison; + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumn()).compareTo(isSetColumn()); + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(column, typedOther.column); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumn()) { + lastComparison = TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetAmount()).compareTo(isSetAmount()); + lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(amount, typedOther.amount); - if (lastComparison != 0) { - return lastComparison; + if (isSetAmount()) { + lastComparison = TBaseHelper.compareTo(this.amount, typedOther.amount); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -446,43 +496,40 @@ public class Increment implements TBase, java.io.Serializable if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case TABLE: - if (field.type == TType.STRING) { - this.table = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMN: - if (field.type == TType.STRING) { - this.column = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case AMOUNT: - if (field.type == TType.I64) { - this.amount = iprot.readI64(); - setAmountIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // TABLE + if (field.type == TType.STRING) { + this.table = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMN + if (field.type == TType.STRING) { + this.column = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // AMOUNT + if (field.type == TType.I64) { + this.amount = iprot.readI64(); + setAmountIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java b/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java index 87c061e..212e4eb 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java @@ -15,18 +15,21 @@ 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; /** * A Mutation object is used to either update or delete a column-value. */ -public class Mutation implements TBase, java.io.Serializable, Cloneable, Comparable { +public class Mutation implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Mutation"); private static final TField IS_DELETE_FIELD_DESC = new TField("isDelete", TType.BOOL, (short)1); @@ -34,8 +37,8 @@ public class Mutation implements TBase, java.io.Serializable, private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)3); public boolean isDelete; - public byte[] column; - public byte[] value; + public ByteBuffer column; + public ByteBuffer value; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -43,12 +46,10 @@ public class Mutation implements TBase, java.io.Serializable, COLUMN((short)2, "column"), VALUE((short)3, "value"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -57,7 +58,16 @@ public class Mutation implements TBase, java.io.Serializable, * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // IS_DELETE + return IS_DELETE; + case 2: // COLUMN + return COLUMN; + case 3: // VALUE + return VALUE; + default: + return null; + } } /** @@ -98,16 +108,16 @@ public class Mutation implements TBase, java.io.Serializable, private static final int __ISDELETE_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.IS_DELETE, new FieldMetaData("isDelete", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IS_DELETE, new FieldMetaData("isDelete", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Mutation.class, metaDataMap); } @@ -118,8 +128,8 @@ public class Mutation implements TBase, java.io.Serializable, public Mutation( boolean isDelete, - byte[] column, - byte[] value) + ByteBuffer column, + ByteBuffer value) { this(); this.isDelete = isDelete; @@ -147,9 +157,12 @@ public class Mutation implements TBase, java.io.Serializable, return new Mutation(this); } - @Deprecated - public Mutation clone() { - return new Mutation(this); + @Override + public void clear() { + this.isDelete = false; + + this.column = null; + this.value = null; } public boolean isIsDelete() { @@ -176,10 +189,20 @@ public class Mutation implements TBase, java.io.Serializable, } public byte[] getColumn() { - return this.column; + setColumn(TBaseHelper.rightSize(column)); + return column.array(); + } + + public ByteBuffer BufferForColumn() { + return column; } public Mutation setColumn(byte[] column) { + setColumn(ByteBuffer.wrap(column)); + return this; + } + + public Mutation setColumn(ByteBuffer column) { this.column = column; return this; } @@ -200,10 +223,20 @@ public class Mutation implements TBase, java.io.Serializable, } public byte[] getValue() { - return this.value; + setValue(TBaseHelper.rightSize(value)); + return value.array(); + } + + public ByteBuffer BufferForValue() { + return value; } public Mutation setValue(byte[] value) { + setValue(ByteBuffer.wrap(value)); + return this; + } + + public Mutation setValue(ByteBuffer value) { this.value = value; return this; } @@ -237,7 +270,7 @@ public class Mutation implements TBase, java.io.Serializable, if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; @@ -245,17 +278,13 @@ public class Mutation implements TBase, java.io.Serializable, if (value == null) { unsetValue(); } else { - setValue((byte[])value); + setValue((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IS_DELETE: @@ -271,12 +300,12 @@ public class Mutation implements TBase, java.io.Serializable, throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case IS_DELETE: return isSetIsDelete(); @@ -288,10 +317,6 @@ public class Mutation implements TBase, java.io.Serializable, throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -319,7 +344,7 @@ public class Mutation implements TBase, java.io.Serializable, if (this_present_column || that_present_column) { if (!(this_present_column && that_present_column)) return false; - if (!java.util.Arrays.equals(this.column, that.column)) + if (!this.column.equals(that.column)) return false; } @@ -328,7 +353,7 @@ public class Mutation implements TBase, java.io.Serializable, if (this_present_value || that_present_value) { if (!(this_present_value && that_present_value)) return false; - if (!java.util.Arrays.equals(this.value, that.value)) + if (!this.value.equals(that.value)) return false; } @@ -348,33 +373,43 @@ public class Mutation implements TBase, java.io.Serializable, int lastComparison = 0; Mutation typedOther = (Mutation)other; - lastComparison = Boolean.valueOf(isSetIsDelete()).compareTo(isSetIsDelete()); + lastComparison = Boolean.valueOf(isSetIsDelete()).compareTo(typedOther.isSetIsDelete()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(isDelete, typedOther.isDelete); - if (lastComparison != 0) { - return lastComparison; + if (isSetIsDelete()) { + lastComparison = TBaseHelper.compareTo(this.isDelete, typedOther.isDelete); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetColumn()).compareTo(isSetColumn()); + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(column, typedOther.column); - if (lastComparison != 0) { - return lastComparison; + if (isSetColumn()) { + lastComparison = TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetValue()).compareTo(isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(value, typedOther.value); - if (lastComparison != 0) { - return lastComparison; + if (isSetValue()) { + lastComparison = TBaseHelper.compareTo(this.value, typedOther.value); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -384,36 +419,33 @@ public class Mutation implements TBase, java.io.Serializable, if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case IS_DELETE: - if (field.type == TType.BOOL) { - this.isDelete = iprot.readBool(); - setIsDeleteIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMN: - if (field.type == TType.STRING) { - this.column = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case VALUE: - if (field.type == TType.STRING) { - this.value = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // IS_DELETE + if (field.type == TType.BOOL) { + this.isDelete = iprot.readBool(); + setIsDeleteIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // COLUMN + if (field.type == TType.STRING) { + this.column = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // VALUE + if (field.type == TType.STRING) { + this.value = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java b/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java index f5c9702..9c97dd2 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java @@ -15,12 +15,15 @@ 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; /** @@ -29,13 +32,13 @@ import org.apache.thrift.protocol.*; * the timestamp of a cell to a first-class value, making it easy to take * note of temporal data. Cell is used all the way from HStore up to HTable. */ -public class TCell implements TBase, java.io.Serializable, Cloneable, Comparable { +public class TCell implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("TCell"); private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)1); private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2); - public byte[] value; + public ByteBuffer value; public long timestamp; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -43,12 +46,10 @@ public class TCell implements TBase, java.io.Serializable, Clonea VALUE((short)1, "value"), TIMESTAMP((short)2, "timestamp"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -57,7 +58,14 @@ public class TCell implements TBase, java.io.Serializable, Clonea * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // VALUE + return VALUE; + case 2: // TIMESTAMP + return TIMESTAMP; + default: + return null; + } } /** @@ -98,14 +106,14 @@ public class TCell implements TBase, java.io.Serializable, Clonea private static final int __TIMESTAMP_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I64))); - }}); - + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Bytes"))); + tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(TCell.class, metaDataMap); } @@ -113,7 +121,7 @@ public class TCell implements TBase, java.io.Serializable, Clonea } public TCell( - byte[] value, + ByteBuffer value, long timestamp) { this(); @@ -138,16 +146,28 @@ public class TCell implements TBase, java.io.Serializable, Clonea return new TCell(this); } - @Deprecated - public TCell clone() { - return new TCell(this); + @Override + public void clear() { + this.value = null; + setTimestampIsSet(false); + this.timestamp = 0; } public byte[] getValue() { - return this.value; + setValue(TBaseHelper.rightSize(value)); + return value.array(); + } + + public ByteBuffer BufferForValue() { + return value; } public TCell setValue(byte[] value) { + setValue(ByteBuffer.wrap(value)); + return this; + } + + public TCell setValue(ByteBuffer value) { this.value = value; return this; } @@ -196,7 +216,7 @@ public class TCell implements TBase, java.io.Serializable, Clonea if (value == null) { unsetValue(); } else { - setValue((byte[])value); + setValue((ByteBuffer)value); } break; @@ -211,10 +231,6 @@ public class TCell implements TBase, java.io.Serializable, Clonea } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case VALUE: @@ -227,12 +243,12 @@ public class TCell implements TBase, java.io.Serializable, Clonea throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case VALUE: return isSetValue(); @@ -242,10 +258,6 @@ public class TCell implements TBase, java.io.Serializable, Clonea throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -264,7 +276,7 @@ public class TCell implements TBase, java.io.Serializable, Clonea if (this_present_value || that_present_value) { if (!(this_present_value && that_present_value)) return false; - if (!java.util.Arrays.equals(this.value, that.value)) + if (!this.value.equals(that.value)) return false; } @@ -293,25 +305,33 @@ public class TCell implements TBase, java.io.Serializable, Clonea int lastComparison = 0; TCell typedOther = (TCell)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(value, typedOther.value); - if (lastComparison != 0) { - return lastComparison; + if (isSetValue()) { + lastComparison = TBaseHelper.compareTo(this.value, typedOther.value); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp()); + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp); - if (lastComparison != 0) { - return lastComparison; + if (isSetTimestamp()) { + lastComparison = TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -321,29 +341,26 @@ public class TCell implements TBase, java.io.Serializable, Clonea if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case VALUE: - if (field.type == TType.STRING) { - this.value = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TIMESTAMP: - if (field.type == TType.I64) { - this.timestamp = iprot.readI64(); - setTimestampIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // VALUE + if (field.type == TType.STRING) { + this.value = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TIMESTAMP + if (field.type == TType.I64) { + this.timestamp = iprot.readI64(); + setTimestampIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java b/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java index 439f322..425e068 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java @@ -15,18 +15,21 @@ 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; /** * A TRegionInfo contains information about an HTable region. */ -public class TRegionInfo implements TBase, java.io.Serializable, Cloneable, Comparable { +public class TRegionInfo implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("TRegionInfo"); private static final TField START_KEY_FIELD_DESC = new TField("startKey", TType.STRING, (short)1); @@ -35,10 +38,10 @@ public class TRegionInfo implements TBase, java.io.Serializ private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)4); private static final TField VERSION_FIELD_DESC = new TField("version", TType.BYTE, (short)5); - public byte[] startKey; - public byte[] endKey; + public ByteBuffer startKey; + public ByteBuffer endKey; public long id; - public byte[] name; + public ByteBuffer name; public byte version; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -49,12 +52,10 @@ public class TRegionInfo implements TBase, java.io.Serializ NAME((short)4, "name"), VERSION((short)5, "version"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -63,7 +64,20 @@ public class TRegionInfo implements TBase, java.io.Serializ * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // START_KEY + return START_KEY; + case 2: // END_KEY + return END_KEY; + case 3: // ID + return ID; + case 4: // NAME + return NAME; + case 5: // VERSION + return VERSION; + default: + return null; + } } /** @@ -105,20 +119,20 @@ public class TRegionInfo implements TBase, java.io.Serializ private static final int __VERSION_ISSET_ID = 1; private BitSet __isset_bit_vector = new BitSet(2); - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.START_KEY, new FieldMetaData("startKey", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.END_KEY, new FieldMetaData("endKey", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.START_KEY, new FieldMetaData("startKey", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.END_KEY, new FieldMetaData("endKey", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); - put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.VERSION, new FieldMetaData("version", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.VERSION, new FieldMetaData("version", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BYTE))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(TRegionInfo.class, metaDataMap); } @@ -126,10 +140,10 @@ public class TRegionInfo implements TBase, java.io.Serializ } public TRegionInfo( - byte[] startKey, - byte[] endKey, + ByteBuffer startKey, + ByteBuffer endKey, long id, - byte[] name, + ByteBuffer name, byte version) { this(); @@ -165,16 +179,32 @@ public class TRegionInfo implements TBase, java.io.Serializ return new TRegionInfo(this); } - @Deprecated - public TRegionInfo clone() { - return new TRegionInfo(this); + @Override + public void clear() { + this.startKey = null; + this.endKey = null; + setIdIsSet(false); + this.id = 0; + this.name = null; + setVersionIsSet(false); + this.version = 0; } public byte[] getStartKey() { - return this.startKey; + setStartKey(TBaseHelper.rightSize(startKey)); + return startKey.array(); + } + + public ByteBuffer BufferForStartKey() { + return startKey; } public TRegionInfo setStartKey(byte[] startKey) { + setStartKey(ByteBuffer.wrap(startKey)); + return this; + } + + public TRegionInfo setStartKey(ByteBuffer startKey) { this.startKey = startKey; return this; } @@ -195,10 +225,20 @@ public class TRegionInfo implements TBase, java.io.Serializ } public byte[] getEndKey() { - return this.endKey; + setEndKey(TBaseHelper.rightSize(endKey)); + return endKey.array(); + } + + public ByteBuffer BufferForEndKey() { + return endKey; } public TRegionInfo setEndKey(byte[] endKey) { + setEndKey(ByteBuffer.wrap(endKey)); + return this; + } + + public TRegionInfo setEndKey(ByteBuffer endKey) { this.endKey = endKey; return this; } @@ -242,10 +282,20 @@ public class TRegionInfo implements TBase, java.io.Serializ } public byte[] getName() { - return this.name; + setName(TBaseHelper.rightSize(name)); + return name.array(); + } + + public ByteBuffer BufferForName() { + return name; } public TRegionInfo setName(byte[] name) { + setName(ByteBuffer.wrap(name)); + return this; + } + + public TRegionInfo setName(ByteBuffer name) { this.name = name; return this; } @@ -294,7 +344,7 @@ public class TRegionInfo implements TBase, java.io.Serializ if (value == null) { unsetStartKey(); } else { - setStartKey((byte[])value); + setStartKey((ByteBuffer)value); } break; @@ -302,7 +352,7 @@ public class TRegionInfo implements TBase, java.io.Serializ if (value == null) { unsetEndKey(); } else { - setEndKey((byte[])value); + setEndKey((ByteBuffer)value); } break; @@ -318,7 +368,7 @@ public class TRegionInfo implements TBase, java.io.Serializ if (value == null) { unsetName(); } else { - setName((byte[])value); + setName((ByteBuffer)value); } break; @@ -333,10 +383,6 @@ public class TRegionInfo implements TBase, java.io.Serializ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case START_KEY: @@ -358,12 +404,12 @@ public class TRegionInfo implements TBase, java.io.Serializ throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case START_KEY: return isSetStartKey(); @@ -379,10 +425,6 @@ public class TRegionInfo implements TBase, java.io.Serializ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -401,7 +443,7 @@ public class TRegionInfo implements TBase, java.io.Serializ if (this_present_startKey || that_present_startKey) { if (!(this_present_startKey && that_present_startKey)) return false; - if (!java.util.Arrays.equals(this.startKey, that.startKey)) + if (!this.startKey.equals(that.startKey)) return false; } @@ -410,7 +452,7 @@ public class TRegionInfo implements TBase, java.io.Serializ if (this_present_endKey || that_present_endKey) { if (!(this_present_endKey && that_present_endKey)) return false; - if (!java.util.Arrays.equals(this.endKey, that.endKey)) + if (!this.endKey.equals(that.endKey)) return false; } @@ -428,7 +470,7 @@ public class TRegionInfo implements TBase, java.io.Serializ if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; - if (!java.util.Arrays.equals(this.name, that.name)) + if (!this.name.equals(that.name)) return false; } @@ -457,49 +499,63 @@ public class TRegionInfo implements TBase, java.io.Serializ int lastComparison = 0; TRegionInfo typedOther = (TRegionInfo)other; - lastComparison = Boolean.valueOf(isSetStartKey()).compareTo(isSetStartKey()); + lastComparison = Boolean.valueOf(isSetStartKey()).compareTo(typedOther.isSetStartKey()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(startKey, typedOther.startKey); - if (lastComparison != 0) { - return lastComparison; + if (isSetStartKey()) { + lastComparison = TBaseHelper.compareTo(this.startKey, typedOther.startKey); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetEndKey()).compareTo(isSetEndKey()); + lastComparison = Boolean.valueOf(isSetEndKey()).compareTo(typedOther.isSetEndKey()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(endKey, typedOther.endKey); - if (lastComparison != 0) { - return lastComparison; + if (isSetEndKey()) { + lastComparison = TBaseHelper.compareTo(this.endKey, typedOther.endKey); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId()); + lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(id, typedOther.id); - if (lastComparison != 0) { - return lastComparison; + if (isSetId()) { + lastComparison = TBaseHelper.compareTo(this.id, typedOther.id); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName()); + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(name, typedOther.name); - if (lastComparison != 0) { - return lastComparison; + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } } - lastComparison = Boolean.valueOf(isSetVersion()).compareTo(isSetVersion()); + lastComparison = Boolean.valueOf(isSetVersion()).compareTo(typedOther.isSetVersion()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(version, typedOther.version); - if (lastComparison != 0) { - return lastComparison; + if (isSetVersion()) { + lastComparison = TBaseHelper.compareTo(this.version, typedOther.version); + if (lastComparison != 0) { + return lastComparison; + } } return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -509,51 +565,48 @@ public class TRegionInfo implements TBase, java.io.Serializ if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case START_KEY: - if (field.type == TType.STRING) { - this.startKey = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case END_KEY: - if (field.type == TType.STRING) { - this.endKey = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ID: - if (field.type == TType.I64) { - this.id = iprot.readI64(); - setIdIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case VERSION: - if (field.type == TType.BYTE) { - this.version = iprot.readByte(); - setVersionIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - } - iprot.readFieldEnd(); + switch (field.id) { + case 1: // START_KEY + if (field.type == TType.STRING) { + this.startKey = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // END_KEY + if (field.type == TType.STRING) { + this.endKey = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // ID + if (field.type == TType.I64) { + this.id = iprot.readI64(); + setIdIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // VERSION + if (field.type == TType.BYTE) { + this.version = iprot.readByte(); + setVersionIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java b/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java index 5b2f04d..6e95f5f 100644 --- a/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java +++ b/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java @@ -15,37 +15,38 @@ 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; /** * Holds row name and then a map of columns to cells. */ -public class TRowResult implements TBase, java.io.Serializable, Cloneable { +public class TRowResult implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("TRowResult"); private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)1); private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.MAP, (short)2); - public byte[] row; - public Map columns; + public ByteBuffer row; + public Map columns; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { ROW((short)1, "row"), COLUMNS((short)2, "columns"); - private static final Map byId = new HashMap(); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { - byId.put((int)field._thriftId, field); byName.put(field.getFieldName(), field); } } @@ -54,7 +55,14 @@ public class TRowResult implements TBase, java.io.Serializab * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { - return byId.get(fieldId); + switch(fieldId) { + case 1: // ROW + return ROW; + case 2: // COLUMNS + return COLUMNS; + default: + return null; + } } /** @@ -93,16 +101,16 @@ public class TRowResult implements TBase, java.io.Serializab // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{ - put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING , "Text"), new StructMetaData(TType.STRUCT, TCell.class)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(TRowResult.class, metaDataMap); } @@ -110,8 +118,8 @@ public class TRowResult implements TBase, java.io.Serializab } public TRowResult( - byte[] row, - Map columns) + ByteBuffer row, + Map columns) { this(); this.row = row; @@ -126,13 +134,13 @@ public class TRowResult implements TBase, java.io.Serializab this.row = other.row; } if (other.isSetColumns()) { - Map __this__columns = new HashMap(); - for (Map.Entry other_element : other.columns.entrySet()) { + Map __this__columns = new HashMap(); + for (Map.Entry other_element : other.columns.entrySet()) { - byte[] other_element_key = other_element.getKey(); + ByteBuffer other_element_key = other_element.getKey(); TCell other_element_value = other_element.getValue(); - byte[] __this__columns_copy_key = other_element_key; + ByteBuffer __this__columns_copy_key = other_element_key; TCell __this__columns_copy_value = new TCell(other_element_value); @@ -146,16 +154,27 @@ public class TRowResult implements TBase, java.io.Serializab return new TRowResult(this); } - @Deprecated - public TRowResult clone() { - return new TRowResult(this); + @Override + public void clear() { + this.row = null; + this.columns = null; } public byte[] getRow() { - return this.row; + setRow(TBaseHelper.rightSize(row)); + return row.array(); + } + + public ByteBuffer BufferForRow() { + return row; } public TRowResult setRow(byte[] row) { + setRow(ByteBuffer.wrap(row)); + return this; + } + + public TRowResult setRow(ByteBuffer row) { this.row = row; return this; } @@ -179,18 +198,18 @@ public class TRowResult implements TBase, java.io.Serializab return (this.columns == null) ? 0 : this.columns.size(); } - public void putToColumns(byte[] key, TCell val) { + public void putToColumns(ByteBuffer key, TCell val) { if (this.columns == null) { - this.columns = new HashMap(); + this.columns = new HashMap(); } this.columns.put(key, val); } - public Map getColumns() { + public Map getColumns() { return this.columns; } - public TRowResult setColumns(Map columns) { + public TRowResult setColumns(Map columns) { this.columns = columns; return this; } @@ -216,7 +235,7 @@ public class TRowResult implements TBase, java.io.Serializab if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -224,17 +243,13 @@ public class TRowResult implements TBase, java.io.Serializab if (value == null) { unsetColumns(); } else { - setColumns((Map)value); + setColumns((Map)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ROW: @@ -247,12 +262,12 @@ public class TRowResult implements TBase, java.io.Serializab throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + switch (field) { case ROW: return isSetRow(); @@ -262,10 +277,6 @@ public class TRowResult implements TBase, java.io.Serializab throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -284,7 +295,7 @@ public class TRowResult implements TBase, java.io.Serializab if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; - if (!java.util.Arrays.equals(this.row, that.row)) + if (!this.row.equals(that.row)) return false; } @@ -305,6 +316,41 @@ public class TRowResult implements TBase, java.io.Serializab return 0; } + public int compareTo(TRowResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + TRowResult typedOther = (TRowResult)other; + + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -314,41 +360,38 @@ public class TRowResult implements TBase, java.io.Serializab if (field.type == TType.STOP) { break; } - _Fields fieldId = _Fields.findByThriftId(field.id); - if (fieldId == null) { - TProtocolUtil.skip(iprot, field.type); - } else { - switch (fieldId) { - case ROW: - if (field.type == TType.STRING) { - this.row = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case COLUMNS: - if (field.type == TType.MAP) { + switch (field.id) { + case 1: // ROW + if (field.type == TType.STRING) { + this.row = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // COLUMNS + if (field.type == TType.MAP) { + { + TMap _map4 = iprot.readMapBegin(); + this.columns = new HashMap(2*_map4.size); + for (int _i5 = 0; _i5 < _map4.size; ++_i5) { - TMap _map4 = iprot.readMapBegin(); - this.columns = new HashMap(2*_map4.size); - for (int _i5 = 0; _i5 < _map4.size; ++_i5) - { - byte[] _key6; - TCell _val7; - _key6 = iprot.readBinary(); - _val7 = new TCell(); - _val7.read(iprot); - this.columns.put(_key6, _val7); - } - iprot.readMapEnd(); + ByteBuffer _key6; + TCell _val7; + _key6 = iprot.readBinary(); + _val7 = new TCell(); + _val7.read(iprot); + this.columns.put(_key6, _val7); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readMapEnd(); } - break; - } - iprot.readFieldEnd(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } + iprot.readFieldEnd(); } iprot.readStructEnd(); @@ -369,7 +412,7 @@ public class TRowResult implements TBase, java.io.Serializab oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.columns.size())); - for (Map.Entry _iter8 : this.columns.entrySet()) + for (Map.Entry _iter8 : this.columns.entrySet()) { oprot.writeBinary(_iter8.getKey()); _iter8.getValue().write(oprot); diff --git a/src/main/java/org/apache/hadoop/hbase/util/Bytes.java b/src/main/java/org/apache/hadoop/hbase/util/Bytes.java index f2cc305..57b8342 100644 --- a/src/main/java/org/apache/hadoop/hbase/util/Bytes.java +++ b/src/main/java/org/apache/hadoop/hbase/util/Bytes.java @@ -731,6 +731,20 @@ public class Bytes { } /** + * This method will get a sequence of bytes from pos -> limit, + * but will restore pos after. + * @param buf + * @return + */ + public static byte[] getBytes(ByteBuffer buf) { + int savedPos = buf.position(); + byte [] newBytes = new byte[buf.remaining()]; + buf.get(newBytes); + buf.position(savedPos); + return newBytes; + } + + /** * Put a short value out to the specified byte array position. * @param bytes the byte array * @param offset position in the array diff --git a/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java b/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java index edd1740..84ba4c8 100644 --- a/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java +++ b/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java @@ -19,6 +19,7 @@ */ package org.apache.hadoop.hbase.thrift; +import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; @@ -36,17 +37,20 @@ import org.apache.hadoop.hbase.util.Bytes; */ public class TestThriftServer extends HBaseClusterTestCase { + private static ByteBuffer $bb(String i) { + return ByteBuffer.wrap(Bytes.toBytes(i)); + } // Static names for tables, columns, rows, and values - private static byte[] tableAname = Bytes.toBytes("tableA"); - private static byte[] tableBname = Bytes.toBytes("tableB"); - private static byte[] columnAname = Bytes.toBytes("columnA:"); - private static byte[] columnBname = Bytes.toBytes("columnB:"); - private static byte[] rowAname = Bytes.toBytes("rowA"); - private static byte[] rowBname = Bytes.toBytes("rowB"); - private static byte[] valueAname = Bytes.toBytes("valueA"); - private static byte[] valueBname = Bytes.toBytes("valueB"); - private static byte[] valueCname = Bytes.toBytes("valueC"); - private static byte[] valueDname = Bytes.toBytes("valueD"); + private static ByteBuffer tableAname = $bb("tableA"); + private static ByteBuffer tableBname = $bb("tableB"); + private static ByteBuffer columnAname = $bb("columnA:"); + private static ByteBuffer columnBname = $bb("columnB:"); + private static ByteBuffer rowAname = $bb("rowA"); + private static ByteBuffer rowBname = $bb("rowB"); + private static ByteBuffer valueAname = $bb("valueA"); + private static ByteBuffer valueBname = $bb("valueB"); + private static ByteBuffer valueCname = $bb("valueC"); + private static ByteBuffer valueDname = $bb("valueD"); /** * Runs all of the tests under a single JUnit test method. We @@ -113,12 +117,12 @@ public class TestThriftServer extends HBaseClusterTestCase { handler.mutateRow(tableAname, rowAname, getMutations()); // Assert that the changes were made - assertTrue(Bytes.equals(valueAname, - handler.get(tableAname, rowAname, columnAname).get(0).value)); + assertEquals(valueAname, + handler.get(tableAname, rowAname, columnAname).get(0).value); TRowResult rowResult1 = handler.getRow(tableAname, rowAname).get(0); - assertTrue(Bytes.equals(rowAname, rowResult1.row)); - assertTrue(Bytes.equals(valueBname, - rowResult1.columns.get(columnBname).value)); + assertEquals(rowAname, rowResult1.row); + assertEquals(valueBname, + rowResult1.columns.get(columnBname).value); // Apply a few BatchMutations for rowA and rowB // rowAmutations.add(new Mutation(true, columnAname, null)); @@ -133,16 +137,16 @@ public class TestThriftServer extends HBaseClusterTestCase { // Assert that changes were made to rowA List cells = handler.get(tableAname, rowAname, columnAname); assertFalse(cells.size() > 0); - assertTrue(Bytes.equals(valueCname, handler.get(tableAname, rowAname, columnBname).get(0).value)); + assertEquals(valueCname, handler.get(tableAname, rowAname, columnBname).get(0).value); List versions = handler.getVer(tableAname, rowAname, columnBname, MAXVERSIONS); - assertTrue(Bytes.equals(valueCname, versions.get(0).value)); - assertTrue(Bytes.equals(valueBname, versions.get(1).value)); + assertEquals(valueCname, versions.get(0).value); + assertEquals(valueBname, versions.get(1).value); // Assert that changes were made to rowB TRowResult rowResult2 = handler.getRow(tableAname, rowBname).get(0); - assertTrue(Bytes.equals(rowBname, rowResult2.row)); - assertTrue(Bytes.equals(valueCname, rowResult2.columns.get(columnAname).value)); - assertTrue(Bytes.equals(valueDname, rowResult2.columns.get(columnBname).value)); + assertEquals(rowBname, rowResult2.row); + assertEquals(valueCname, rowResult2.columns.get(columnAname).value); + assertEquals(valueDname, rowResult2.columns.get(columnBname).value); // Apply some deletes handler.deleteAll(tableAname, rowAname, columnBname); @@ -198,21 +202,21 @@ public class TestThriftServer extends HBaseClusterTestCase { TRowResult rowResult2 = handler.getRowTs(tableAname, rowAname, time2).get(0); // columnA was completely deleted //assertTrue(Bytes.equals(rowResult1.columns.get(columnAname).value, valueAname)); - assertTrue(Bytes.equals(rowResult1.columns.get(columnBname).value, valueBname)); - assertTrue(Bytes.equals(rowResult2.columns.get(columnBname).value, valueCname)); + assertEquals(rowResult1.columns.get(columnBname).value, valueBname); + assertEquals(rowResult2.columns.get(columnBname).value, valueCname); // ColumnAname has been deleted, and will never be visible even with a getRowTs() assertFalse(rowResult2.columns.containsKey(columnAname)); - List columns = new ArrayList(); + List columns = new ArrayList(); columns.add(columnBname); rowResult1 = handler.getRowWithColumns(tableAname, rowAname, columns).get(0); - assertTrue(Bytes.equals(rowResult1.columns.get(columnBname).value, valueCname)); + assertEquals(rowResult1.columns.get(columnBname).value, valueCname); assertFalse(rowResult1.columns.containsKey(columnAname)); rowResult1 = handler.getRowWithColumnsTs(tableAname, rowAname, columns, time1).get(0); - assertTrue(Bytes.equals(rowResult1.columns.get(columnBname).value, valueBname)); + assertEquals(rowResult1.columns.get(columnBname).value, valueBname); assertFalse(rowResult1.columns.containsKey(columnAname)); // Apply some timestamped deletes @@ -229,7 +233,7 @@ public class TestThriftServer extends HBaseClusterTestCase { assertEquals(1, size); // should be available.... - assertTrue(Bytes.equals(handler.get(tableAname, rowAname, columnBname).get(0).value, valueCname)); + assertEquals(handler.get(tableAname, rowAname, columnBname).get(0).value, valueCname); assertEquals(0, handler.getRow(tableAname, rowBname).size()); @@ -266,18 +270,18 @@ public class TestThriftServer extends HBaseClusterTestCase { // Test a scanner on all rows and all columns, no timestamp int scanner1 = handler.scannerOpen(tableAname, rowAname, getColumnList(true, true)); TRowResult rowResult1a = handler.scannerGet(scanner1).get(0); - assertTrue(Bytes.equals(rowResult1a.row, rowAname)); + assertEquals(rowResult1a.row, rowAname); // This used to be '1'. I don't know why when we are asking for two columns // and when the mutations above would seem to add two columns to the row. // -- St.Ack 05/12/2009 assertEquals(rowResult1a.columns.size(), 1); - assertTrue(Bytes.equals(rowResult1a.columns.get(columnBname).value, valueCname)); + assertEquals(rowResult1a.columns.get(columnBname).value, valueCname); TRowResult rowResult1b = handler.scannerGet(scanner1).get(0); - assertTrue(Bytes.equals(rowResult1b.row, rowBname)); + assertEquals(rowResult1b.row, rowBname); assertEquals(rowResult1b.columns.size(), 2); - assertTrue(Bytes.equals(rowResult1b.columns.get(columnAname).value, valueCname)); - assertTrue(Bytes.equals(rowResult1b.columns.get(columnBname).value, valueDname)); + assertEquals(rowResult1b.columns.get(columnAname).value, valueCname); + assertEquals(rowResult1b.columns.get(columnBname).value, valueDname); closeScanner(scanner1, handler); // Test a scanner on all rows and all columns, with timestamp @@ -286,7 +290,7 @@ public class TestThriftServer extends HBaseClusterTestCase { assertEquals(rowResult2a.columns.size(), 1); // column A deleted, does not exist. //assertTrue(Bytes.equals(rowResult2a.columns.get(columnAname).value, valueAname)); - assertTrue(Bytes.equals(rowResult2a.columns.get(columnBname).value, valueBname)); + assertEquals(rowResult2a.columns.get(columnBname).value, valueBname); closeScanner(scanner2, handler); // Test a scanner on the first row and first column only, no timestamp @@ -299,7 +303,7 @@ public class TestThriftServer extends HBaseClusterTestCase { getColumnList(false, true), time1); TRowResult rowResult4a = handler.scannerGet(scanner4).get(0); assertEquals(rowResult4a.columns.size(), 1); - assertTrue(Bytes.equals(rowResult4a.columns.get(columnBname).value, valueBname)); + assertEquals(rowResult4a.columns.get(columnBname).value, valueBname); // Teardown handler.disableTable(tableAname); @@ -333,8 +337,8 @@ public class TestThriftServer extends HBaseClusterTestCase { * @param includeB whether or not to include columnB * @return a List of column names for use in retrieving a scanner */ - private List getColumnList(boolean includeA, boolean includeB) { - List columnList = new ArrayList(); + private List getColumnList(boolean includeA, boolean includeB) { + List columnList = new ArrayList(); if (includeA) columnList.add(columnAname); if (includeB) columnList.add(columnBname); return columnList;