if (LOG.isTraceEnabled()) LOG.trace(get.toString()); try { if (opts.multiGet > 0) {
if (LOG.isTraceEnabled()) LOG.trace(get.toString()); if (opts.multiGet > 0) { this.gets.add(get);
@Override public String toString() { return get.toString(); } }
@Override public String toString() { return get.toString(); } }
/** * Execute get on a list of {@link Get} * * @param hTable HTable * @param get {@link Get} * @return {@link Result} from the get call */ public static Result performGet(HTableInterface hTable, Get get) { try { return hTable.get(get); } catch (IOException e) { String msg = String.format("HBase table get failed for get %s", get.toString()); throw createException(msg, e, hTable); } }
/** * Get the latest txid to successfully update the given counter * @param row The row key * @param fam The column family * @param qual The column qualifier of the txid (e.g. the counters qualifier + "_txid") * @return The latest txid */ private BigInteger getLatestTxid(byte[] row, byte[] fam, byte[] qual) { Get getTxid = new Get(row); getTxid.addColumn(fam, qual); BigInteger latestTxid = null; try { Result res = connector.getTable().get(getTxid); if (!res.isEmpty()) { latestTxid = new BigInteger(res.getValue(fam, qual)); } } catch (IOException e) { throw new RuntimeException("Unable to get txid for " + getTxid.toString(), e); } return latestTxid; }
.get(spreadsheetId, range); System.out.println("Get respuesta --> " +respuesta.toString()); System.out.println("Exe respuesta --> " +respuesta.execute());
/** * Executes the given Get request. * * @param table * hbase table * @param get * Get * @return List<Cell> * @throws IOException * Signals that an I/O exception has occurred. */ private List<Cell> executeGetRequest(HTable table, Get get) throws IOException { LOGGER.info("Get :" + get.toString()); table = (HTable) HBaseConfigurationUtil.getConnection().getTable( ConfigurationUtil.getTableName()); Result result = table.get(get); List<Cell> cells = result.getColumnCells( ConfigurationUtil.getColumnFamily(), ConfigurationUtil.getColumnQualifier()); return cells; }
if (LOG.isTraceEnabled()) LOG.trace(get.toString()); try { if (opts.multiGet > 0) {
if (LOG.isTraceEnabled()) LOG.trace(get.toString()); if (opts.multiGet > 0) { this.gets.add(get);
if (LOG.isTraceEnabled()) LOG.trace(get.toString()); try { if (opts.multiGet > 0) {
@Override void testRow(final int i) throws IOException, InterruptedException { if (opts.randomSleep > 0) { Thread.sleep(rd.nextInt(opts.randomSleep)); } Get get = new Get(getRandomRow(this.rand, opts.totalRows)); if (opts.addColumns) { get.addColumn(FAMILY_NAME, QUALIFIER_NAME); } else { get.addFamily(FAMILY_NAME); } if (opts.filterAll) { get.setFilter(new FilterAllFilter()); } get.setConsistency(consistency); if (LOG.isTraceEnabled()) LOG.trace(get.toString()); if (opts.multiGet > 0) { this.gets.add(get); if (this.gets.size() == opts.multiGet) { Result [] rs = this.table.get(this.gets); updateValueSize(rs); this.gets.clear(); } } else { updateValueSize(this.table.get(get)); } }