@Test public void testExists() throws TIOError, TException { ThriftHBaseServiceHandler handler = createHandler(); byte[] rowName = "testExists".getBytes(); ByteBuffer table = wrap(tableAname); TGet get = new TGet(wrap(rowName)); assertFalse(handler.exists(table, get)); List<TColumnValue> columnValues = new ArrayList<TColumnValue>(); columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname))); columnValues.add(new TColumnValue(wrap(familyBname), wrap(qualifierBname), wrap(valueBname))); TPut put = new TPut(wrap(rowName), columnValues); put.setColumnValues(columnValues); handler.put(table, put); assertTrue(handler.exists(table, get)); }
@Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { HTableInterface htable = getTable(table); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } }
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { HTableInterface htable = getTable(table); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } }
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { HTableInterface htable = getTable(table); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } ThriftHBaseServiceHandler(Configuration conf); }
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { HTableInterface htable = getTable(table); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } ThriftHBaseServiceHandler(Configuration conf); static THBaseService.Iface newInstance(Configuration conf, ThriftMetrics metrics); @Override boolean exists(ByteBuffer table, TGet get); @Override TResult get(ByteBuffer table, TGet get); @Override List<TResult> getMultiple(ByteBuffer table, List<TGet> gets); @Override void put(ByteBuffer table, TPut put); @Override boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family,
      ByteBuffer qualifier, ByteBuffer value, TPut put); @Override void putMultiple(ByteBuffer table, List<TPut> puts); @Override void deleteSingle(ByteBuffer table, TDelete deleteSingle); @Override List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> deletes); @Override boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family,
      ByteBuffer qualifier, ByteBuffer value, TDelete deleteSingle); @Override TResult increment(ByteBuffer table, TIncrement increment); @Override TResult append(ByteBuffer table, TAppend append); @Override int openScanner(ByteBuffer table, TScan scan); @Override List<TResult> getScannerRows(int scannerId, int numRows); @Override List<TResult> getScannerResults(ByteBuffer table, TScan scan, int numRows); @Override void closeScanner(int scannerId); @Override void mutateRow(ByteBuffer table, TRowMutations rowMutations); }
ThriftHBaseServiceHandler implements THBaseService.Iface { @Override public boolean exists(ByteBuffer table, TGet get) throws TIOError, TException { HTableInterface htable = getTable(table); try { return htable.exists(getFromThrift(get)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } } ThriftHBaseServiceHandler(Configuration conf); static THBaseService.Iface newInstance(Configuration conf, ThriftMetrics metrics); @Override boolean exists(ByteBuffer table, TGet get); @Override TResult get(ByteBuffer table, TGet get); @Override List<TResult> getMultiple(ByteBuffer table, List<TGet> gets); @Override void put(ByteBuffer table, TPut put); @Override boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family,
      ByteBuffer qualifier, ByteBuffer value, TPut put); @Override void putMultiple(ByteBuffer table, List<TPut> puts); @Override void deleteSingle(ByteBuffer table, TDelete deleteSingle); @Override List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> deletes); @Override boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family,
      ByteBuffer qualifier, ByteBuffer value, TDelete deleteSingle); @Override TResult increment(ByteBuffer table, TIncrement increment); @Override TResult append(ByteBuffer table, TAppend append); @Override int openScanner(ByteBuffer table, TScan scan); @Override List<TResult> getScannerRows(int scannerId, int numRows); @Override List<TResult> getScannerResults(ByteBuffer table, TScan scan, int numRows); @Override void closeScanner(int scannerId); @Override void mutateRow(ByteBuffer table, TRowMutations rowMutations);  }