Index: src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java =================================================================== --- src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java (revision 1076484) +++ src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java (working copy) @@ -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 @@ */ 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 @@ 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 @@ // 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 @@ 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 @@ 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 @@ // 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 @@ 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 @@ 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 @@ * @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; Index: src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java (revision 1076484) +++ src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java (working copy) @@ -22,6 +22,7 @@ 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; @@ -83,6 +84,8 @@ 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. @@ -135,7 +138,7 @@ * @throws IOException * @throws IOError */ - protected HTable getTable(final byte[] tableName) throws IOError, + protected HTable getTable(final byte[] tableName) throws IOException { String table = new String(tableName); Map tables = threadLocalTables.get(); @@ -145,6 +148,10 @@ 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. @@ -181,7 +188,7 @@ /** * Constructs an HBaseHandler object. - * @throws IOException + * @throws IOException */ HBaseHandler() throws IOException { @@ -195,33 +202,37 @@ 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) { @@ -229,9 +240,10 @@ } } - 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) { @@ -239,12 +251,13 @@ } } - 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) { @@ -252,7 +265,8 @@ } } - public List getTableRegions(byte[] tableName) + @Override + public List getTableRegions(ByteBuffer tableName) throws IOError { try{ HTable table = getTable(tableName); @@ -261,10 +275,10 @@ 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); } @@ -275,20 +289,23 @@ } @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 { @@ -302,20 +319,24 @@ } @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); @@ -326,9 +347,13 @@ } @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); @@ -337,11 +362,12 @@ 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); @@ -352,38 +378,42 @@ } } - 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); - for(byte [] column : columnArr) { - byte [][] famAndQf = KeyValue.parseColumn(column); + Get get = new Get(getBytes(row)); + for(ByteBuffer column : columns) { + byte [][] famAndQf = KeyValue.parseColumn(getBytes(column)); if (famAndQf.length == 1) { get.addFamily(famAndQf[0]); } else { @@ -398,35 +428,43 @@ } } - public List getRows(byte[] tableName, List rows) + @Override + public List getRows(ByteBuffer tableName, + List rows) throws IOError { return getRowsWithColumnsTs(tableName, rows, null, HConstants.LATEST_TIMESTAMP); } - public List getRowsWithColumns(byte[] tableName, List rows, - List columns) throws IOError { + @Override + public List getRowsWithColumns(ByteBuffer tableName, + List rows, + List columns) throws IOError { return getRowsWithColumnsTs(tableName, rows, columns, HConstants.LATEST_TIMESTAMP); } - public List getRowsTs(byte[] tableName, List rows, + @Override + public List getRowsTs(ByteBuffer tableName, + List rows, long timestamp) throws IOError { return getRowsWithColumnsTs(tableName, rows, null, timestamp); } - public List getRowsWithColumnsTs(byte[] tableName, List rows, - List columns, long timestamp) throws IOError { + @Override + public List getRowsWithColumnsTs(ByteBuffer tableName, + List rows, + List columns, long timestamp) throws IOError { try { List gets = new ArrayList(rows.size()); HTable table = getTable(tableName); - for (byte[] row : rows) { - Get get = new Get(row); + for (ByteBuffer row : rows) { + Get get = new Get(getBytes(row)); if (columns != null) { - byte[][] columnArr = columns.toArray(new byte[columns.size()][]); - for(byte [] column : columnArr) { - byte [][] famAndQf = KeyValue.parseColumn(column); + + for(ByteBuffer column : columns) { + byte [][] famAndQf = KeyValue.parseColumn(getBytes(column)); if (famAndQf.length == 1) { get.addFamily(famAndQf[0]); } else { @@ -444,17 +482,21 @@ } } - 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 { @@ -467,24 +509,28 @@ } } - 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"); @@ -502,9 +548,11 @@ } } - 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)) { @@ -516,23 +564,25 @@ } } - 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); @@ -541,9 +591,9 @@ } } 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)); } } } @@ -558,23 +608,25 @@ } } - 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) { @@ -584,9 +636,9 @@ } } 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)); } } } @@ -612,9 +664,10 @@ } @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); @@ -622,13 +675,13 @@ return atomicIncrement(tableName, row, famAndQf[0], famAndQf[1], amount); } - 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()); } @@ -644,6 +697,7 @@ removeScanner(id); } + @Override public List scannerGetList(int id,int nbRows) throws IllegalArgument, IOError { LOG.debug("scannerGetList: id=" + id); ResultScanner scanner = getScanner(id); @@ -662,17 +716,19 @@ } 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 { @@ -686,14 +742,15 @@ } } - 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 { @@ -708,16 +765,19 @@ } @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 { @@ -731,15 +791,16 @@ } } - 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 { @@ -753,16 +814,17 @@ } } - 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 { @@ -777,11 +839,12 @@ } } - 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(); Index: src/main/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java (revision 1076484) +++ src/main/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java (working copy) @@ -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 @@ 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 @@ */ 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 @@ 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 @@ 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 @@ 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; } Index: src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java (revision 1076484) +++ src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java (working copy) @@ -1,23 +1,10 @@ /** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Autogenerated by Thrift * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.hbase.thrift.generated; -import org.apache.commons.lang.builder.HashCodeBuilder; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,18 +15,21 @@ 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); @@ -47,8 +37,8 @@ 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 { @@ -56,12 +46,10 @@ 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); } } @@ -70,7 +58,16 @@ * 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; + } } /** @@ -111,16 +108,16 @@ 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, + 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))); - put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); - - static { + 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); } @@ -131,8 +128,8 @@ public Mutation( boolean isDelete, - byte[] column, - byte[] value) + ByteBuffer column, + ByteBuffer value) { this(); this.isDelete = isDelete; @@ -160,9 +157,12 @@ 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() { @@ -189,10 +189,20 @@ } 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; } @@ -213,10 +223,20 @@ } 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; } @@ -250,7 +270,7 @@ if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; @@ -258,17 +278,13 @@ 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: @@ -284,12 +300,12 @@ 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(); @@ -301,10 +317,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -332,7 +344,7 @@ 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; } @@ -341,7 +353,7 @@ 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; } @@ -350,24 +362,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_isDelete = true; - builder.append(present_isDelete); - if (present_isDelete) - builder.append(isDelete); - - boolean present_column = true && (isSetColumn()); - builder.append(present_column); - if (present_column) - builder.append(column); - - boolean present_value = true && (isSetValue()); - builder.append(present_value); - if (present_value) - builder.append(value); - - return builder.toHashCode(); + return 0; } public int compareTo(Mutation other) { @@ -378,72 +373,79 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); Index: src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java (revision 1076484) +++ src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java (working copy) @@ -1,35 +1,36 @@ /** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Autogenerated by Thrift * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.hbase.thrift.generated; -import org.apache.commons.lang.builder.HashCodeBuilder; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.apache.thrift.*; -import org.apache.thrift.meta_data.FieldMetaData; -import org.apache.thrift.meta_data.FieldValueMetaData; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -import java.util.*; - /** * 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); @@ -40,12 +41,10 @@ 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); } } @@ -54,7 +53,12 @@ * 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; + } } /** @@ -93,12 +97,12 @@ // 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(AlreadyExists.class, metaDataMap); } @@ -125,9 +129,9 @@ return new AlreadyExists(this); } - @Deprecated - public AlreadyExists clone() { - return new AlreadyExists(this); + @Override + public void clear() { + this.message = null; } public String getMessage() { @@ -167,10 +171,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case MESSAGE: @@ -180,12 +180,12 @@ 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(); @@ -193,10 +193,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -224,14 +220,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_message = true && (isSetMessage()); - builder.append(present_message); - if (present_message) - builder.append(message); - - return builder.toHashCode(); + return 0; } public int compareTo(AlreadyExists other) { @@ -242,41 +231,44 @@ int lastComparison = 0; AlreadyExists typedOther = (AlreadyExists)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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); Index: src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java (revision 1076484) +++ src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java (working copy) @@ -1,23 +1,10 @@ /** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Autogenerated by Thrift * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.hbase.thrift.generated; -import org.apache.commons.lang.builder.HashCodeBuilder; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,12 +15,15 @@ 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.*; /** @@ -41,7 +31,7 @@ * 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); @@ -52,12 +42,10 @@ 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); } } @@ -66,7 +54,12 @@ * 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; + } } /** @@ -105,12 +98,12 @@ // 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); } @@ -137,9 +130,9 @@ return new IOError(this); } - @Deprecated - public IOError clone() { - return new IOError(this); + @Override + public void clear() { + this.message = null; } public String getMessage() { @@ -179,10 +172,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case MESSAGE: @@ -192,12 +181,12 @@ 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(); @@ -205,10 +194,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -236,14 +221,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_message = true && (isSetMessage()); - builder.append(present_message); - if (present_message) - builder.append(message); - - return builder.toHashCode(); + return 0; } public int compareTo(IOError other) { @@ -254,41 +232,44 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); Index: src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java (revision 1076484) +++ src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java (working copy) @@ -1,23 +1,10 @@ /** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Autogenerated by Thrift * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.hbase.thrift.generated; -import org.apache.commons.lang.builder.HashCodeBuilder; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,24 +15,27 @@ 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 BatchMutation object is used to apply a number of Mutations to a single row. */ -public class BatchMutation 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. */ @@ -53,12 +43,10 @@ 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); } } @@ -67,7 +55,14 @@ * 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; + } } /** @@ -106,15 +101,15 @@ // 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, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Mutation.class)))); - }}); - + 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)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(BatchMutation.class, metaDataMap); } @@ -122,7 +117,7 @@ } public BatchMutation( - byte[] row, + ByteBuffer row, List mutations) { this(); @@ -150,16 +145,27 @@ 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; } @@ -224,7 +230,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -239,10 +245,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ROW: @@ -255,12 +257,12 @@ 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(); @@ -270,10 +272,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -292,7 +290,7 @@ 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; } @@ -310,19 +308,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - boolean present_mutations = true && (isSetMutations()); - builder.append(present_mutations); - if (present_mutations) - builder.append(mutations); - - return builder.toHashCode(); + return 0; } public int compareTo(BatchMutation other) { @@ -333,67 +319,72 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); Index: src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java (revision 1076484) +++ src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java (working copy) @@ -1,23 +1,10 @@ /** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Autogenerated by Thrift * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.hbase.thrift.generated; -import org.apache.commons.lang.builder.HashCodeBuilder; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,12 +15,15 @@ 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 { @@ -42,465 +32,465 @@ /** * Brings a table on-line (enables it) - * + * * @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 * will tell the servers to stop serving it. - * + * * @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. - * + * * @return list of column family descriptors - * + * * @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. - * + * * @return list of region descriptors - * + * * @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 * field for each ColumnDescriptor must be set and must end in a * colon (:). All other fields are optional and will get default * values if not explicitly specified. - * + * * @throws IllegalArgument if an input parameter is invalid - * + * * @throws AlreadyExists if the table name already exists - * + * * @param tableName name of table to create - * + * * @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 - * + * * @throws IOError if table doesn't exist on server or there was some other * problem - * + * * @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 * latest timestamp. Returns an empty list if no such value exists. - * + * * @return value for specified row/column - * + * * @param tableName name of table - * + * * @param row row key - * + * * @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, * row, and column. - * + * * @return list of cells for specified row/column - * + * * @param tableName name of table - * + * * @param row row key - * + * * @param column column name - * + * * @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, * row, and column. Only versions less than or equal to the specified * timestamp will be returned. - * + * * @return list of cells for specified row/column - * + * * @param tableName name of table - * + * * @param row row key - * + * * @param column column name - * + * * @param timestamp timestamp - * + * * @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 * timestamp. Returns an empty list if the row does not exist. - * + * * @return TRowResult containing the row and map of columns to TCells - * + * * @param tableName name of table - * + * * @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 * timestamp. Returns an empty list if the row does not exist. - * + * * @return TRowResult containing the row and map of columns to TCells - * + * * @param tableName name of table - * + * * @param row row key - * + * * @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 * timestamp. Returns an empty list if the row does not exist. - * + * * @return TRowResult containing the row and map of columns to TCells - * + * * @param tableName name of the table - * + * * @param row row key - * + * * @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 * timestamp. Returns an empty list if the row does not exist. - * + * * @return TRowResult containing the row and map of columns to TCells - * + * * @param tableName name of table - * + * * @param row row key - * + * * @param columns List of columns to return, null for all columns - * + * * @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; /** * Get all the data for the specified table and rows at the latest * timestamp. Returns an empty list if no rows exist. - * + * * @return TRowResult containing the rows and map of columns to TCells - * + * * @param tableName name of table - * + * * @param rows row keys */ - public List getRows(byte[] tableName, List rows) throws IOError, TException; + public List getRows(ByteBuffer tableName, List rows) throws IOError, TException; /** * Get the specified columns for the specified table and rows at the latest * timestamp. Returns an empty list if no rows exist. - * + * * @return TRowResult containing the rows and map of columns to TCells - * + * * @param tableName name of table - * + * * @param rows row keys - * + * * @param columns List of columns to return, null for all columns */ - public List getRowsWithColumns(byte[] tableName, List rows, List columns) throws IOError, TException; + public List getRowsWithColumns(ByteBuffer tableName, List rows, List columns) throws IOError, TException; /** * Get all the data for the specified table and rows at the specified * timestamp. Returns an empty list if no rows exist. - * + * * @return TRowResult containing the rows and map of columns to TCells - * + * * @param tableName name of the table - * + * * @param rows row keys - * + * * @param timestamp timestamp */ - public List getRowsTs(byte[] tableName, List rows, long timestamp) throws IOError, TException; + public List getRowsTs(ByteBuffer tableName, List rows, long timestamp) throws IOError, TException; /** * Get the specified columns for the specified table and rows at the specified * timestamp. Returns an empty list if no rows exist. - * + * * @return TRowResult containing the rows and map of columns to TCells - * + * * @param tableName name of table - * + * * @param rows row keys - * + * * @param columns List of columns to return, null for all columns - * + * * @param timestamp */ - public List getRowsWithColumnsTs(byte[] tableName, List rows, List columns, long timestamp) throws IOError, TException; + public List getRowsWithColumnsTs(ByteBuffer tableName, List rows, List columns, long timestamp) throws IOError, TException; /** * Apply a series of mutations (updates/deletes) to a row in a * single transaction. If an exception is thrown, then the * transaction is aborted. Default current timestamp is used, and * all entries will have an identical timestamp. - * + * * @param tableName name of table - * + * * @param row row key - * + * * @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 * single transaction. If an exception is thrown, then the * transaction is aborted. The specified timestamp is used, and * all entries will have an identical timestamp. - * + * * @param tableName name of table - * + * * @param row row key - * + * * @param mutations list of mutation commands - * + * * @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) * in a single transaction. If an exception is thrown, then the * transaction is aborted. Default current timestamp is used, and * all entries will have an identical timestamp. - * + * * @param tableName name of table - * + * * @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) * in a single transaction. If an exception is thrown, then the * transaction is aborted. The specified timestamp is used, and * all entries will have an identical timestamp. - * + * * @param tableName name of table - * + * * @param rowBatches list of row batches - * + * * @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. - * + * * @param tableName name of table - * + * * @param row row to increment - * + * * @param column name of column - * + * * @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; /** * Delete all cells that match the passed row and column. - * + * * @param tableName name of table - * + * * @param row Row to update - * + * * @param column name of column whose value is to be deleted */ - 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 * timestamp is equal-to or older than the passed timestamp. - * + * * @param tableName name of table - * + * * @param row Row to update - * + * * @param column name of column whose value is to be deleted - * + * * @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. - * + * * @param tableName name of table - * + * * @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 * equal-to or older than the passed timestamp. - * + * * @param tableName name of table - * + * * @param row key of the row to be completely deleted. - * + * * @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 * ending at the last row in the table. Return the specified columns. - * + * * @return scanner id to be used with other scanner procedures - * + * * @param tableName name of table - * + * * @param startRow Starting row in table to scan. * Send "" (empty string) to start at the first row. - * + * * @param columns 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 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 * specified rows. ending at the last row in the table. Return the * specified columns. - * + * * @return scanner id to be used with other scanner procedures - * + * * @param tableName name of table - * + * * @param startRow Starting row in table to scan. * Send "" (empty string) to start at the first row. - * + * * @param stopRow row to stop scanning on. This row is *not* included in the * scanner's results - * + * * @param columns 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 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 * prefix. No other rows will be returned. - * + * * @return scanner id to use with other scanner calls - * + * * @param tableName name of table - * + * * @param startAndPrefix the prefix (and thus start row) of the keys you want - * + * * @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 * ending at the last row in the table. Return the specified columns. * Only values with the specified timestamp are returned. - * + * * @return scanner id to be used with other scanner procedures - * + * * @param tableName name of table - * + * * @param startRow Starting row in table to scan. * Send "" (empty string) to start at the first row. - * + * * @param columns 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. - * + * * @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 * specified rows. ending at the last row in the table. Return the * specified columns. Only values with the specified timestamp are * returned. - * + * * @return scanner id to be used with other scanner procedures - * + * * @param tableName name of table - * + * * @param startRow Starting row in table to scan. * Send "" (empty string) to start at the first row. - * + * * @param stopRow row to stop scanning on. This row is *not* included in the * scanner's results - * + * * @param columns 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. - * + * * @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 * row in the table. When there are no more rows in the table, or a key * greater-than-or-equal-to the scanner's specified stopRow is reached, * an empty list is returned. - * + * * @return a TRowResult containing the current row and a map of the columns to TCells. - * + * * @throws IllegalArgument if ScannerID is invalid - * + * * @throws NotFound when the scanner reaches the end - * + * * @param id id of a scanner returned by scannerOpen */ public List scannerGet(int id) throws IOError, IllegalArgument, TException; @@ -510,31 +500,121 @@ * rows and advances to the next row in the table. When there are no more * rows in the table, or a key greater-than-or-equal-to the scanner's * specified stopRow is reached, an empty list is returned. - * + * * @return a TRowResult containing the current row and a map of the columns to TCells. - * + * * @throws IllegalArgument if ScannerID is invalid - * + * * @throws NotFound when the scanner reaches the end - * + * * @param id id of a scanner returned by scannerOpen - * + * * @param nbRows number of results to return */ public List scannerGetList(int id, int nbRows) throws IOError, IllegalArgument, TException; /** * Closes the server-state associated with an open scanner. - * + * * @throws IllegalArgument if ScannerID is invalid - * + * * @param id id of a scanner returned by scannerOpen */ public void scannerClose(int id) throws IOError, IllegalArgument, 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 getRows(ByteBuffer tableName, List rows, AsyncMethodCallback resultHandler) throws TException; + + public void getRowsWithColumns(ByteBuffer tableName, List rows, List columns, AsyncMethodCallback resultHandler) throws TException; + + public void getRowsTs(ByteBuffer tableName, List rows, long timestamp, AsyncMethodCallback resultHandler) throws TException; + + public void getRowsWithColumnsTs(ByteBuffer tableName, List rows, 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 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 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); @@ -561,17 +641,17 @@ 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(); @@ -585,6 +665,9 @@ 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(); @@ -594,17 +677,17 @@ 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(); @@ -618,6 +701,9 @@ 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(); @@ -627,17 +713,17 @@ 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(); @@ -651,6 +737,9 @@ 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(); @@ -663,17 +752,17 @@ 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(); @@ -687,6 +776,9 @@ 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(); @@ -696,17 +788,17 @@ 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(); @@ -720,6 +812,9 @@ 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(); @@ -729,7 +824,7 @@ return; } - public List getTableNames() throws IOError, TException + public List getTableNames() throws IOError, TException { send_getTableNames(); return recv_getTableNames(); @@ -737,14 +832,14 @@ 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) { @@ -752,6 +847,9 @@ 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(); @@ -764,23 +862,23 @@ 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) { @@ -788,6 +886,9 @@ 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(); @@ -800,17 +901,17 @@ 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(); @@ -824,6 +925,9 @@ 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(); @@ -836,18 +940,18 @@ 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(); @@ -861,6 +965,9 @@ 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(); @@ -876,17 +983,17 @@ 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(); @@ -900,6 +1007,9 @@ 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(); @@ -909,19 +1019,19 @@ 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(); @@ -935,6 +1045,9 @@ 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(); @@ -947,20 +1060,20 @@ 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(); @@ -974,6 +1087,9 @@ 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(); @@ -986,21 +1102,21 @@ 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(); @@ -1014,6 +1130,9 @@ 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(); @@ -1026,18 +1145,18 @@ 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(); @@ -1051,6 +1170,9 @@ 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(); @@ -1063,19 +1185,19 @@ 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(); @@ -1089,6 +1211,9 @@ 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(); @@ -1101,19 +1226,19 @@ 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(); @@ -1127,6 +1252,9 @@ 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(); @@ -1139,20 +1267,20 @@ 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(); @@ -1166,6 +1294,9 @@ 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(); @@ -1178,18 +1309,18 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRowWithColumnsTs failed: unknown result"); } - public List getRows(byte[] tableName, List rows) throws IOError, TException + public List getRows(ByteBuffer tableName, List rows) throws IOError, TException { send_getRows(tableName, rows); return recv_getRows(); } - public void send_getRows(byte[] tableName, List rows) throws TException + public void send_getRows(ByteBuffer tableName, List rows) throws TException { - oprot_.writeMessageBegin(new TMessage("getRows", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getRows", TMessageType.CALL, ++seqid_)); getRows_args args = new getRows_args(); - args.tableName = tableName; - args.rows = rows; + args.setTableName(tableName); + args.setRows(rows); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1203,6 +1334,9 @@ iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getRows failed: out of sequence response"); + } getRows_result result = new getRows_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1215,19 +1349,19 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRows failed: unknown result"); } - public List getRowsWithColumns(byte[] tableName, List rows, List columns) throws IOError, TException + public List getRowsWithColumns(ByteBuffer tableName, List rows, List columns) throws IOError, TException { send_getRowsWithColumns(tableName, rows, columns); return recv_getRowsWithColumns(); } - public void send_getRowsWithColumns(byte[] tableName, List rows, List columns) throws TException + public void send_getRowsWithColumns(ByteBuffer tableName, List rows, List columns) throws TException { - oprot_.writeMessageBegin(new TMessage("getRowsWithColumns", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getRowsWithColumns", TMessageType.CALL, ++seqid_)); getRowsWithColumns_args args = new getRowsWithColumns_args(); - args.tableName = tableName; - args.rows = rows; - args.columns = columns; + args.setTableName(tableName); + args.setRows(rows); + args.setColumns(columns); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1241,6 +1375,9 @@ iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getRowsWithColumns failed: out of sequence response"); + } getRowsWithColumns_result result = new getRowsWithColumns_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1253,19 +1390,19 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRowsWithColumns failed: unknown result"); } - public List getRowsTs(byte[] tableName, List rows, long timestamp) throws IOError, TException + public List getRowsTs(ByteBuffer tableName, List rows, long timestamp) throws IOError, TException { send_getRowsTs(tableName, rows, timestamp); return recv_getRowsTs(); } - public void send_getRowsTs(byte[] tableName, List rows, long timestamp) throws TException + public void send_getRowsTs(ByteBuffer tableName, List rows, long timestamp) throws TException { - oprot_.writeMessageBegin(new TMessage("getRowsTs", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getRowsTs", TMessageType.CALL, ++seqid_)); getRowsTs_args args = new getRowsTs_args(); - args.tableName = tableName; - args.rows = rows; - args.timestamp = timestamp; + args.setTableName(tableName); + args.setRows(rows); + args.setTimestamp(timestamp); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1279,6 +1416,9 @@ iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getRowsTs failed: out of sequence response"); + } getRowsTs_result result = new getRowsTs_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1291,20 +1431,20 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRowsTs failed: unknown result"); } - public List getRowsWithColumnsTs(byte[] tableName, List rows, List columns, long timestamp) throws IOError, TException + public List getRowsWithColumnsTs(ByteBuffer tableName, List rows, List columns, long timestamp) throws IOError, TException { send_getRowsWithColumnsTs(tableName, rows, columns, timestamp); return recv_getRowsWithColumnsTs(); } - public void send_getRowsWithColumnsTs(byte[] tableName, List rows, List columns, long timestamp) throws TException + public void send_getRowsWithColumnsTs(ByteBuffer tableName, List rows, List columns, long timestamp) throws TException { - oprot_.writeMessageBegin(new TMessage("getRowsWithColumnsTs", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getRowsWithColumnsTs", TMessageType.CALL, ++seqid_)); getRowsWithColumnsTs_args args = new getRowsWithColumnsTs_args(); - args.tableName = tableName; - args.rows = rows; - args.columns = columns; - args.timestamp = timestamp; + args.setTableName(tableName); + args.setRows(rows); + args.setColumns(columns); + args.setTimestamp(timestamp); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1318,6 +1458,9 @@ iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getRowsWithColumnsTs failed: out of sequence response"); + } getRowsWithColumnsTs_result result = new getRowsWithColumnsTs_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1330,19 +1473,19 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRowsWithColumnsTs 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(); @@ -1356,6 +1499,9 @@ 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(); @@ -1368,20 +1514,20 @@ 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(); @@ -1395,6 +1541,9 @@ 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(); @@ -1407,18 +1556,18 @@ 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(); @@ -1432,6 +1581,9 @@ 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(); @@ -1444,19 +1596,19 @@ 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(); @@ -1470,6 +1622,9 @@ 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(); @@ -1482,20 +1637,20 @@ 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(); @@ -1509,6 +1664,9 @@ 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(); @@ -1524,19 +1682,19 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "atomicIncrement failed: unknown result"); } - 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(); @@ -1550,6 +1708,9 @@ 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(); @@ -1559,20 +1720,20 @@ 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(); @@ -1586,6 +1747,9 @@ 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(); @@ -1595,18 +1759,18 @@ 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(); @@ -1620,6 +1784,9 @@ 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(); @@ -1629,19 +1796,19 @@ 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(); @@ -1655,6 +1822,9 @@ 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(); @@ -1664,19 +1834,19 @@ 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(); @@ -1690,6 +1860,9 @@ 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(); @@ -1702,20 +1875,20 @@ 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(); @@ -1729,6 +1902,9 @@ 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(); @@ -1741,19 +1917,19 @@ 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(); @@ -1767,6 +1943,9 @@ 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(); @@ -1779,20 +1958,20 @@ 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(); @@ -1806,6 +1985,9 @@ 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(); @@ -1818,21 +2000,21 @@ 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(); @@ -1846,6 +2028,9 @@ 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(); @@ -1866,9 +2051,9 @@ 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(); @@ -1882,6 +2067,9 @@ 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(); @@ -1905,10 +2093,10 @@ 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(); @@ -1922,6 +2110,9 @@ 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(); @@ -1945,9 +2136,9 @@ 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(); @@ -1961,6 +2152,9 @@ 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(); @@ -1974,6 +2168,1380 @@ } } + 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 getRows(ByteBuffer tableName, List rows, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getRows_call method_call = new getRows_call(tableName, rows, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getRows_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private List rows; + public getRows_call(ByteBuffer tableName, List rows, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.rows = rows; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getRows", TMessageType.CALL, 0)); + getRows_args args = new getRows_args(); + args.setTableName(tableName); + 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_getRows(); + } + } + + public void getRowsWithColumns(ByteBuffer tableName, List rows, List columns, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getRowsWithColumns_call method_call = new getRowsWithColumns_call(tableName, rows, columns, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getRowsWithColumns_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private List rows; + private List columns; + public getRowsWithColumns_call(ByteBuffer tableName, List rows, List columns, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.rows = rows; + this.columns = columns; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getRowsWithColumns", TMessageType.CALL, 0)); + getRowsWithColumns_args args = new getRowsWithColumns_args(); + args.setTableName(tableName); + args.setRows(rows); + 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_getRowsWithColumns(); + } + } + + public void getRowsTs(ByteBuffer tableName, List rows, long timestamp, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getRowsTs_call method_call = new getRowsTs_call(tableName, rows, timestamp, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getRowsTs_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private List rows; + private long timestamp; + public getRowsTs_call(ByteBuffer tableName, List rows, long timestamp, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.rows = rows; + this.timestamp = timestamp; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getRowsTs", TMessageType.CALL, 0)); + getRowsTs_args args = new getRowsTs_args(); + args.setTableName(tableName); + args.setRows(rows); + 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_getRowsTs(); + } + } + + public void getRowsWithColumnsTs(ByteBuffer tableName, List rows, List columns, long timestamp, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getRowsWithColumnsTs_call method_call = new getRowsWithColumnsTs_call(tableName, rows, columns, timestamp, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getRowsWithColumnsTs_call extends TAsyncMethodCall { + private ByteBuffer tableName; + private List rows; + private List columns; + private long timestamp; + public getRowsWithColumnsTs_call(ByteBuffer tableName, List rows, List columns, long timestamp, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.rows = rows; + this.columns = columns; + this.timestamp = timestamp; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getRowsWithColumnsTs", TMessageType.CALL, 0)); + getRowsWithColumnsTs_args args = new getRowsWithColumnsTs_args(); + args.setTableName(tableName); + args.setRows(rows); + 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_getRowsWithColumnsTs(); + } + } + + 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 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 static class Processor implements TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(Iface iface) @@ -2048,7 +3616,17 @@ 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 { @@ -2076,7 +3654,17 @@ 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 { @@ -2104,7 +3692,17 @@ 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 { @@ -2133,7 +3731,17 @@ 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 { @@ -2161,7 +3769,17 @@ 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 { @@ -2189,7 +3807,17 @@ 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 { @@ -2217,7 +3845,17 @@ 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 { @@ -2245,7 +3883,17 @@ 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 { @@ -2273,7 +3921,17 @@ 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 { @@ -2305,7 +3963,17 @@ 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 { @@ -2333,7 +4001,17 @@ 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 { @@ -2361,7 +4039,17 @@ 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 { @@ -2389,7 +4077,17 @@ 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 { @@ -2417,7 +4115,17 @@ 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 { @@ -2445,7 +4153,17 @@ 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 { @@ -2473,7 +4191,17 @@ 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 { @@ -2501,7 +4229,17 @@ 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 { @@ -2529,7 +4267,17 @@ public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getRows_args args = new getRows_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("getRows", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getRows_result result = new getRows_result(); try { @@ -2557,7 +4305,17 @@ public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getRowsWithColumns_args args = new getRowsWithColumns_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("getRowsWithColumns", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getRowsWithColumns_result result = new getRowsWithColumns_result(); try { @@ -2585,7 +4343,17 @@ public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getRowsTs_args args = new getRowsTs_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("getRowsTs", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getRowsTs_result result = new getRowsTs_result(); try { @@ -2613,7 +4381,17 @@ public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getRowsWithColumnsTs_args args = new getRowsWithColumnsTs_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("getRowsWithColumnsTs", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getRowsWithColumnsTs_result result = new getRowsWithColumnsTs_result(); try { @@ -2641,7 +4419,17 @@ 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 { @@ -2671,7 +4459,17 @@ 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 { @@ -2701,7 +4499,17 @@ 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 { @@ -2731,7 +4539,17 @@ 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 { @@ -2761,7 +4579,17 @@ 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 { @@ -2792,7 +4620,17 @@ 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 { @@ -2820,7 +4658,17 @@ 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 { @@ -2848,7 +4696,17 @@ 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 { @@ -2876,7 +4734,17 @@ 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 { @@ -2904,7 +4772,17 @@ 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 { @@ -2933,7 +4811,17 @@ 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 { @@ -2962,7 +4850,17 @@ 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 { @@ -2991,7 +4889,17 @@ 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 { @@ -3020,7 +4928,17 @@ 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 { @@ -3049,7 +4967,17 @@ 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 { @@ -3079,7 +5007,17 @@ 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 { @@ -3109,7 +5047,17 @@ 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 { @@ -3137,7 +5085,7 @@ } - 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); @@ -3145,7 +5093,7 @@ /** * 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 { @@ -3154,12 +5102,10 @@ */ 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); } } @@ -3168,7 +5114,12 @@ * 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; + } } /** @@ -3207,12 +5158,12 @@ // 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); } @@ -3220,7 +5171,7 @@ } public enableTable_args( - byte[] tableName) + ByteBuffer tableName) { this(); this.tableName = tableName; @@ -3239,22 +5190,32 @@ 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; } @@ -3280,17 +5241,13 @@ 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: @@ -3300,12 +5257,12 @@ 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(); @@ -3313,10 +5270,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -3335,7 +5288,7 @@ 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; } @@ -3344,14 +5297,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - return builder.toHashCode(); + return 0; } public int compareTo(enableTable_args other) { @@ -3362,41 +5308,44 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -3439,7 +5388,7 @@ } - 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); @@ -3450,12 +5399,10 @@ 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); } } @@ -3464,7 +5411,12 @@ * 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; + } } /** @@ -3503,12 +5455,12 @@ // 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(enableTable_result.class, metaDataMap); } @@ -3535,9 +5487,9 @@ 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() { @@ -3577,10 +5529,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -3590,12 +5538,12 @@ 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(); @@ -3603,10 +5551,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -3634,14 +5578,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(enableTable_result other) { @@ -3652,42 +5589,45 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -3729,7 +5669,7 @@ } - 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); @@ -3737,7 +5677,7 @@ /** * 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 { @@ -3746,12 +5686,10 @@ */ 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); } } @@ -3760,7 +5698,12 @@ * 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; + } } /** @@ -3799,12 +5742,12 @@ // 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); } @@ -3812,7 +5755,7 @@ } public disableTable_args( - byte[] tableName) + ByteBuffer tableName) { this(); this.tableName = tableName; @@ -3831,22 +5774,32 @@ 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; } @@ -3872,17 +5825,13 @@ 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: @@ -3892,12 +5841,12 @@ 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(); @@ -3905,10 +5854,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -3927,7 +5872,7 @@ 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; } @@ -3936,14 +5881,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - return builder.toHashCode(); + return 0; } public int compareTo(disableTable_args other) { @@ -3954,41 +5892,44 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -4031,7 +5972,7 @@ } - 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); @@ -4042,12 +5983,10 @@ 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); } } @@ -4056,7 +5995,12 @@ * 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; + } } /** @@ -4095,12 +6039,12 @@ // 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(disableTable_result.class, metaDataMap); } @@ -4127,9 +6071,9 @@ 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() { @@ -4169,10 +6113,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -4182,12 +6122,12 @@ 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(); @@ -4195,10 +6135,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -4226,14 +6162,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(disableTable_result other) { @@ -4244,42 +6173,45 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -4321,7 +6253,7 @@ } - 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); @@ -4329,7 +6261,7 @@ /** * 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 { @@ -4338,12 +6270,10 @@ */ 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); } } @@ -4352,7 +6282,12 @@ * 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; + } } /** @@ -4391,12 +6326,12 @@ // 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); } @@ -4404,7 +6339,7 @@ } public isTableEnabled_args( - byte[] tableName) + ByteBuffer tableName) { this(); this.tableName = tableName; @@ -4423,22 +6358,32 @@ 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; } @@ -4464,17 +6409,13 @@ 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: @@ -4484,12 +6425,12 @@ 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(); @@ -4497,10 +6438,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -4519,7 +6456,7 @@ 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; } @@ -4528,14 +6465,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - return builder.toHashCode(); + return 0; } public int compareTo(isTableEnabled_args other) { @@ -4546,41 +6476,44 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -4623,7 +6556,7 @@ } - 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); @@ -4637,12 +6570,10 @@ 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); } } @@ -4651,7 +6582,14 @@ * 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; + } } /** @@ -4692,14 +6630,14 @@ 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); } @@ -4732,9 +6670,11 @@ 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() { @@ -4805,10 +6745,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -4821,12 +6757,12 @@ 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(); @@ -4836,10 +6772,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -4876,19 +6808,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_success = true; - builder.append(present_success); - if (present_success) - builder.append(success); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(isTableEnabled_result other) { @@ -4899,58 +6819,63 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -5000,23 +6925,21 @@ } - 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); } } @@ -5025,7 +6948,12 @@ * 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; + } } /** @@ -5064,12 +6992,12 @@ // 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); } @@ -5077,7 +7005,7 @@ } public compact_args( - byte[] tableNameOrRegionName) + ByteBuffer tableNameOrRegionName) { this(); this.tableNameOrRegionName = tableNameOrRegionName; @@ -5096,16 +7024,26 @@ 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; } @@ -5131,17 +7069,13 @@ 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: @@ -5151,12 +7085,12 @@ 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(); @@ -5164,10 +7098,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -5186,7 +7116,7 @@ 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; } @@ -5195,14 +7125,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableNameOrRegionName = true && (isSetTableNameOrRegionName()); - builder.append(present_tableNameOrRegionName); - if (present_tableNameOrRegionName) - builder.append(tableNameOrRegionName); - - return builder.toHashCode(); + return 0; } public int compareTo(compact_args other) { @@ -5213,41 +7136,44 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -5290,7 +7216,7 @@ } - 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); @@ -5301,12 +7227,10 @@ 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); } } @@ -5315,7 +7239,12 @@ * 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; + } } /** @@ -5354,12 +7283,12 @@ // 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(compact_result.class, metaDataMap); } @@ -5386,9 +7315,9 @@ 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() { @@ -5428,10 +7357,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -5441,12 +7366,12 @@ 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(); @@ -5454,10 +7379,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -5485,14 +7406,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(compact_result other) { @@ -5503,42 +7417,45 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -5580,23 +7497,21 @@ } - 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); } } @@ -5605,7 +7520,12 @@ * 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; + } } /** @@ -5644,12 +7564,12 @@ // 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); } @@ -5657,7 +7577,7 @@ } public majorCompact_args( - byte[] tableNameOrRegionName) + ByteBuffer tableNameOrRegionName) { this(); this.tableNameOrRegionName = tableNameOrRegionName; @@ -5676,16 +7596,26 @@ 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; } @@ -5711,17 +7641,13 @@ 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: @@ -5731,12 +7657,12 @@ 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(); @@ -5744,10 +7670,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -5766,7 +7688,7 @@ 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; } @@ -5775,14 +7697,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableNameOrRegionName = true && (isSetTableNameOrRegionName()); - builder.append(present_tableNameOrRegionName); - if (present_tableNameOrRegionName) - builder.append(tableNameOrRegionName); - - return builder.toHashCode(); + return 0; } public int compareTo(majorCompact_args other) { @@ -5793,41 +7708,44 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -5870,7 +7788,7 @@ } - 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); @@ -5881,12 +7799,10 @@ 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); } } @@ -5895,7 +7811,12 @@ * 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; + } } /** @@ -5934,12 +7855,12 @@ // 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(majorCompact_result.class, metaDataMap); } @@ -5966,9 +7887,9 @@ 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() { @@ -6008,10 +7929,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -6021,12 +7938,12 @@ 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(); @@ -6034,10 +7951,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -6065,14 +7978,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(majorCompact_result other) { @@ -6083,42 +7989,45 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -6160,7 +8069,7 @@ } - 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"); @@ -6169,12 +8078,10 @@ 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); } } @@ -6183,7 +8090,10 @@ * 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; + } } /** @@ -6219,10 +8129,10 @@ 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); } @@ -6239,9 +8149,8 @@ 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) { @@ -6249,31 +8158,23 @@ } } - 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) @@ -6292,9 +8193,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - return builder.toHashCode(); + return 0; } public int compareTo(getTableNames_args other) { @@ -6308,23 +8207,24 @@ return 0; } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -6355,13 +8255,13 @@ } - 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. */ @@ -6369,12 +8269,10 @@ 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); } } @@ -6383,7 +8281,14 @@ * 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; + } } /** @@ -6422,15 +8327,15 @@ // 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, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - 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.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + 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); } @@ -6438,7 +8343,7 @@ } public getTableNames_result( - List success, + List success, IOError io) { this(); @@ -6451,8 +8356,8 @@ */ 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; @@ -6466,31 +8371,32 @@ 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; } @@ -6540,7 +8446,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((List)value); } break; @@ -6555,10 +8461,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -6571,12 +8473,12 @@ 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(); @@ -6586,10 +8488,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -6626,19 +8524,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(getTableNames_result other) { @@ -6649,67 +8535,72 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -6724,7 +8615,7 @@ 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); } @@ -6770,7 +8661,7 @@ } - 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); @@ -6778,7 +8669,7 @@ /** * 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 { @@ -6787,12 +8678,10 @@ */ 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); } } @@ -6801,7 +8690,12 @@ * 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; + } } /** @@ -6840,12 +8734,12 @@ // 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); } @@ -6853,7 +8747,7 @@ } public getColumnDescriptors_args( - byte[] tableName) + ByteBuffer tableName) { this(); this.tableName = tableName; @@ -6872,22 +8766,32 @@ 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; } @@ -6913,17 +8817,13 @@ 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: @@ -6933,12 +8833,12 @@ 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(); @@ -6946,10 +8846,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -6968,7 +8864,7 @@ 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; } @@ -6977,14 +8873,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - return builder.toHashCode(); + return 0; } public int compareTo(getColumnDescriptors_args other) { @@ -6995,41 +8884,44 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -7072,13 +8964,13 @@ } - 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. */ @@ -7086,12 +8978,10 @@ 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); } } @@ -7100,7 +8990,14 @@ * 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; + } } /** @@ -7139,16 +9036,16 @@ // 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, - new MapMetaData(TType.MAP, - 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.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + 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); } @@ -7156,7 +9053,7 @@ } public getColumnDescriptors_result( - Map success, + Map success, IOError io) { this(); @@ -7169,13 +9066,13 @@ */ 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); @@ -7192,27 +9089,28 @@ 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; } @@ -7262,7 +9160,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((Map)value); + setSuccess((Map)value); } break; @@ -7277,10 +9175,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -7293,12 +9187,12 @@ 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(); @@ -7308,10 +9202,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -7348,66 +9238,86 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + return 0; + } - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); + public int compareTo(getColumnDescriptors_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); + int lastComparison = 0; + getColumnDescriptors_result typedOther = (getColumnDescriptors_result)other; - return builder.toHashCode(); + 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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); + iprot.readMapEnd(); } - 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(); @@ -7422,7 +9332,7 @@ 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); @@ -7469,7 +9379,7 @@ } - 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); @@ -7477,7 +9387,7 @@ /** * 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 { @@ -7486,12 +9396,10 @@ */ 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); } } @@ -7500,7 +9408,12 @@ * 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; + } } /** @@ -7539,12 +9452,12 @@ // 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); } @@ -7552,7 +9465,7 @@ } public getTableRegions_args( - byte[] tableName) + ByteBuffer tableName) { this(); this.tableName = tableName; @@ -7571,22 +9484,32 @@ 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; } @@ -7612,17 +9535,13 @@ 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: @@ -7632,12 +9551,12 @@ 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(); @@ -7645,10 +9564,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -7667,7 +9582,7 @@ 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; } @@ -7676,14 +9591,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - return builder.toHashCode(); + return 0; } public int compareTo(getTableRegions_args other) { @@ -7694,41 +9602,44 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -7771,7 +9682,7 @@ } - 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); @@ -7785,12 +9696,10 @@ 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); } } @@ -7799,7 +9708,14 @@ * 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; + } } /** @@ -7838,15 +9754,15 @@ // 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, - new ListMetaData(TType.LIST, + 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); } @@ -7882,9 +9798,10 @@ 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() { @@ -7971,10 +9888,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -7987,12 +9900,12 @@ 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(); @@ -8002,10 +9915,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -8042,19 +9951,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(getTableRegions_result other) { @@ -8065,68 +9962,73 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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); + 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(); @@ -8187,7 +10089,7 @@ } - 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); @@ -8196,7 +10098,7 @@ /** * name of table to create */ - public byte[] tableName; + public ByteBuffer tableName; /** * list of column family descriptors */ @@ -8213,12 +10115,10 @@ */ 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); } } @@ -8227,7 +10127,14 @@ * 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; + } } /** @@ -8266,15 +10173,15 @@ // 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, - new ListMetaData(TType.LIST, + 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); } @@ -8282,7 +10189,7 @@ } public createTable_args( - byte[] tableName, + ByteBuffer tableName, List columnFamilies) { this(); @@ -8310,22 +10217,33 @@ 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; } @@ -8396,7 +10314,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -8411,10 +10329,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -8427,12 +10341,12 @@ 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(); @@ -8442,10 +10356,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -8464,7 +10374,7 @@ 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; } @@ -8482,19 +10392,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_columnFamilies = true && (isSetColumnFamilies()); - builder.append(present_columnFamilies); - if (present_columnFamilies) - builder.append(columnFamilies); - - return builder.toHashCode(); + return 0; } public int compareTo(createTable_args other) { @@ -8505,67 +10403,72 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -8628,7 +10531,7 @@ } - 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); @@ -8645,12 +10548,10 @@ 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); } } @@ -8659,7 +10560,16 @@ * 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; + } } /** @@ -8698,16 +10608,16 @@ // 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); } @@ -8744,9 +10654,11 @@ 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() { @@ -8850,10 +10762,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -8869,12 +10777,12 @@ 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(); @@ -8886,10 +10794,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -8935,24 +10839,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - boolean present_ia = true && (isSetIa()); - builder.append(present_ia); - if (present_ia) - builder.append(ia); - - boolean present_exist = true && (isSetExist()); - builder.append(present_exist); - if (present_exist) - builder.append(exist); - - return builder.toHashCode(); + return 0; } public int compareTo(createTable_result other) { @@ -8963,74 +10850,81 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -9096,7 +10990,7 @@ } - 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); @@ -9104,7 +10998,7 @@ /** * 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 { @@ -9113,12 +11007,10 @@ */ 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); } } @@ -9127,7 +11019,12 @@ * 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; + } } /** @@ -9166,12 +11063,12 @@ // 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); } @@ -9179,7 +11076,7 @@ } public deleteTable_args( - byte[] tableName) + ByteBuffer tableName) { this(); this.tableName = tableName; @@ -9198,22 +11095,32 @@ 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; } @@ -9239,17 +11146,13 @@ 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: @@ -9259,12 +11162,12 @@ 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(); @@ -9272,10 +11175,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -9294,7 +11193,7 @@ 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; } @@ -9303,14 +11202,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - return builder.toHashCode(); + return 0; } public int compareTo(deleteTable_args other) { @@ -9321,41 +11213,44 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -9398,7 +11293,7 @@ } - 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); @@ -9409,12 +11304,10 @@ 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); } } @@ -9423,7 +11316,12 @@ * 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; + } } /** @@ -9462,12 +11360,12 @@ // 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteTable_result.class, metaDataMap); } @@ -9494,9 +11392,9 @@ 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() { @@ -9536,10 +11434,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -9549,12 +11443,12 @@ 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(); @@ -9562,10 +11456,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -9593,14 +11483,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(deleteTable_result other) { @@ -9611,42 +11494,45 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -9688,7 +11574,7 @@ } - 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); @@ -9698,15 +11584,15 @@ /** * 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 { @@ -9723,12 +11609,10 @@ */ 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); } } @@ -9737,7 +11621,16 @@ * 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; + } } /** @@ -9776,16 +11669,16 @@ // 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); } @@ -9793,9 +11686,9 @@ } public get_args( - byte[] tableName, - byte[] row, - byte[] column) + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column) { this(); this.tableName = tableName; @@ -9822,22 +11715,34 @@ 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; } @@ -9861,13 +11766,23 @@ * 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; } @@ -9891,13 +11806,23 @@ * 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; } @@ -9923,7 +11848,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -9931,7 +11856,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -9939,17 +11864,13 @@ 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: @@ -9965,12 +11886,12 @@ 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(); @@ -9982,10 +11903,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -10004,7 +11921,7 @@ 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; } @@ -10013,7 +11930,7 @@ 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; } @@ -10022,7 +11939,7 @@ 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; } @@ -10031,24 +11948,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - boolean present_column = true && (isSetColumn()); - builder.append(present_column); - if (present_column) - builder.append(column); - - return builder.toHashCode(); + return 0; } public int compareTo(get_args other) { @@ -10059,71 +11959,78 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -10192,7 +12099,7 @@ } - 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); @@ -10206,12 +12113,10 @@ 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); } } @@ -10220,7 +12125,14 @@ * 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; + } } /** @@ -10259,15 +12171,15 @@ // 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, - new ListMetaData(TType.LIST, + 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); } @@ -10303,9 +12215,10 @@ 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() { @@ -10392,10 +12305,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -10408,12 +12317,12 @@ 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(); @@ -10423,10 +12332,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -10463,19 +12368,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(get_result other) { @@ -10486,68 +12379,73 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -10608,7 +12506,7 @@ } - 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); @@ -10619,15 +12517,15 @@ /** * 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 */ @@ -10652,12 +12550,10 @@ */ 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); } } @@ -10666,7 +12562,18 @@ * 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; + } } /** @@ -10707,18 +12614,18 @@ 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, + 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getVer_args.class, metaDataMap); } @@ -10726,9 +12633,9 @@ } public getVer_args( - byte[] tableName, - byte[] row, - byte[] column, + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, int numVersions) { this(); @@ -10761,22 +12668,36 @@ 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; } @@ -10800,13 +12721,23 @@ * 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; } @@ -10830,13 +12761,23 @@ * 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; } @@ -10891,7 +12832,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -10899,7 +12840,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -10907,7 +12848,7 @@ if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; @@ -10922,10 +12863,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -10944,12 +12881,12 @@ 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(); @@ -10963,10 +12900,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -10985,7 +12918,7 @@ 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; } @@ -10994,7 +12927,7 @@ 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; } @@ -11003,7 +12936,7 @@ 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; } @@ -11021,29 +12954,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - boolean present_column = true && (isSetColumn()); - builder.append(present_column); - if (present_column) - builder.append(column); - - boolean present_numVersions = true; - builder.append(present_numVersions); - if (present_numVersions) - builder.append(numVersions); - - return builder.toHashCode(); + return 0; } public int compareTo(getVer_args other) { @@ -11054,87 +12965,96 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -11210,7 +13130,7 @@ } - 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); @@ -11224,12 +13144,10 @@ 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); } } @@ -11238,7 +13156,14 @@ * 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; + } } /** @@ -11277,15 +13202,15 @@ // 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, - new ListMetaData(TType.LIST, + 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); } @@ -11321,9 +13246,10 @@ 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() { @@ -11410,10 +13336,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -11426,12 +13348,12 @@ 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(); @@ -11441,10 +13363,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -11481,19 +13399,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(getVer_result other) { @@ -11504,68 +13410,73 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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); + 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(); @@ -11626,7 +13537,7 @@ } - 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); @@ -11638,15 +13549,15 @@ /** * 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 */ @@ -11679,12 +13590,10 @@ */ 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); } } @@ -11693,7 +13602,20 @@ * 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; + } } /** @@ -11735,20 +13657,20 @@ 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); } @@ -11756,9 +13678,9 @@ } public getVerTs_args( - byte[] tableName, - byte[] row, - byte[] column, + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, long timestamp, int numVersions) { @@ -11795,22 +13717,38 @@ 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; } @@ -11834,13 +13772,23 @@ * 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; } @@ -11864,13 +13812,23 @@ * 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; } @@ -11954,7 +13912,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -11962,7 +13920,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -11970,7 +13928,7 @@ if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; @@ -11993,10 +13951,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -12018,12 +13972,12 @@ 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(); @@ -12039,10 +13993,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -12061,7 +14011,7 @@ 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; } @@ -12070,7 +14020,7 @@ 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; } @@ -12079,7 +14029,7 @@ 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; } @@ -12106,34 +14056,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - boolean present_column = true && (isSetColumn()); - builder.append(present_column); - if (present_column) - builder.append(column); - - boolean present_timestamp = true; - builder.append(present_timestamp); - if (present_timestamp) - builder.append(timestamp); - - boolean present_numVersions = true; - builder.append(present_numVersions); - if (present_numVersions) - builder.append(numVersions); - - return builder.toHashCode(); + return 0; } public int compareTo(getVerTs_args other) { @@ -12144,103 +14067,114 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -12323,7 +14257,7 @@ } - 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); @@ -12337,12 +14271,10 @@ 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); } } @@ -12351,7 +14283,14 @@ * 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; + } } /** @@ -12390,15 +14329,15 @@ // 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, - new ListMetaData(TType.LIST, + 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); } @@ -12434,9 +14373,10 @@ 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() { @@ -12523,10 +14463,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -12539,12 +14475,12 @@ 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(); @@ -12554,10 +14490,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -12594,19 +14526,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(getVerTs_result other) { @@ -12617,68 +14537,73 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -12739,7 +14664,7 @@ } - 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); @@ -12748,11 +14673,11 @@ /** * 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 { @@ -12765,12 +14690,10 @@ */ 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); } } @@ -12779,7 +14702,14 @@ * 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; + } } /** @@ -12818,14 +14748,14 @@ // 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); } @@ -12833,8 +14763,8 @@ } public getRow_args( - byte[] tableName, - byte[] row) + ByteBuffer tableName, + ByteBuffer row) { this(); this.tableName = tableName; @@ -12857,22 +14787,33 @@ 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; } @@ -12896,13 +14837,23 @@ * 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; } @@ -12928,7 +14879,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -12936,17 +14887,13 @@ 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: @@ -12959,12 +14906,12 @@ 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(); @@ -12974,10 +14921,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -12996,7 +14939,7 @@ 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; } @@ -13005,7 +14948,7 @@ 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; } @@ -13014,19 +14957,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - return builder.toHashCode(); + return 0; } public int compareTo(getRow_args other) { @@ -13037,56 +14968,61 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -13142,7 +15078,7 @@ } - 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); @@ -13156,12 +15092,10 @@ 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); } } @@ -13170,7 +15104,14 @@ * 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; + } } /** @@ -13209,15 +15150,15 @@ // 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, - new ListMetaData(TType.LIST, + 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); } @@ -13253,9 +15194,10 @@ 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() { @@ -13342,10 +15284,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -13358,12 +15296,12 @@ 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(); @@ -13373,10 +15311,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -13413,64 +15347,84 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + return 0; + } - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); + public int compareTo(getRow_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); + int lastComparison = 0; + getRow_result typedOther = (getRow_result)other; - return builder.toHashCode(); + 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -13531,7 +15485,7 @@ } - 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); @@ -13541,15 +15495,15 @@ /** * 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 { @@ -13566,12 +15520,10 @@ */ 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); } } @@ -13580,7 +15532,16 @@ * 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; + } } /** @@ -13619,17 +15580,17 @@ // 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); } @@ -13637,9 +15598,9 @@ } public getRowWithColumns_args( - byte[] tableName, - byte[] row, - List columns) + ByteBuffer tableName, + ByteBuffer row, + List columns) { this(); this.tableName = tableName; @@ -13658,8 +15619,8 @@ 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; @@ -13670,22 +15631,34 @@ 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; } @@ -13709,13 +15682,23 @@ * 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; } @@ -13739,13 +15722,13 @@ 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); } @@ -13753,14 +15736,14 @@ /** * 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; } @@ -13786,7 +15769,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -13794,7 +15777,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -13802,17 +15785,13 @@ 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: @@ -13828,12 +15807,12 @@ 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(); @@ -13845,10 +15824,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -13867,7 +15842,7 @@ 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; } @@ -13876,7 +15851,7 @@ 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; } @@ -13894,24 +15869,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - boolean present_columns = true && (isSetColumns()); - builder.append(present_columns); - if (present_columns) - builder.append(columns); - - return builder.toHashCode(); + return 0; } public int compareTo(getRowWithColumns_args other) { @@ -13922,81 +15880,88 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -14022,7 +15987,7 @@ 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); } @@ -14072,7 +16037,7 @@ } - 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); @@ -14086,12 +16051,10 @@ 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); } } @@ -14100,7 +16063,14 @@ * 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; + } } /** @@ -14139,15 +16109,15 @@ // 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, - new ListMetaData(TType.LIST, + 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); } @@ -14183,9 +16153,10 @@ 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() { @@ -14272,10 +16243,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -14288,12 +16255,12 @@ 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(); @@ -14303,10 +16270,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -14343,64 +16306,84 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + return 0; + } - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); + public int compareTo(getRowWithColumns_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); + int lastComparison = 0; + getRowWithColumns_result typedOther = (getRowWithColumns_result)other; - return builder.toHashCode(); + 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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); + 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(); @@ -14461,7 +16444,7 @@ } - 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); @@ -14471,11 +16454,11 @@ /** * name of the table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row key */ - public byte[] row; + public ByteBuffer row; /** * timestamp */ @@ -14496,12 +16479,10 @@ */ 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); } } @@ -14510,7 +16491,16 @@ * 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; + } } /** @@ -14551,16 +16541,16 @@ 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, + 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getRowTs_args.class, metaDataMap); } @@ -14568,8 +16558,8 @@ } public getRowTs_args( - byte[] tableName, - byte[] row, + ByteBuffer tableName, + ByteBuffer row, long timestamp) { this(); @@ -14598,22 +16588,35 @@ 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; } @@ -14637,13 +16640,23 @@ * 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; } @@ -14698,7 +16711,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -14706,7 +16719,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -14721,10 +16734,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -14740,12 +16749,12 @@ 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(); @@ -14757,10 +16766,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -14779,7 +16784,7 @@ 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; } @@ -14788,7 +16793,7 @@ 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; } @@ -14806,24 +16811,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - boolean present_timestamp = true; - builder.append(present_timestamp); - if (present_timestamp) - builder.append(timestamp); - - return builder.toHashCode(); + return 0; } public int compareTo(getRowTs_args other) { @@ -14834,72 +16822,79 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -14962,7 +16957,7 @@ } - 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); @@ -14976,12 +16971,10 @@ 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); } } @@ -14990,7 +16983,14 @@ * 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; + } } /** @@ -15029,15 +17029,15 @@ // 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, - new ListMetaData(TType.LIST, + 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); } @@ -15073,9 +17073,10 @@ 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() { @@ -15162,10 +17163,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -15178,12 +17175,12 @@ 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(); @@ -15193,10 +17190,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -15233,64 +17226,84 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + return 0; + } - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); + public int compareTo(getRowTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); + int lastComparison = 0; + getRowTs_result typedOther = (getRowTs_result)other; - return builder.toHashCode(); + 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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); + 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(); @@ -15351,7 +17364,7 @@ } - 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); @@ -15362,15 +17375,15 @@ /** * 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. */ @@ -15389,12 +17402,10 @@ 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); } } @@ -15403,7 +17414,18 @@ * 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; + } } /** @@ -15444,19 +17466,19 @@ 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, - new ListMetaData(TType.LIST, - 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.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + 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); } @@ -15464,9 +17486,9 @@ } public getRowWithColumnsTs_args( - byte[] tableName, - byte[] row, - List columns, + ByteBuffer tableName, + ByteBuffer row, + List columns, long timestamp) { this(); @@ -15490,8 +17512,8 @@ 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; @@ -15503,22 +17525,36 @@ 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; } @@ -15542,13 +17578,23 @@ * 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; } @@ -15572,13 +17618,13 @@ 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); } @@ -15586,14 +17632,14 @@ /** * 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; } @@ -15642,7 +17688,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -15650,7 +17696,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -15658,7 +17704,7 @@ if (value == null) { unsetColumns(); } else { - setColumns((List)value); + setColumns((List)value); } break; @@ -15673,10 +17719,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -15695,12 +17737,12 @@ 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(); @@ -15714,10 +17756,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -15736,7 +17774,7 @@ 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; } @@ -15745,7 +17783,7 @@ 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; } @@ -15772,29 +17810,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - boolean present_columns = true && (isSetColumns()); - builder.append(present_columns); - if (present_columns) - builder.append(columns); - - boolean present_timestamp = true; - builder.append(present_timestamp); - if (present_timestamp) - builder.append(timestamp); - - return builder.toHashCode(); + return 0; } public int compareTo(getRowWithColumnsTs_args other) { @@ -15805,97 +17821,106 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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); + 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 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(); @@ -15921,7 +17946,7 @@ 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); } @@ -15978,7 +18003,7 @@ } - 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); @@ -15992,12 +18017,10 @@ 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); } } @@ -16006,7 +18029,14 @@ * 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; + } } /** @@ -16045,15 +18075,15 @@ // 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, - new ListMetaData(TType.LIST, + 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); } @@ -16089,9 +18119,10 @@ 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() { @@ -16178,10 +18209,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -16194,12 +18221,12 @@ 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(); @@ -16209,10 +18236,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -16249,64 +18272,84 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + return 0; + } - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); + public int compareTo(getRowWithColumnsTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); + int lastComparison = 0; + getRowWithColumnsTs_result typedOther = (getRowWithColumnsTs_result)other; - return builder.toHashCode(); + 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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); + 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(); @@ -16367,7 +18410,7 @@ } - public static class getRows_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getRows_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRows_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -16376,11 +18419,11 @@ /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row keys */ - public List rows; + public List rows; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -16393,12 +18436,10 @@ */ ROWS((short)2, "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); } } @@ -16407,7 +18448,14 @@ * 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: // ROWS + return ROWS; + default: + return null; + } } /** @@ -16446,15 +18494,15 @@ // 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.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.ROWS, new FieldMetaData("rows", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getRows_args.class, metaDataMap); } @@ -16462,8 +18510,8 @@ } public getRows_args( - byte[] tableName, - List rows) + ByteBuffer tableName, + List rows) { this(); this.tableName = tableName; @@ -16478,8 +18526,8 @@ this.tableName = other.tableName; } 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; @@ -16490,22 +18538,33 @@ return new getRows_args(this); } - @Deprecated - public getRows_args clone() { - return new getRows_args(this); + @Override + public void clear() { + this.tableName = null; + this.rows = 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 getRows_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public getRows_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -16529,13 +18588,13 @@ 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); } @@ -16543,14 +18602,14 @@ /** * row keys */ - public List getRows() { + public List getRows() { return this.rows; } /** * row keys */ - public getRows_args setRows(List rows) { + public getRows_args setRows(List rows) { this.rows = rows; return this; } @@ -16576,7 +18635,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -16584,17 +18643,13 @@ 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: @@ -16607,12 +18662,12 @@ 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(); @@ -16622,10 +18677,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -16644,7 +18695,7 @@ 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; } @@ -16662,19 +18713,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_rows = true && (isSetRows()); - builder.append(present_rows); - if (present_rows) - builder.append(rows); - - return builder.toHashCode(); + return 0; } public int compareTo(getRows_args other) { @@ -16685,66 +18724,71 @@ int lastComparison = 0; getRows_args typedOther = (getRows_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(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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 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: // ROWS + if (field.type == TType.LIST) { + { + TList _list62 = iprot.readListBegin(); + this.rows = new ArrayList(_list62.size); + for (int _i63 = 0; _i63 < _list62.size; ++_i63) { - TList _list62 = iprot.readListBegin(); - this.rows = new ArrayList(_list62.size); - for (int _i63 = 0; _i63 < _list62.size; ++_i63) - { - byte[] _elem64; - _elem64 = iprot.readBinary(); - this.rows.add(_elem64); - } - iprot.readListEnd(); + ByteBuffer _elem64; + _elem64 = iprot.readBinary(); + this.rows.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(); @@ -16765,7 +18809,7 @@ oprot.writeFieldBegin(ROWS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.rows.size())); - for (byte[] _iter65 : this.rows) + for (ByteBuffer _iter65 : this.rows) { oprot.writeBinary(_iter65); } @@ -16807,7 +18851,7 @@ } - public static class getRows_result implements TBase, java.io.Serializable, Cloneable { + public static class getRows_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRows_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -16821,12 +18865,10 @@ 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); } } @@ -16835,7 +18877,14 @@ * 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; + } } /** @@ -16874,15 +18923,15 @@ // 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, - new ListMetaData(TType.LIST, + 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(getRows_result.class, metaDataMap); } @@ -16918,9 +18967,10 @@ return new getRows_result(this); } - @Deprecated - public getRows_result clone() { - return new getRows_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { @@ -17007,10 +19057,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -17023,12 +19069,12 @@ 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(); @@ -17038,10 +19084,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -17078,64 +19120,84 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + return 0; + } - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); + public int compareTo(getRows_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); + int lastComparison = 0; + getRows_result typedOther = (getRows_result)other; - return builder.toHashCode(); + 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list66 = iprot.readListBegin(); + this.success = new ArrayList(_list66.size); + for (int _i67 = 0; _i67 < _list66.size; ++_i67) { - TList _list66 = iprot.readListBegin(); - this.success = new ArrayList(_list66.size); - for (int _i67 = 0; _i67 < _list66.size; ++_i67) - { - TRowResult _elem68; - _elem68 = new TRowResult(); - _elem68.read(iprot); - this.success.add(_elem68); - } - iprot.readListEnd(); + TRowResult _elem68; + _elem68 = new TRowResult(); + _elem68.read(iprot); + this.success.add(_elem68); } - } 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(); @@ -17196,7 +19258,7 @@ } - public static class getRowsWithColumns_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getRowsWithColumns_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRowsWithColumns_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -17206,15 +19268,15 @@ /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row keys */ - public List rows; + public List rows; /** * 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 { @@ -17231,12 +19293,10 @@ */ 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); } } @@ -17245,7 +19305,16 @@ * 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: // ROWS + return ROWS; + case 3: // COLUMNS + return COLUMNS; + default: + return null; + } } /** @@ -17284,18 +19353,18 @@ // 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.ROWS, new FieldMetaData("rows", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - 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.ROWS, new FieldMetaData("rows", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + 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(getRowsWithColumns_args.class, metaDataMap); } @@ -17303,9 +19372,9 @@ } public getRowsWithColumns_args( - byte[] tableName, - List rows, - List columns) + ByteBuffer tableName, + List rows, + List columns) { this(); this.tableName = tableName; @@ -17321,15 +19390,15 @@ this.tableName = other.tableName; } 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; } 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; @@ -17340,22 +19409,34 @@ return new getRowsWithColumns_args(this); } - @Deprecated - public getRowsWithColumns_args clone() { - return new getRowsWithColumns_args(this); + @Override + public void clear() { + this.tableName = null; + this.rows = 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 getRowsWithColumns_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public getRowsWithColumns_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -17379,13 +19460,13 @@ 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); } @@ -17393,14 +19474,14 @@ /** * row keys */ - public List getRows() { + public List getRows() { return this.rows; } /** * row keys */ - public getRowsWithColumns_args setRows(List rows) { + public getRowsWithColumns_args setRows(List rows) { this.rows = rows; return this; } @@ -17424,13 +19505,13 @@ 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); } @@ -17438,14 +19519,14 @@ /** * 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 getRowsWithColumns_args setColumns(List columns) { + public getRowsWithColumns_args setColumns(List columns) { this.columns = columns; return this; } @@ -17471,7 +19552,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -17479,7 +19560,7 @@ if (value == null) { unsetRows(); } else { - setRows((List)value); + setRows((List)value); } break; @@ -17487,17 +19568,13 @@ 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: @@ -17513,12 +19590,12 @@ 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(); @@ -17530,10 +19607,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -17552,7 +19625,7 @@ 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; } @@ -17579,24 +19652,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_rows = true && (isSetRows()); - builder.append(present_rows); - if (present_rows) - builder.append(rows); - - boolean present_columns = true && (isSetColumns()); - builder.append(present_columns); - if (present_columns) - builder.append(columns); - - return builder.toHashCode(); + return 0; } public int compareTo(getRowsWithColumns_args other) { @@ -17607,91 +19663,98 @@ int lastComparison = 0; getRowsWithColumns_args typedOther = (getRowsWithColumns_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(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; + } } - 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 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: // ROWS + if (field.type == TType.LIST) { + { + TList _list70 = iprot.readListBegin(); + this.rows = new ArrayList(_list70.size); + for (int _i71 = 0; _i71 < _list70.size; ++_i71) { - TList _list70 = iprot.readListBegin(); - this.rows = new ArrayList(_list70.size); - for (int _i71 = 0; _i71 < _list70.size; ++_i71) - { - byte[] _elem72; - _elem72 = iprot.readBinary(); - this.rows.add(_elem72); - } - iprot.readListEnd(); + ByteBuffer _elem72; + _elem72 = iprot.readBinary(); + this.rows.add(_elem72); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - case COLUMNS: - if (field.type == TType.LIST) { + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMNS + if (field.type == TType.LIST) { + { + TList _list73 = iprot.readListBegin(); + this.columns = new ArrayList(_list73.size); + for (int _i74 = 0; _i74 < _list73.size; ++_i74) { - TList _list73 = iprot.readListBegin(); - this.columns = new ArrayList(_list73.size); - for (int _i74 = 0; _i74 < _list73.size; ++_i74) - { - byte[] _elem75; - _elem75 = iprot.readBinary(); - this.columns.add(_elem75); - } - iprot.readListEnd(); + ByteBuffer _elem75; + _elem75 = iprot.readBinary(); + this.columns.add(_elem75); } - } 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(); @@ -17712,7 +19775,7 @@ oprot.writeFieldBegin(ROWS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.rows.size())); - for (byte[] _iter76 : this.rows) + for (ByteBuffer _iter76 : this.rows) { oprot.writeBinary(_iter76); } @@ -17724,7 +19787,7 @@ oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter77 : this.columns) + for (ByteBuffer _iter77 : this.columns) { oprot.writeBinary(_iter77); } @@ -17774,7 +19837,7 @@ } - public static class getRowsWithColumns_result implements TBase, java.io.Serializable, Cloneable { + public static class getRowsWithColumns_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRowsWithColumns_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -17788,12 +19851,10 @@ 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); } } @@ -17802,7 +19863,14 @@ * 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; + } } /** @@ -17841,15 +19909,15 @@ // 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, - new ListMetaData(TType.LIST, + 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(getRowsWithColumns_result.class, metaDataMap); } @@ -17885,9 +19953,10 @@ return new getRowsWithColumns_result(this); } - @Deprecated - public getRowsWithColumns_result clone() { - return new getRowsWithColumns_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { @@ -17974,10 +20043,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -17990,12 +20055,12 @@ 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(); @@ -18005,10 +20070,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -18045,64 +20106,84 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + return 0; + } - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); + public int compareTo(getRowsWithColumns_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); + int lastComparison = 0; + getRowsWithColumns_result typedOther = (getRowsWithColumns_result)other; - return builder.toHashCode(); + 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list78 = iprot.readListBegin(); + this.success = new ArrayList(_list78.size); + for (int _i79 = 0; _i79 < _list78.size; ++_i79) { - TList _list78 = iprot.readListBegin(); - this.success = new ArrayList(_list78.size); - for (int _i79 = 0; _i79 < _list78.size; ++_i79) - { - TRowResult _elem80; - _elem80 = new TRowResult(); - _elem80.read(iprot); - this.success.add(_elem80); - } - iprot.readListEnd(); + TRowResult _elem80; + _elem80 = new TRowResult(); + _elem80.read(iprot); + this.success.add(_elem80); } - } 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(); @@ -18163,7 +20244,7 @@ } - public static class getRowsTs_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getRowsTs_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRowsTs_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -18173,11 +20254,11 @@ /** * name of the table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row keys */ - public List rows; + public List rows; /** * timestamp */ @@ -18198,12 +20279,10 @@ */ 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); } } @@ -18212,7 +20291,16 @@ * 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: // ROWS + return ROWS; + case 3: // TIMESTAMP + return TIMESTAMP; + default: + return null; + } } /** @@ -18253,17 +20341,17 @@ 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.ROWS, new FieldMetaData("rows", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - 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.ROWS, new FieldMetaData("rows", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + 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(getRowsTs_args.class, metaDataMap); } @@ -18271,8 +20359,8 @@ } public getRowsTs_args( - byte[] tableName, - List rows, + ByteBuffer tableName, + List rows, long timestamp) { this(); @@ -18292,8 +20380,8 @@ this.tableName = other.tableName; } 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; @@ -18305,22 +20393,35 @@ return new getRowsTs_args(this); } - @Deprecated - public getRowsTs_args clone() { - return new getRowsTs_args(this); + @Override + public void clear() { + this.tableName = null; + this.rows = 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 getRowsTs_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public getRowsTs_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -18344,13 +20445,13 @@ 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); } @@ -18358,14 +20459,14 @@ /** * row keys */ - public List getRows() { + public List getRows() { return this.rows; } /** * row keys */ - public getRowsTs_args setRows(List rows) { + public getRowsTs_args setRows(List rows) { this.rows = rows; return this; } @@ -18420,7 +20521,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -18428,7 +20529,7 @@ if (value == null) { unsetRows(); } else { - setRows((List)value); + setRows((List)value); } break; @@ -18443,10 +20544,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -18462,12 +20559,12 @@ 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(); @@ -18479,10 +20576,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -18501,7 +20594,7 @@ 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; } @@ -18528,24 +20621,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_rows = true && (isSetRows()); - builder.append(present_rows); - if (present_rows) - builder.append(rows); - - boolean present_timestamp = true; - builder.append(present_timestamp); - if (present_timestamp) - builder.append(timestamp); - - return builder.toHashCode(); + return 0; } public int compareTo(getRowsTs_args other) { @@ -18556,82 +20632,89 @@ int lastComparison = 0; getRowsTs_args typedOther = (getRowsTs_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(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; + } } - 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 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: // ROWS + if (field.type == TType.LIST) { + { + TList _list82 = iprot.readListBegin(); + this.rows = new ArrayList(_list82.size); + for (int _i83 = 0; _i83 < _list82.size; ++_i83) { - TList _list82 = iprot.readListBegin(); - this.rows = new ArrayList(_list82.size); - for (int _i83 = 0; _i83 < _list82.size; ++_i83) - { - byte[] _elem84; - _elem84 = iprot.readBinary(); - this.rows.add(_elem84); - } - iprot.readListEnd(); + ByteBuffer _elem84; + _elem84 = iprot.readBinary(); + this.rows.add(_elem84); } - } 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 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(); @@ -18652,7 +20735,7 @@ oprot.writeFieldBegin(ROWS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.rows.size())); - for (byte[] _iter85 : this.rows) + for (ByteBuffer _iter85 : this.rows) { oprot.writeBinary(_iter85); } @@ -18701,7 +20784,7 @@ } - public static class getRowsTs_result implements TBase, java.io.Serializable, Cloneable { + public static class getRowsTs_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRowsTs_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -18715,12 +20798,10 @@ 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); } } @@ -18729,7 +20810,14 @@ * 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; + } } /** @@ -18768,15 +20856,15 @@ // 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, - new ListMetaData(TType.LIST, + 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(getRowsTs_result.class, metaDataMap); } @@ -18812,9 +20900,10 @@ return new getRowsTs_result(this); } - @Deprecated - public getRowsTs_result clone() { - return new getRowsTs_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { @@ -18901,10 +20990,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -18917,12 +21002,12 @@ 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(); @@ -18932,10 +21017,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -18972,64 +21053,84 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + return 0; + } - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); + public int compareTo(getRowsTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); + int lastComparison = 0; + getRowsTs_result typedOther = (getRowsTs_result)other; - return builder.toHashCode(); + 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list86 = iprot.readListBegin(); + this.success = new ArrayList(_list86.size); + for (int _i87 = 0; _i87 < _list86.size; ++_i87) { - TList _list86 = iprot.readListBegin(); - this.success = new ArrayList(_list86.size); - for (int _i87 = 0; _i87 < _list86.size; ++_i87) - { - TRowResult _elem88; - _elem88 = new TRowResult(); - _elem88.read(iprot); - this.success.add(_elem88); - } - iprot.readListEnd(); + TRowResult _elem88; + _elem88 = new TRowResult(); + _elem88.read(iprot); + this.success.add(_elem88); } - } 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(); @@ -19090,7 +21191,7 @@ } - public static class getRowsWithColumnsTs_args implements TBase, java.io.Serializable, Cloneable, Comparable { + public static class getRowsWithColumnsTs_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRowsWithColumnsTs_args"); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); @@ -19101,15 +21202,15 @@ /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row keys */ - public List rows; + public List rows; /** * 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. */ @@ -19128,12 +21229,10 @@ 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); } } @@ -19142,7 +21241,18 @@ * 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: // ROWS + return ROWS; + case 3: // COLUMNS + return COLUMNS; + case 4: // TIMESTAMP + return TIMESTAMP; + default: + return null; + } } /** @@ -19183,20 +21293,20 @@ 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.ROWS, new FieldMetaData("rows", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - 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.ROWS, new FieldMetaData("rows", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING , "Text")))); + tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + 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(getRowsWithColumnsTs_args.class, metaDataMap); } @@ -19204,9 +21314,9 @@ } public getRowsWithColumnsTs_args( - byte[] tableName, - List rows, - List columns, + ByteBuffer tableName, + List rows, + List columns, long timestamp) { this(); @@ -19227,15 +21337,15 @@ this.tableName = other.tableName; } 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; } 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; @@ -19247,22 +21357,36 @@ return new getRowsWithColumnsTs_args(this); } - @Deprecated - public getRowsWithColumnsTs_args clone() { - return new getRowsWithColumnsTs_args(this); + @Override + public void clear() { + this.tableName = null; + this.rows = 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 getRowsWithColumnsTs_args setTableName(byte[] tableName) { + setTableName(ByteBuffer.wrap(tableName)); + return this; + } + + public getRowsWithColumnsTs_args setTableName(ByteBuffer tableName) { this.tableName = tableName; return this; } @@ -19286,13 +21410,13 @@ 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); } @@ -19300,14 +21424,14 @@ /** * row keys */ - public List getRows() { + public List getRows() { return this.rows; } /** * row keys */ - public getRowsWithColumnsTs_args setRows(List rows) { + public getRowsWithColumnsTs_args setRows(List rows) { this.rows = rows; return this; } @@ -19331,13 +21455,13 @@ 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); } @@ -19345,14 +21469,14 @@ /** * 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 getRowsWithColumnsTs_args setColumns(List columns) { + public getRowsWithColumnsTs_args setColumns(List columns) { this.columns = columns; return this; } @@ -19401,7 +21525,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -19409,7 +21533,7 @@ if (value == null) { unsetRows(); } else { - setRows((List)value); + setRows((List)value); } break; @@ -19417,7 +21541,7 @@ if (value == null) { unsetColumns(); } else { - setColumns((List)value); + setColumns((List)value); } break; @@ -19432,10 +21556,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -19454,12 +21574,12 @@ 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(); @@ -19473,10 +21593,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -19495,7 +21611,7 @@ 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; } @@ -19531,29 +21647,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_rows = true && (isSetRows()); - builder.append(present_rows); - if (present_rows) - builder.append(rows); - - boolean present_columns = true && (isSetColumns()); - builder.append(present_columns); - if (present_columns) - builder.append(columns); - - boolean present_timestamp = true; - builder.append(present_timestamp); - if (present_timestamp) - builder.append(timestamp); - - return builder.toHashCode(); + return 0; } public int compareTo(getRowsWithColumnsTs_args other) { @@ -19564,107 +21658,116 @@ int lastComparison = 0; getRowsWithColumnsTs_args typedOther = (getRowsWithColumnsTs_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(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; + } } - 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 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: // ROWS + if (field.type == TType.LIST) { + { + TList _list90 = iprot.readListBegin(); + this.rows = new ArrayList(_list90.size); + for (int _i91 = 0; _i91 < _list90.size; ++_i91) { - TList _list90 = iprot.readListBegin(); - this.rows = new ArrayList(_list90.size); - for (int _i91 = 0; _i91 < _list90.size; ++_i91) - { - byte[] _elem92; - _elem92 = iprot.readBinary(); - this.rows.add(_elem92); - } - iprot.readListEnd(); + ByteBuffer _elem92; + _elem92 = iprot.readBinary(); + this.rows.add(_elem92); } - } else { - TProtocolUtil.skip(iprot, field.type); + iprot.readListEnd(); } - break; - case COLUMNS: - if (field.type == TType.LIST) { + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // COLUMNS + if (field.type == TType.LIST) { + { + TList _list93 = iprot.readListBegin(); + this.columns = new ArrayList(_list93.size); + for (int _i94 = 0; _i94 < _list93.size; ++_i94) { - TList _list93 = iprot.readListBegin(); - this.columns = new ArrayList(_list93.size); - for (int _i94 = 0; _i94 < _list93.size; ++_i94) - { - byte[] _elem95; - _elem95 = iprot.readBinary(); - this.columns.add(_elem95); - } - iprot.readListEnd(); + ByteBuffer _elem95; + _elem95 = iprot.readBinary(); + this.columns.add(_elem95); } - } 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 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(); @@ -19685,7 +21788,7 @@ oprot.writeFieldBegin(ROWS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.rows.size())); - for (byte[] _iter96 : this.rows) + for (ByteBuffer _iter96 : this.rows) { oprot.writeBinary(_iter96); } @@ -19697,7 +21800,7 @@ 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); } @@ -19754,7 +21857,7 @@ } - public static class getRowsWithColumnsTs_result implements TBase, java.io.Serializable, Cloneable { + public static class getRowsWithColumnsTs_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getRowsWithColumnsTs_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); @@ -19768,12 +21871,10 @@ 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); } } @@ -19782,7 +21883,14 @@ * 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; + } } /** @@ -19821,15 +21929,15 @@ // 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, - new ListMetaData(TType.LIST, + 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(getRowsWithColumnsTs_result.class, metaDataMap); } @@ -19865,9 +21973,10 @@ return new getRowsWithColumnsTs_result(this); } - @Deprecated - public getRowsWithColumnsTs_result clone() { - return new getRowsWithColumnsTs_result(this); + @Override + public void clear() { + this.success = null; + this.io = null; } public int getSuccessSize() { @@ -19954,10 +22063,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -19970,12 +22075,12 @@ 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(); @@ -19985,10 +22090,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -20025,64 +22126,84 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + return 0; + } - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); + public int compareTo(getRowsWithColumnsTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); + int lastComparison = 0; + getRowsWithColumnsTs_result typedOther = (getRowsWithColumnsTs_result)other; - return builder.toHashCode(); + 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list98 = iprot.readListBegin(); + this.success = new ArrayList(_list98.size); + for (int _i99 = 0; _i99 < _list98.size; ++_i99) { - TList _list98 = iprot.readListBegin(); - this.success = new ArrayList(_list98.size); - for (int _i99 = 0; _i99 < _list98.size; ++_i99) - { - TRowResult _elem100; - _elem100 = new TRowResult(); - _elem100.read(iprot); - this.success.add(_elem100); - } - iprot.readListEnd(); + TRowResult _elem100; + _elem100 = new TRowResult(); + _elem100.read(iprot); + this.success.add(_elem100); } - } 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(); @@ -20143,7 +22264,7 @@ } - 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); @@ -20153,11 +22274,11 @@ /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row key */ - public byte[] row; + public ByteBuffer row; /** * list of mutation commands */ @@ -20178,12 +22299,10 @@ */ 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); } } @@ -20192,7 +22311,16 @@ * 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; + } } /** @@ -20231,17 +22359,17 @@ // 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, - new ListMetaData(TType.LIST, + 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); } @@ -20249,8 +22377,8 @@ } public mutateRow_args( - byte[] tableName, - byte[] row, + ByteBuffer tableName, + ByteBuffer row, List mutations) { this(); @@ -20282,22 +22410,34 @@ 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; } @@ -20321,13 +22461,23 @@ * 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; } @@ -20398,7 +22548,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -20406,7 +22556,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -20421,10 +22571,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -20440,12 +22586,12 @@ 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(); @@ -20457,10 +22603,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -20479,7 +22621,7 @@ 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; } @@ -20488,7 +22630,7 @@ 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; } @@ -20506,24 +22648,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - boolean present_mutations = true && (isSetMutations()); - builder.append(present_mutations); - if (present_mutations) - builder.append(mutations); - - return builder.toHashCode(); + return 0; } public int compareTo(mutateRow_args other) { @@ -20534,82 +22659,89 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list102 = iprot.readListBegin(); + this.mutations = new ArrayList(_list102.size); + for (int _i103 = 0; _i103 < _list102.size; ++_i103) { - TList _list102 = iprot.readListBegin(); - this.mutations = new ArrayList(_list102.size); - for (int _i103 = 0; _i103 < _list102.size; ++_i103) - { - Mutation _elem104; - _elem104 = new Mutation(); - _elem104.read(iprot); - this.mutations.add(_elem104); - } - iprot.readListEnd(); + Mutation _elem104; + _elem104 = new Mutation(); + _elem104.read(iprot); + this.mutations.add(_elem104); } - } 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(); @@ -20685,7 +22817,7 @@ } - 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); @@ -20699,12 +22831,10 @@ 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); } } @@ -20713,7 +22843,14 @@ * 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; + } } /** @@ -20752,14 +22889,14 @@ // 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); } @@ -20791,9 +22928,10 @@ 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() { @@ -20865,10 +23003,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -20881,12 +23015,12 @@ 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(); @@ -20896,10 +23030,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -20936,19 +23066,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - boolean present_ia = true && (isSetIa()); - builder.append(present_ia); - if (present_ia) - builder.append(ia); - - return builder.toHashCode(); + return 0; } public int compareTo(mutateRow_result other) { @@ -20959,58 +23077,63 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -21064,7 +23187,7 @@ } - 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); @@ -21075,11 +23198,11 @@ /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * row key */ - public byte[] row; + public ByteBuffer row; /** * list of mutation commands */ @@ -21108,12 +23231,10 @@ */ 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); } } @@ -21122,7 +23243,18 @@ * 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; + } } /** @@ -21163,19 +23295,19 @@ 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, - new ListMetaData(TType.LIST, + 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); } @@ -21183,8 +23315,8 @@ } public mutateRowTs_args( - byte[] tableName, - byte[] row, + ByteBuffer tableName, + ByteBuffer row, List mutations, long timestamp) { @@ -21222,22 +23354,36 @@ 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; } @@ -21261,13 +23407,23 @@ * 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; } @@ -21367,7 +23523,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -21375,7 +23531,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -21398,10 +23554,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -21420,12 +23572,12 @@ 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(); @@ -21439,10 +23591,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -21461,7 +23609,7 @@ 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; } @@ -21470,7 +23618,7 @@ 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; } @@ -21497,29 +23645,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - boolean present_mutations = true && (isSetMutations()); - builder.append(present_mutations); - if (present_mutations) - builder.append(mutations); - - boolean present_timestamp = true; - builder.append(present_timestamp); - if (present_timestamp) - builder.append(timestamp); - - return builder.toHashCode(); + return 0; } public int compareTo(mutateRowTs_args other) { @@ -21530,98 +23656,107 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list106 = iprot.readListBegin(); + this.mutations = new ArrayList(_list106.size); + for (int _i107 = 0; _i107 < _list106.size; ++_i107) { - TList _list106 = iprot.readListBegin(); - this.mutations = new ArrayList(_list106.size); - for (int _i107 = 0; _i107 < _list106.size; ++_i107) - { - Mutation _elem108; - _elem108 = new Mutation(); - _elem108.read(iprot); - this.mutations.add(_elem108); - } - iprot.readListEnd(); + Mutation _elem108; + _elem108 = new Mutation(); + _elem108.read(iprot); + this.mutations.add(_elem108); } - } 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 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(); @@ -21704,7 +23839,7 @@ } - 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); @@ -21718,12 +23853,10 @@ 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); } } @@ -21732,7 +23865,14 @@ * 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; + } } /** @@ -21771,14 +23911,14 @@ // 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); } @@ -21810,9 +23950,10 @@ 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() { @@ -21884,10 +24025,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -21900,12 +24037,12 @@ 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(); @@ -21915,10 +24052,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -21955,19 +24088,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - boolean present_ia = true && (isSetIa()); - builder.append(present_ia); - if (present_ia) - builder.append(ia); - - return builder.toHashCode(); + return 0; } public int compareTo(mutateRowTs_result other) { @@ -21978,58 +24099,63 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -22083,7 +24209,7 @@ } - 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); @@ -22092,7 +24218,7 @@ /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * list of row batches */ @@ -22109,12 +24235,10 @@ */ 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); } } @@ -22123,7 +24247,14 @@ * 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; + } } /** @@ -22162,15 +24293,15 @@ // 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, - new ListMetaData(TType.LIST, + 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); } @@ -22178,7 +24309,7 @@ } public mutateRows_args( - byte[] tableName, + ByteBuffer tableName, List rowBatches) { this(); @@ -22206,22 +24337,33 @@ 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; } @@ -22292,7 +24434,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -22307,10 +24449,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -22323,12 +24461,12 @@ 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(); @@ -22338,10 +24476,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -22360,7 +24494,7 @@ 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; } @@ -22378,19 +24512,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_rowBatches = true && (isSetRowBatches()); - builder.append(present_rowBatches); - if (present_rowBatches) - builder.append(rowBatches); - - return builder.toHashCode(); + return 0; } public int compareTo(mutateRows_args other) { @@ -22401,67 +24523,72 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list110 = iprot.readListBegin(); + this.rowBatches = new ArrayList(_list110.size); + for (int _i111 = 0; _i111 < _list110.size; ++_i111) { - TList _list110 = iprot.readListBegin(); - this.rowBatches = new ArrayList(_list110.size); - for (int _i111 = 0; _i111 < _list110.size; ++_i111) - { - BatchMutation _elem112; - _elem112 = new BatchMutation(); - _elem112.read(iprot); - this.rowBatches.add(_elem112); - } - iprot.readListEnd(); + BatchMutation _elem112; + _elem112 = new BatchMutation(); + _elem112.read(iprot); + this.rowBatches.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(); @@ -22524,7 +24651,7 @@ } - 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); @@ -22538,12 +24665,10 @@ 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); } } @@ -22552,7 +24677,14 @@ * 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; + } } /** @@ -22591,14 +24723,14 @@ // 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); } @@ -22630,9 +24762,10 @@ 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() { @@ -22704,10 +24837,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -22720,12 +24849,12 @@ 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(); @@ -22735,10 +24864,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -22775,19 +24900,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - boolean present_ia = true && (isSetIa()); - builder.append(present_ia); - if (present_ia) - builder.append(ia); - - return builder.toHashCode(); + return 0; } public int compareTo(mutateRows_result other) { @@ -22798,58 +24911,63 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -22903,7 +25021,7 @@ } - 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); @@ -22913,7 +25031,7 @@ /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * list of row batches */ @@ -22938,12 +25056,10 @@ */ 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); } } @@ -22952,7 +25068,16 @@ * 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; + } } /** @@ -22993,17 +25118,17 @@ 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, - new ListMetaData(TType.LIST, + 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); } @@ -23011,7 +25136,7 @@ } public mutateRowsTs_args( - byte[] tableName, + ByteBuffer tableName, List rowBatches, long timestamp) { @@ -23045,22 +25170,35 @@ 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; } @@ -23160,7 +25298,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -23183,10 +25321,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -23202,12 +25336,12 @@ 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(); @@ -23219,10 +25353,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -23241,7 +25371,7 @@ 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; } @@ -23268,24 +25398,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_rowBatches = true && (isSetRowBatches()); - builder.append(present_rowBatches); - if (present_rowBatches) - builder.append(rowBatches); - - boolean present_timestamp = true; - builder.append(present_timestamp); - if (present_timestamp) - builder.append(timestamp); - - return builder.toHashCode(); + return 0; } public int compareTo(mutateRowsTs_args other) { @@ -23296,83 +25409,90 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list114 = iprot.readListBegin(); + this.rowBatches = new ArrayList(_list114.size); + for (int _i115 = 0; _i115 < _list114.size; ++_i115) { - TList _list114 = iprot.readListBegin(); - this.rowBatches = new ArrayList(_list114.size); - for (int _i115 = 0; _i115 < _list114.size; ++_i115) - { - BatchMutation _elem116; - _elem116 = new BatchMutation(); - _elem116.read(iprot); - this.rowBatches.add(_elem116); - } - iprot.readListEnd(); + BatchMutation _elem116; + _elem116 = new BatchMutation(); + _elem116.read(iprot); + this.rowBatches.add(_elem116); } - } 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 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(); @@ -23442,7 +25562,7 @@ } - 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); @@ -23456,12 +25576,10 @@ 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); } } @@ -23470,7 +25588,14 @@ * 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; + } } /** @@ -23509,14 +25634,14 @@ // 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); } @@ -23548,9 +25673,10 @@ 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() { @@ -23622,10 +25748,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -23638,12 +25760,12 @@ 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(); @@ -23653,10 +25775,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -23693,19 +25811,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - boolean present_ia = true && (isSetIa()); - builder.append(present_ia); - if (present_ia) - builder.append(ia); - - return builder.toHashCode(); + return 0; } public int compareTo(mutateRowsTs_result other) { @@ -23716,58 +25822,63 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -23821,7 +25932,7 @@ } - 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); @@ -23832,15 +25943,15 @@ /** * 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 */ @@ -23865,12 +25976,10 @@ */ 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); } } @@ -23879,7 +25988,18 @@ * 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; + } } /** @@ -23920,18 +26040,18 @@ 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, + 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(atomicIncrement_args.class, metaDataMap); } @@ -23939,9 +26059,9 @@ } public atomicIncrement_args( - byte[] tableName, - byte[] row, - byte[] column, + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, long value) { this(); @@ -23974,22 +26094,36 @@ 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; } @@ -24013,13 +26147,23 @@ * 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; } @@ -24043,13 +26187,23 @@ * 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; } @@ -24104,7 +26258,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -24112,7 +26266,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -24120,7 +26274,7 @@ if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; @@ -24135,10 +26289,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -24157,12 +26307,12 @@ 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(); @@ -24176,10 +26326,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -24198,7 +26344,7 @@ 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; } @@ -24207,7 +26353,7 @@ 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; } @@ -24216,7 +26362,7 @@ 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; } @@ -24234,29 +26380,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - boolean present_column = true && (isSetColumn()); - builder.append(present_column); - if (present_column) - builder.append(column); - - boolean present_value = true; - builder.append(present_value); - if (present_value) - builder.append(value); - - return builder.toHashCode(); + return 0; } public int compareTo(atomicIncrement_args other) { @@ -24267,87 +26391,96 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -24423,7 +26556,7 @@ } - 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); @@ -24440,12 +26573,10 @@ 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); } } @@ -24454,7 +26585,16 @@ * 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; + } } /** @@ -24495,16 +26635,16 @@ 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); } @@ -24542,9 +26682,12 @@ 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() { @@ -24647,10 +26790,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -24666,12 +26805,12 @@ 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(); @@ -24683,10 +26822,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -24732,24 +26867,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_success = true; - builder.append(present_success); - if (present_success) - builder.append(success); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - boolean present_ia = true && (isSetIa()); - builder.append(present_ia); - if (present_ia) - builder.append(ia); - - return builder.toHashCode(); + return 0; } public int compareTo(atomicIncrement_result other) { @@ -24760,74 +26878,81 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -24889,7 +27014,7 @@ } - 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); @@ -24899,15 +27024,15 @@ /** * 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 { @@ -24924,12 +27049,10 @@ */ 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); } } @@ -24938,7 +27061,16 @@ * 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; + } } /** @@ -24977,16 +27109,16 @@ // 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); } @@ -24994,9 +27126,9 @@ } public deleteAll_args( - byte[] tableName, - byte[] row, - byte[] column) + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column) { this(); this.tableName = tableName; @@ -25023,22 +27155,34 @@ 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; } @@ -25062,13 +27206,23 @@ * 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; } @@ -25092,13 +27246,23 @@ * 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; } @@ -25124,7 +27288,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -25132,7 +27296,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -25140,17 +27304,13 @@ 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: @@ -25166,12 +27326,12 @@ 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(); @@ -25183,10 +27343,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -25205,7 +27361,7 @@ 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; } @@ -25214,7 +27370,7 @@ 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; } @@ -25223,7 +27379,7 @@ 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; } @@ -25232,24 +27388,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - boolean present_column = true && (isSetColumn()); - builder.append(present_column); - if (present_column) - builder.append(column); - - return builder.toHashCode(); + return 0; } public int compareTo(deleteAll_args other) { @@ -25260,71 +27399,78 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -25393,7 +27539,7 @@ } - 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); @@ -25404,12 +27550,10 @@ 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); } } @@ -25418,7 +27562,12 @@ * 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; + } } /** @@ -25457,12 +27606,12 @@ // 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAll_result.class, metaDataMap); } @@ -25489,9 +27638,9 @@ 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() { @@ -25531,10 +27680,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -25544,12 +27689,12 @@ 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(); @@ -25557,10 +27702,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -25588,14 +27729,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(deleteAll_result other) { @@ -25606,42 +27740,45 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -25683,7 +27820,7 @@ } - 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); @@ -25694,15 +27831,15 @@ /** * 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 */ @@ -25727,12 +27864,10 @@ */ 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); } } @@ -25741,7 +27876,18 @@ * 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; + } } /** @@ -25782,18 +27928,18 @@ 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, + 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAllTs_args.class, metaDataMap); } @@ -25801,9 +27947,9 @@ } public deleteAllTs_args( - byte[] tableName, - byte[] row, - byte[] column, + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, long timestamp) { this(); @@ -25836,22 +27982,36 @@ 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; } @@ -25875,13 +28035,23 @@ * 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; } @@ -25905,13 +28075,23 @@ * 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; } @@ -25966,7 +28146,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -25974,7 +28154,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -25982,7 +28162,7 @@ if (value == null) { unsetColumn(); } else { - setColumn((byte[])value); + setColumn((ByteBuffer)value); } break; @@ -25997,10 +28177,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -26019,12 +28195,12 @@ 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(); @@ -26038,10 +28214,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -26060,7 +28232,7 @@ 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; } @@ -26069,7 +28241,7 @@ 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; } @@ -26078,7 +28250,7 @@ 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; } @@ -26096,29 +28268,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - boolean present_column = true && (isSetColumn()); - builder.append(present_column); - if (present_column) - builder.append(column); - - boolean present_timestamp = true; - builder.append(present_timestamp); - if (present_timestamp) - builder.append(timestamp); - - return builder.toHashCode(); + return 0; } public int compareTo(deleteAllTs_args other) { @@ -26129,87 +28279,96 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -26285,7 +28444,7 @@ } - 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); @@ -26296,12 +28455,10 @@ 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); } } @@ -26310,7 +28467,12 @@ * 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; + } } /** @@ -26349,12 +28511,12 @@ // 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAllTs_result.class, metaDataMap); } @@ -26381,9 +28543,9 @@ 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() { @@ -26423,10 +28585,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -26436,12 +28594,12 @@ 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(); @@ -26449,10 +28607,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -26480,14 +28634,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(deleteAllTs_result other) { @@ -26498,42 +28645,45 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -26575,7 +28725,7 @@ } - 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); @@ -26584,11 +28734,11 @@ /** * 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 { @@ -26601,12 +28751,10 @@ */ 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); } } @@ -26615,7 +28763,14 @@ * 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; + } } /** @@ -26654,14 +28809,14 @@ // 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); } @@ -26669,8 +28824,8 @@ } public deleteAllRow_args( - byte[] tableName, - byte[] row) + ByteBuffer tableName, + ByteBuffer row) { this(); this.tableName = tableName; @@ -26693,22 +28848,33 @@ 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; } @@ -26732,13 +28898,23 @@ * 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; } @@ -26764,7 +28940,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -26772,17 +28948,13 @@ 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: @@ -26795,12 +28967,12 @@ 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(); @@ -26810,10 +28982,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -26832,7 +29000,7 @@ 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; } @@ -26841,7 +29009,7 @@ 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; } @@ -26850,19 +29018,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - return builder.toHashCode(); + return 0; } public int compareTo(deleteAllRow_args other) { @@ -26873,56 +29029,61 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -26978,7 +29139,7 @@ } - 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); @@ -26989,12 +29150,10 @@ 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); } } @@ -27003,7 +29162,12 @@ * 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; + } } /** @@ -27042,12 +29206,12 @@ // 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAllRow_result.class, metaDataMap); } @@ -27074,9 +29238,9 @@ 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() { @@ -27116,10 +29280,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -27129,12 +29289,12 @@ 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(); @@ -27142,10 +29302,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -27173,14 +29329,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(deleteAllRow_result other) { @@ -27191,42 +29340,45 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -27268,7 +29420,7 @@ } - 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); @@ -27278,11 +29430,11 @@ /** * name of table */ - public byte[] tableName; + public ByteBuffer tableName; /** * key of the row to be completely deleted. */ - public byte[] row; + public ByteBuffer row; /** * timestamp */ @@ -27303,12 +29455,10 @@ */ 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); } } @@ -27317,7 +29467,16 @@ * 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; + } } /** @@ -27358,16 +29517,16 @@ 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, + 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAllRowTs_args.class, metaDataMap); } @@ -27375,8 +29534,8 @@ } public deleteAllRowTs_args( - byte[] tableName, - byte[] row, + ByteBuffer tableName, + ByteBuffer row, long timestamp) { this(); @@ -27405,22 +29564,35 @@ 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; } @@ -27444,13 +29616,23 @@ * 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; } @@ -27505,7 +29687,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -27513,7 +29695,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -27528,10 +29710,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -27547,12 +29725,12 @@ 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(); @@ -27564,10 +29742,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -27586,7 +29760,7 @@ 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; } @@ -27595,7 +29769,7 @@ 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; } @@ -27613,24 +29787,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); - - boolean present_timestamp = true; - builder.append(present_timestamp); - if (present_timestamp) - builder.append(timestamp); - - return builder.toHashCode(); + return 0; } public int compareTo(deleteAllRowTs_args other) { @@ -27641,72 +29798,79 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -27769,7 +29933,7 @@ } - 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); @@ -27780,12 +29944,10 @@ 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); } } @@ -27794,7 +29956,12 @@ * 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; + } } /** @@ -27833,12 +30000,12 @@ // 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(deleteAllRowTs_result.class, metaDataMap); } @@ -27865,9 +30032,9 @@ 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() { @@ -27907,10 +30074,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -27920,12 +30083,12 @@ 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(); @@ -27933,10 +30096,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -27964,14 +30123,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(deleteAllRowTs_result other) { @@ -27982,42 +30134,45 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -28059,7 +30214,7 @@ } - 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); @@ -28069,18 +30224,18 @@ /** * 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 { @@ -28100,12 +30255,10 @@ */ 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); } } @@ -28114,7 +30267,16 @@ * 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; + } } /** @@ -28153,17 +30315,17 @@ // 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); } @@ -28171,9 +30333,9 @@ } public scannerOpen_args( - byte[] tableName, - byte[] startRow, - List columns) + ByteBuffer tableName, + ByteBuffer startRow, + List columns) { this(); this.tableName = tableName; @@ -28192,8 +30354,8 @@ 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; @@ -28204,22 +30366,34 @@ 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; } @@ -28244,14 +30418,24 @@ * 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; + } + /** * Starting row in table to scan. * 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; } @@ -28275,13 +30459,13 @@ 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); } @@ -28291,7 +30475,7 @@ * 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; } @@ -28300,7 +30484,7 @@ * 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; } @@ -28326,7 +30510,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -28334,7 +30518,7 @@ if (value == null) { unsetStartRow(); } else { - setStartRow((byte[])value); + setStartRow((ByteBuffer)value); } break; @@ -28342,17 +30526,13 @@ 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: @@ -28368,12 +30548,12 @@ 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(); @@ -28385,10 +30565,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -28407,7 +30583,7 @@ 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; } @@ -28416,7 +30592,7 @@ 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; } @@ -28434,24 +30610,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_startRow = true && (isSetStartRow()); - builder.append(present_startRow); - if (present_startRow) - builder.append(startRow); - - boolean present_columns = true && (isSetColumns()); - builder.append(present_columns); - if (present_columns) - builder.append(columns); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerOpen_args other) { @@ -28462,81 +30621,88 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list118 = iprot.readListBegin(); + this.columns = new ArrayList(_list118.size); + for (int _i119 = 0; _i119 < _list118.size; ++_i119) { - TList _list118 = iprot.readListBegin(); - this.columns = new ArrayList(_list118.size); - for (int _i119 = 0; _i119 < _list118.size; ++_i119) - { - byte[] _elem120; - _elem120 = iprot.readBinary(); - this.columns.add(_elem120); - } - iprot.readListEnd(); + ByteBuffer _elem120; + _elem120 = iprot.readBinary(); + this.columns.add(_elem120); } - } 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(); @@ -28562,7 +30728,7 @@ oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter121 : this.columns) + for (ByteBuffer _iter121 : this.columns) { oprot.writeBinary(_iter121); } @@ -28612,7 +30778,7 @@ } - 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); @@ -28626,12 +30792,10 @@ 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); } } @@ -28640,7 +30804,14 @@ * 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; + } } /** @@ -28681,14 +30852,14 @@ 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, + 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpen_result.class, metaDataMap); } @@ -28721,9 +30892,11 @@ 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() { @@ -28794,10 +30967,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -28810,12 +30979,12 @@ 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(); @@ -28825,10 +30994,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -28865,19 +31030,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_success = true; - builder.append(present_success); - if (present_success) - builder.append(success); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerOpen_result other) { @@ -28888,58 +31041,63 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -28989,7 +31147,7 @@ } - 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); @@ -29000,23 +31158,23 @@ /** * 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 { @@ -29041,12 +31199,10 @@ */ 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); } } @@ -29055,7 +31211,18 @@ * 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; + } } /** @@ -29094,19 +31261,19 @@ // 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); } @@ -29114,10 +31281,10 @@ } public scannerOpenWithStop_args( - byte[] tableName, - byte[] startRow, - byte[] stopRow, - List columns) + ByteBuffer tableName, + ByteBuffer startRow, + ByteBuffer stopRow, + List columns) { this(); this.tableName = tableName; @@ -29140,8 +31307,8 @@ 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; @@ -29152,22 +31319,35 @@ 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; } @@ -29192,14 +31372,24 @@ * 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; + } + /** * Starting row in table to scan. * 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; } @@ -29224,14 +31414,24 @@ * scanner's results */ public byte[] getStopRow() { - return this.stopRow; + setStopRow(TBaseHelper.rightSize(stopRow)); + return stopRow.array(); } + public ByteBuffer BufferForStopRow() { + return stopRow; + } + /** * row to stop scanning on. This row is *not* included in the * 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; } @@ -29255,13 +31455,13 @@ 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); } @@ -29271,7 +31471,7 @@ * 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; } @@ -29280,7 +31480,7 @@ * 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; } @@ -29306,7 +31506,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -29314,7 +31514,7 @@ if (value == null) { unsetStartRow(); } else { - setStartRow((byte[])value); + setStartRow((ByteBuffer)value); } break; @@ -29322,7 +31522,7 @@ if (value == null) { unsetStopRow(); } else { - setStopRow((byte[])value); + setStopRow((ByteBuffer)value); } break; @@ -29330,17 +31530,13 @@ 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: @@ -29359,12 +31555,12 @@ 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(); @@ -29378,10 +31574,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -29400,7 +31592,7 @@ 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; } @@ -29409,7 +31601,7 @@ 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; } @@ -29418,7 +31610,7 @@ 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; } @@ -29436,29 +31628,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_startRow = true && (isSetStartRow()); - builder.append(present_startRow); - if (present_startRow) - builder.append(startRow); - - boolean present_stopRow = true && (isSetStopRow()); - builder.append(present_stopRow); - if (present_stopRow) - builder.append(stopRow); - - boolean present_columns = true && (isSetColumns()); - builder.append(present_columns); - if (present_columns) - builder.append(columns); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerOpenWithStop_args other) { @@ -29469,96 +31639,105 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list122 = iprot.readListBegin(); + this.columns = new ArrayList(_list122.size); + for (int _i123 = 0; _i123 < _list122.size; ++_i123) { - TList _list122 = iprot.readListBegin(); - this.columns = new ArrayList(_list122.size); - for (int _i123 = 0; _i123 < _list122.size; ++_i123) - { - byte[] _elem124; - _elem124 = iprot.readBinary(); - this.columns.add(_elem124); - } - iprot.readListEnd(); + ByteBuffer _elem124; + _elem124 = iprot.readBinary(); + this.columns.add(_elem124); } - } 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(); @@ -29589,7 +31768,7 @@ oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter125 : this.columns) + for (ByteBuffer _iter125 : this.columns) { oprot.writeBinary(_iter125); } @@ -29647,7 +31826,7 @@ } - 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); @@ -29661,12 +31840,10 @@ 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); } } @@ -29675,7 +31852,14 @@ * 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; + } } /** @@ -29716,14 +31900,14 @@ 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, + 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenWithStop_result.class, metaDataMap); } @@ -29756,9 +31940,11 @@ 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() { @@ -29829,10 +32015,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -29845,12 +32027,12 @@ 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(); @@ -29860,10 +32042,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -29900,19 +32078,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_success = true; - builder.append(present_success); - if (present_success) - builder.append(success); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerOpenWithStop_result other) { @@ -29923,58 +32089,63 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -30024,7 +32195,7 @@ } - 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); @@ -30034,15 +32205,15 @@ /** * 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 { @@ -30059,12 +32230,10 @@ */ 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); } } @@ -30073,7 +32242,16 @@ * 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; + } } /** @@ -30112,17 +32290,17 @@ // 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); } @@ -30130,9 +32308,9 @@ } public scannerOpenWithPrefix_args( - byte[] tableName, - byte[] startAndPrefix, - List columns) + ByteBuffer tableName, + ByteBuffer startAndPrefix, + List columns) { this(); this.tableName = tableName; @@ -30151,8 +32329,8 @@ 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; @@ -30163,22 +32341,34 @@ 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; } @@ -30202,13 +32392,23 @@ * 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; } @@ -30232,13 +32432,13 @@ 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); } @@ -30246,14 +32446,14 @@ /** * 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; } @@ -30279,7 +32479,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -30287,7 +32487,7 @@ if (value == null) { unsetStartAndPrefix(); } else { - setStartAndPrefix((byte[])value); + setStartAndPrefix((ByteBuffer)value); } break; @@ -30295,17 +32495,13 @@ 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: @@ -30321,12 +32517,12 @@ 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(); @@ -30338,10 +32534,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -30360,7 +32552,7 @@ 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; } @@ -30369,7 +32561,7 @@ 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; } @@ -30387,24 +32579,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_startAndPrefix = true && (isSetStartAndPrefix()); - builder.append(present_startAndPrefix); - if (present_startAndPrefix) - builder.append(startAndPrefix); - - boolean present_columns = true && (isSetColumns()); - builder.append(present_columns); - if (present_columns) - builder.append(columns); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerOpenWithPrefix_args other) { @@ -30415,81 +32590,88 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list126 = iprot.readListBegin(); + this.columns = new ArrayList(_list126.size); + for (int _i127 = 0; _i127 < _list126.size; ++_i127) { - TList _list126 = iprot.readListBegin(); - this.columns = new ArrayList(_list126.size); - for (int _i127 = 0; _i127 < _list126.size; ++_i127) - { - byte[] _elem128; - _elem128 = iprot.readBinary(); - this.columns.add(_elem128); - } - iprot.readListEnd(); + ByteBuffer _elem128; + _elem128 = iprot.readBinary(); + this.columns.add(_elem128); } - } 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(); @@ -30515,7 +32697,7 @@ oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter129 : this.columns) + for (ByteBuffer _iter129 : this.columns) { oprot.writeBinary(_iter129); } @@ -30565,7 +32747,7 @@ } - 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); @@ -30579,12 +32761,10 @@ 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); } } @@ -30593,7 +32773,14 @@ * 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; + } } /** @@ -30634,14 +32821,14 @@ 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, + 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenWithPrefix_result.class, metaDataMap); } @@ -30674,9 +32861,11 @@ 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() { @@ -30747,10 +32936,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -30763,12 +32948,12 @@ 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(); @@ -30778,10 +32963,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -30818,19 +32999,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_success = true; - builder.append(present_success); - if (present_success) - builder.append(success); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerOpenWithPrefix_result other) { @@ -30841,58 +33010,63 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -30942,7 +33116,7 @@ } - 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); @@ -30953,18 +33127,18 @@ /** * 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 */ @@ -30992,12 +33166,10 @@ */ 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); } } @@ -31006,7 +33178,18 @@ * 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; + } } /** @@ -31047,19 +33230,19 @@ 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, - new ListMetaData(TType.LIST, - 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.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")))); + tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenTs_args.class, metaDataMap); } @@ -31067,9 +33250,9 @@ } public scannerOpenTs_args( - byte[] tableName, - byte[] startRow, - List columns, + ByteBuffer tableName, + ByteBuffer startRow, + List columns, long timestamp) { this(); @@ -31093,8 +33276,8 @@ 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; @@ -31106,22 +33289,36 @@ 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; } @@ -31146,14 +33343,24 @@ * 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; + } + /** * Starting row in table to scan. * 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; } @@ -31177,13 +33384,13 @@ 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); } @@ -31193,7 +33400,7 @@ * 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; } @@ -31202,7 +33409,7 @@ * 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; } @@ -31257,7 +33464,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -31265,7 +33472,7 @@ if (value == null) { unsetStartRow(); } else { - setStartRow((byte[])value); + setStartRow((ByteBuffer)value); } break; @@ -31273,7 +33480,7 @@ if (value == null) { unsetColumns(); } else { - setColumns((List)value); + setColumns((List)value); } break; @@ -31288,10 +33495,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -31310,12 +33513,12 @@ 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(); @@ -31329,10 +33532,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -31351,7 +33550,7 @@ 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; } @@ -31360,7 +33559,7 @@ 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; } @@ -31387,29 +33586,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_startRow = true && (isSetStartRow()); - builder.append(present_startRow); - if (present_startRow) - builder.append(startRow); - - boolean present_columns = true && (isSetColumns()); - builder.append(present_columns); - if (present_columns) - builder.append(columns); - - boolean present_timestamp = true; - builder.append(present_timestamp); - if (present_timestamp) - builder.append(timestamp); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerOpenTs_args other) { @@ -31420,97 +33597,106 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list130 = iprot.readListBegin(); + this.columns = new ArrayList(_list130.size); + for (int _i131 = 0; _i131 < _list130.size; ++_i131) { - TList _list130 = iprot.readListBegin(); - this.columns = new ArrayList(_list130.size); - for (int _i131 = 0; _i131 < _list130.size; ++_i131) - { - byte[] _elem132; - _elem132 = iprot.readBinary(); - this.columns.add(_elem132); - } - iprot.readListEnd(); + ByteBuffer _elem132; + _elem132 = iprot.readBinary(); + this.columns.add(_elem132); } - } 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 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(); @@ -31536,7 +33722,7 @@ oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter133 : this.columns) + for (ByteBuffer _iter133 : this.columns) { oprot.writeBinary(_iter133); } @@ -31593,7 +33779,7 @@ } - 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); @@ -31607,12 +33793,10 @@ 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); } } @@ -31621,7 +33805,14 @@ * 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; + } } /** @@ -31662,14 +33853,14 @@ 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, + 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenTs_result.class, metaDataMap); } @@ -31702,9 +33893,11 @@ 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() { @@ -31775,10 +33968,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -31791,12 +33980,12 @@ 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(); @@ -31806,10 +33995,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -31846,19 +34031,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_success = true; - builder.append(present_success); - if (present_success) - builder.append(success); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerOpenTs_result other) { @@ -31869,58 +34042,63 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -31970,7 +34148,7 @@ } - 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); @@ -31982,23 +34160,23 @@ /** * 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 */ @@ -32031,12 +34209,10 @@ */ 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); } } @@ -32045,7 +34221,20 @@ * 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; + } } /** @@ -32086,21 +34275,21 @@ 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, - new ListMetaData(TType.LIST, - 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.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")))); + tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenWithStopTs_args.class, metaDataMap); } @@ -32108,10 +34297,10 @@ } public scannerOpenWithStopTs_args( - byte[] tableName, - byte[] startRow, - byte[] stopRow, - List columns, + ByteBuffer tableName, + ByteBuffer startRow, + ByteBuffer stopRow, + List columns, long timestamp) { this(); @@ -32139,8 +34328,8 @@ 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; @@ -32152,22 +34341,37 @@ 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; } @@ -32192,14 +34396,24 @@ * 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; + } + /** * Starting row in table to scan. * 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; } @@ -32224,14 +34438,24 @@ * scanner's results */ public byte[] getStopRow() { - return this.stopRow; + setStopRow(TBaseHelper.rightSize(stopRow)); + return stopRow.array(); } + public ByteBuffer BufferForStopRow() { + return stopRow; + } + /** * row to stop scanning on. This row is *not* included in the * 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; } @@ -32255,13 +34479,13 @@ 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); } @@ -32271,7 +34495,7 @@ * 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; } @@ -32280,7 +34504,7 @@ * 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; } @@ -32335,7 +34559,7 @@ if (value == null) { unsetTableName(); } else { - setTableName((byte[])value); + setTableName((ByteBuffer)value); } break; @@ -32343,7 +34567,7 @@ if (value == null) { unsetStartRow(); } else { - setStartRow((byte[])value); + setStartRow((ByteBuffer)value); } break; @@ -32351,7 +34575,7 @@ if (value == null) { unsetStopRow(); } else { - setStopRow((byte[])value); + setStopRow((ByteBuffer)value); } break; @@ -32359,7 +34583,7 @@ if (value == null) { unsetColumns(); } else { - setColumns((List)value); + setColumns((List)value); } break; @@ -32374,10 +34598,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TABLE_NAME: @@ -32399,12 +34619,12 @@ 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(); @@ -32420,10 +34640,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -32442,7 +34658,7 @@ 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; } @@ -32451,7 +34667,7 @@ 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; } @@ -32460,7 +34676,7 @@ 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; } @@ -32487,34 +34703,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); - if (present_tableName) - builder.append(tableName); - - boolean present_startRow = true && (isSetStartRow()); - builder.append(present_startRow); - if (present_startRow) - builder.append(startRow); - - boolean present_stopRow = true && (isSetStopRow()); - builder.append(present_stopRow); - if (present_stopRow) - builder.append(stopRow); - - boolean present_columns = true && (isSetColumns()); - builder.append(present_columns); - if (present_columns) - builder.append(columns); - - boolean present_timestamp = true; - builder.append(present_timestamp); - if (present_timestamp) - builder.append(timestamp); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerOpenWithStopTs_args other) { @@ -32525,112 +34714,123 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list134 = iprot.readListBegin(); + this.columns = new ArrayList(_list134.size); + for (int _i135 = 0; _i135 < _list134.size; ++_i135) { - TList _list134 = iprot.readListBegin(); - this.columns = new ArrayList(_list134.size); - for (int _i135 = 0; _i135 < _list134.size; ++_i135) - { - byte[] _elem136; - _elem136 = iprot.readBinary(); - this.columns.add(_elem136); - } - iprot.readListEnd(); + ByteBuffer _elem136; + _elem136 = iprot.readBinary(); + this.columns.add(_elem136); } - } 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(); @@ -32661,7 +34861,7 @@ oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.columns.size())); - for (byte[] _iter137 : this.columns) + for (ByteBuffer _iter137 : this.columns) { oprot.writeBinary(_iter137); } @@ -32726,7 +34926,7 @@ } - 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); @@ -32740,12 +34940,10 @@ 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); } } @@ -32754,7 +34952,14 @@ * 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; + } } /** @@ -32795,14 +35000,14 @@ 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, + 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))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerOpenWithStopTs_result.class, metaDataMap); } @@ -32835,9 +35040,11 @@ 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() { @@ -32908,10 +35115,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -32924,12 +35127,12 @@ 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(); @@ -32939,10 +35142,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -32979,19 +35178,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_success = true; - builder.append(present_success); - if (present_success) - builder.append(success); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerOpenWithStopTs_result other) { @@ -33002,58 +35189,63 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -33103,7 +35295,7 @@ } - 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); @@ -33120,12 +35312,10 @@ */ 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); } } @@ -33134,7 +35324,12 @@ * 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; + } } /** @@ -33175,12 +35370,12 @@ 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); } @@ -33208,9 +35403,10 @@ return new scannerGet_args(this); } - @Deprecated - public scannerGet_args clone() { - return new scannerGet_args(this); + @Override + public void clear() { + setIdIsSet(false); + this.id = 0; } /** @@ -33255,10 +35451,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ID: @@ -33268,12 +35460,12 @@ 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(); @@ -33281,10 +35473,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -33312,14 +35500,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_id = true; - builder.append(present_id); - if (present_id) - builder.append(id); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerGet_args other) { @@ -33330,42 +35511,45 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -33402,7 +35586,7 @@ } - 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); @@ -33419,12 +35603,10 @@ 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); } } @@ -33433,7 +35615,16 @@ * 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; + } } /** @@ -33472,17 +35663,17 @@ // 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, - new ListMetaData(TType.LIST, + 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); } @@ -33523,9 +35714,11 @@ 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() { @@ -33644,10 +35837,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -33663,12 +35852,12 @@ 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(); @@ -33680,10 +35869,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -33729,24 +35914,52 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + return 0; + } - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); + public int compareTo(scannerGet_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); + int lastComparison = 0; + scannerGet_result typedOther = (scannerGet_result)other; - boolean present_ia = true && (isSetIa()); - builder.append(present_ia); - if (present_ia) - builder.append(ia); + 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; + } - return builder.toHashCode(); + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { @@ -33755,51 +35968,48 @@ while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list138 = iprot.readListBegin(); + this.success = new ArrayList(_list138.size); + for (int _i139 = 0; _i139 < _list138.size; ++_i139) { - TList _list138 = iprot.readListBegin(); - this.success = new ArrayList(_list138.size); - for (int _i139 = 0; _i139 < _list138.size; ++_i139) - { - TRowResult _elem140; - _elem140 = new TRowResult(); - _elem140.read(iprot); - this.success.add(_elem140); - } - iprot.readListEnd(); + TRowResult _elem140; + _elem140 = new TRowResult(); + _elem140.read(iprot); + this.success.add(_elem140); } - } 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(); @@ -33872,7 +36082,7 @@ } - 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); @@ -33898,12 +36108,10 @@ */ 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); } } @@ -33912,7 +36120,14 @@ * 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; + } } /** @@ -33954,14 +36169,14 @@ 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, + 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))); - put(_Fields.NB_ROWS, new FieldMetaData("nbRows", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(scannerGetList_args.class, metaDataMap); } @@ -33993,9 +36208,12 @@ 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; } /** @@ -34077,10 +36295,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ID: @@ -34093,12 +36307,12 @@ 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(); @@ -34108,10 +36322,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -34148,19 +36358,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_id = true; - builder.append(present_id); - if (present_id) - builder.append(id); - - boolean present_nbRows = true; - builder.append(present_nbRows); - if (present_nbRows) - builder.append(nbRows); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerGetList_args other) { @@ -34171,58 +36369,63 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -34266,7 +36469,7 @@ } - 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); @@ -34283,12 +36486,10 @@ 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); } } @@ -34297,7 +36498,16 @@ * 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; + } } /** @@ -34336,17 +36546,17 @@ // 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, - new ListMetaData(TType.LIST, + 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); } @@ -34387,9 +36597,11 @@ 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() { @@ -34508,10 +36720,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -34527,12 +36735,12 @@ 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(); @@ -34544,10 +36752,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -34593,24 +36797,52 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + return 0; + } - boolean present_success = true && (isSetSuccess()); - builder.append(present_success); - if (present_success) - builder.append(success); + public int compareTo(scannerGetList_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); + int lastComparison = 0; + scannerGetList_result typedOther = (scannerGetList_result)other; - boolean present_ia = true && (isSetIa()); - builder.append(present_ia); - if (present_ia) - builder.append(ia); + 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; + } - return builder.toHashCode(); + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { @@ -34619,51 +36851,48 @@ while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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 _list142 = iprot.readListBegin(); + this.success = new ArrayList(_list142.size); + for (int _i143 = 0; _i143 < _list142.size; ++_i143) { - TList _list142 = iprot.readListBegin(); - this.success = new ArrayList(_list142.size); - for (int _i143 = 0; _i143 < _list142.size; ++_i143) - { - TRowResult _elem144; - _elem144 = new TRowResult(); - _elem144.read(iprot); - this.success.add(_elem144); - } - iprot.readListEnd(); + TRowResult _elem144; + _elem144 = new TRowResult(); + _elem144.read(iprot); + this.success.add(_elem144); } - } 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(); @@ -34736,7 +36965,7 @@ } - 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); @@ -34753,12 +36982,10 @@ */ 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); } } @@ -34767,7 +36994,12 @@ * 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; + } } /** @@ -34808,12 +37040,12 @@ 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); } @@ -34841,9 +37073,10 @@ return new scannerClose_args(this); } - @Deprecated - public scannerClose_args clone() { - return new scannerClose_args(this); + @Override + public void clear() { + setIdIsSet(false); + this.id = 0; } /** @@ -34888,10 +37121,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ID: @@ -34901,12 +37130,12 @@ 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(); @@ -34914,10 +37143,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -34945,14 +37170,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_id = true; - builder.append(present_id); - if (present_id) - builder.append(id); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerClose_args other) { @@ -34963,42 +37181,45 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -35035,7 +37256,7 @@ } - 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); @@ -35049,12 +37270,10 @@ 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); } } @@ -35063,7 +37282,14 @@ * 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; + } } /** @@ -35102,14 +37328,14 @@ // 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); } @@ -35141,9 +37367,10 @@ 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() { @@ -35215,10 +37442,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case IO: @@ -35231,12 +37454,12 @@ 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(); @@ -35246,10 +37469,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -35286,19 +37505,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_io = true && (isSetIo()); - builder.append(present_io); - if (present_io) - builder.append(io); - - boolean present_ia = true && (isSetIa()); - builder.append(present_ia); - if (present_ia) - builder.append(ia); - - return builder.toHashCode(); + return 0; } public int compareTo(scannerClose_result other) { @@ -35309,58 +37516,63 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); Index: src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java (revision 1076484) +++ src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java (working copy) @@ -1,23 +1,10 @@ /** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Autogenerated by Thrift * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.hbase.thrift.generated; -import org.apache.commons.lang.builder.HashCodeBuilder; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,12 +15,15 @@ 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.*; /** @@ -42,13 +32,13 @@ * 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. */ @@ -56,12 +46,10 @@ 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); } } @@ -70,7 +58,14 @@ * 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; + } } /** @@ -111,14 +106,14 @@ 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); } @@ -126,7 +121,7 @@ } public TCell( - byte[] value, + ByteBuffer value, long timestamp) { this(); @@ -151,16 +146,28 @@ 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; } @@ -209,7 +216,7 @@ if (value == null) { unsetValue(); } else { - setValue((byte[])value); + setValue((ByteBuffer)value); } break; @@ -224,10 +231,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case VALUE: @@ -240,12 +243,12 @@ 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(); @@ -255,10 +258,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -277,7 +276,7 @@ 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; } @@ -295,19 +294,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_value = true && (isSetValue()); - builder.append(present_value); - if (present_value) - builder.append(value); - - boolean present_timestamp = true; - builder.append(present_timestamp); - if (present_timestamp) - builder.append(timestamp); - - return builder.toHashCode(); + return 0; } public int compareTo(TCell other) { @@ -318,57 +305,62 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); Index: src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java (revision 1076484) +++ src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java (working copy) @@ -1,23 +1,10 @@ /** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Autogenerated by Thrift * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.hbase.thrift.generated; -import org.apache.commons.lang.builder.HashCodeBuilder; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,18 +15,21 @@ 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); @@ -48,10 +38,10 @@ 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. */ @@ -62,12 +52,10 @@ 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); } } @@ -76,7 +64,20 @@ * 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; + } } /** @@ -118,20 +119,20 @@ 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); } @@ -139,10 +140,10 @@ } public TRegionInfo( - byte[] startKey, - byte[] endKey, + ByteBuffer startKey, + ByteBuffer endKey, long id, - byte[] name, + ByteBuffer name, byte version) { this(); @@ -178,16 +179,32 @@ 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; } @@ -208,10 +225,20 @@ } 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; } @@ -255,10 +282,20 @@ } 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; } @@ -307,7 +344,7 @@ if (value == null) { unsetStartKey(); } else { - setStartKey((byte[])value); + setStartKey((ByteBuffer)value); } break; @@ -315,7 +352,7 @@ if (value == null) { unsetEndKey(); } else { - setEndKey((byte[])value); + setEndKey((ByteBuffer)value); } break; @@ -331,7 +368,7 @@ if (value == null) { unsetName(); } else { - setName((byte[])value); + setName((ByteBuffer)value); } break; @@ -346,10 +383,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case START_KEY: @@ -371,12 +404,12 @@ 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(); @@ -392,10 +425,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -414,7 +443,7 @@ 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; } @@ -423,7 +452,7 @@ 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; } @@ -441,7 +470,7 @@ 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; } @@ -459,34 +488,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_startKey = true && (isSetStartKey()); - builder.append(present_startKey); - if (present_startKey) - builder.append(startKey); - - boolean present_endKey = true && (isSetEndKey()); - builder.append(present_endKey); - if (present_endKey) - builder.append(endKey); - - boolean present_id = true; - builder.append(present_id); - if (present_id) - builder.append(id); - - boolean present_name = true && (isSetName()); - builder.append(present_name); - if (present_name) - builder.append(name); - - boolean present_version = true; - builder.append(present_version); - if (present_version) - builder.append(version); - - return builder.toHashCode(); + return 0; } public int compareTo(TRegionInfo other) { @@ -497,103 +499,114 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); Index: src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java (revision 1076484) +++ src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java (working copy) @@ -1,23 +1,10 @@ /** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Autogenerated by Thrift * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.hbase.thrift.generated; -import org.apache.commons.lang.builder.HashCodeBuilder; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,37 +15,38 @@ 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); } } @@ -67,7 +55,14 @@ * 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; + } } /** @@ -106,16 +101,16 @@ // 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, - new MapMetaData(TType.MAP, - 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.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 , "Text"), new StructMetaData(TType.STRUCT, TCell.class)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(TRowResult.class, metaDataMap); } @@ -123,8 +118,8 @@ } public TRowResult( - byte[] row, - Map columns) + ByteBuffer row, + Map columns) { this(); this.row = row; @@ -139,13 +134,13 @@ 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); @@ -159,16 +154,27 @@ 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; } @@ -192,18 +198,18 @@ 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; } @@ -229,7 +235,7 @@ if (value == null) { unsetRow(); } else { - setRow((byte[])value); + setRow((ByteBuffer)value); } break; @@ -237,17 +243,13 @@ 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: @@ -260,12 +262,12 @@ 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(); @@ -275,10 +277,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -297,7 +295,7 @@ 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; } @@ -315,65 +313,85 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + return 0; + } - boolean present_row = true && (isSetRow()); - builder.append(present_row); - if (present_row) - builder.append(row); + public int compareTo(TRowResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } - boolean present_columns = true && (isSetColumns()); - builder.append(present_columns); - if (present_columns) - builder.append(columns); + int lastComparison = 0; + TRowResult typedOther = (TRowResult)other; - return builder.toHashCode(); + 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); @@ -394,7 +412,7 @@ 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); Index: src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java (revision 1076484) +++ src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java (working copy) @@ -1,23 +1,10 @@ /** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Autogenerated by Thrift * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.hbase.thrift.generated; -import org.apache.commons.lang.builder.HashCodeBuilder; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,12 +15,15 @@ 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.*; /** @@ -41,7 +31,7 @@ * 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); @@ -54,7 +44,7 @@ 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; @@ -76,12 +66,10 @@ 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); } } @@ -90,7 +78,28 @@ * 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; + } } /** @@ -136,28 +145,28 @@ 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); } @@ -181,7 +190,7 @@ } public ColumnDescriptor( - byte[] name, + ByteBuffer name, int maxVersions, String compression, boolean inMemory, @@ -236,16 +245,42 @@ 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; } @@ -457,7 +492,7 @@ if (value == null) { unsetName(); } else { - setName((byte[])value); + setName((ByteBuffer)value); } break; @@ -528,10 +563,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case NAME: @@ -565,12 +596,12 @@ 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(); @@ -594,10 +625,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -616,7 +643,7 @@ 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; } @@ -697,54 +724,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_name = true && (isSetName()); - builder.append(present_name); - if (present_name) - builder.append(name); - - boolean present_maxVersions = true; - builder.append(present_maxVersions); - if (present_maxVersions) - builder.append(maxVersions); - - boolean present_compression = true && (isSetCompression()); - builder.append(present_compression); - if (present_compression) - builder.append(compression); - - boolean present_inMemory = true; - builder.append(present_inMemory); - if (present_inMemory) - builder.append(inMemory); - - boolean present_bloomFilterType = true && (isSetBloomFilterType()); - builder.append(present_bloomFilterType); - if (present_bloomFilterType) - builder.append(bloomFilterType); - - boolean present_bloomFilterVectorSize = true; - builder.append(present_bloomFilterVectorSize); - if (present_bloomFilterVectorSize) - builder.append(bloomFilterVectorSize); - - boolean present_bloomFilterNbHashes = true; - builder.append(present_bloomFilterNbHashes); - if (present_bloomFilterNbHashes) - builder.append(bloomFilterNbHashes); - - boolean present_blockCacheEnabled = true; - builder.append(present_blockCacheEnabled); - if (present_blockCacheEnabled) - builder.append(blockCacheEnabled); - - boolean present_timeToLive = true; - builder.append(present_timeToLive); - if (present_timeToLive) - builder.append(timeToLive); - - return builder.toHashCode(); + return 0; } public int compareTo(ColumnDescriptor other) { @@ -755,167 +735,186 @@ 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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); Index: src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java (revision 1076484) +++ src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java (working copy) @@ -1,23 +1,10 @@ /** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Autogenerated by Thrift * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.hbase.thrift.generated; -import org.apache.commons.lang.builder.HashCodeBuilder; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,19 +15,22 @@ 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); @@ -51,12 +41,10 @@ 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); } } @@ -65,7 +53,12 @@ * 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; + } } /** @@ -104,12 +97,12 @@ // 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(IllegalArgument.class, metaDataMap); } @@ -136,9 +129,9 @@ return new IllegalArgument(this); } - @Deprecated - public IllegalArgument clone() { - return new IllegalArgument(this); + @Override + public void clear() { + this.message = null; } public String getMessage() { @@ -178,10 +171,6 @@ } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case MESSAGE: @@ -191,12 +180,12 @@ 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(); @@ -204,10 +193,6 @@ throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -235,14 +220,7 @@ @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - - boolean present_message = true && (isSetMessage()); - builder.append(present_message); - if (present_message) - builder.append(message); - - return builder.toHashCode(); + return 0; } public int compareTo(IllegalArgument other) { @@ -253,41 +231,44 @@ int lastComparison = 0; IllegalArgument typedOther = (IllegalArgument)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(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + 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(); Index: src/main/java/org/apache/hadoop/hbase/util/Bytes.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/util/Bytes.java (revision 1076484) +++ src/main/java/org/apache/hadoop/hbase/util/Bytes.java (working copy) @@ -731,6 +731,20 @@ } /** + * 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 Index: pom.xml =================================================================== --- pom.xml (revision 1076484) +++ pom.xml (working copy) @@ -156,6 +156,14 @@ + apache release + https://repository.apache.org/content/repositories/releases/ + + + Cloudera + https://repository.cloudera.com/content/repositories/releases/ + + temp-thrift Thrift 0.2.0 http://people.apache.org/~rawson/repo/ @@ -523,7 +531,7 @@ 2.3.0 1.5.8 1.0.1 - 0.2.0 + 0.5.0 3.3.2 @@ -598,8 +606,8 @@ ${zookeeper.version} - org.apache.thrift - thrift + org.apache.hadoop + libthrift ${thrift.version}