@Override public void increment(TIncrement tincrement) throws IOError, TException { if (tincrement.getRow().length == 0 || tincrement.getTable().length == 0) { throw new TException("Must supply a table and a row key; can't increment"); } if (conf.getBoolean(COALESCE_INC_KEY, false)) { this.coalescer.queueIncrement(tincrement); return; } Table table = null; try { table = getTable(tincrement.getTable()); Increment inc = ThriftUtilities.incrementFromThrift(tincrement); table.increment(inc); } catch (IOException e) { LOG.warn(e.getMessage(), e); throw getIOError(e); } finally{ closeTable(table); } }
@Override public void increment(TIncrement tincrement) throws IOError, TException { if (tincrement.getRow().length == 0 || tincrement.getTable().length == 0) { throw new TException("Must supply a table and a row key; can't increment"); } if (conf.getBoolean(COALESCE_INC_KEY, false)) { this.coalescer.queueIncrement(tincrement); return; } try { HTable table = getTable(tincrement.getTable()); Increment inc = ThriftUtilities.incrementFromThrift(tincrement); table.increment(inc); } catch (IOException e) { LOG.warn(e.getMessage(), e); throw new IOError(e.getMessage()); } }
@Override public void increment(TIncrement tincrement) throws IOError, TException { if (tincrement.getRow().length == 0 || tincrement.getTable().length == 0) { throw new TException("Must supply a table and a row key; can't increment"); } if (conf.getBoolean(COALESCE_INC_KEY, false)) { this.coalescer.queueIncrement(tincrement); return; } Table table = null; try { table = getTable(tincrement.getTable()); Increment inc = ThriftUtilities.incrementFromThrift(tincrement); table.increment(inc); } catch (IOException e) { LOG.warn(e.getMessage(), e); throw getIOError(e); } finally{ closeTable(table); } }
@Override public void increment(TIncrement tincrement) throws IOError, TException { if (tincrement.getRow().length == 0 || tincrement.getTable().length == 0) { throw new TException("Must supply a table and a row key; can't increment"); } if (conf.getBoolean(COALESCE_INC_KEY, false)) { this.coalescer.queueIncrement(tincrement); return; } Table table = null; try { table = getTable(tincrement.getTable()); Increment inc = ThriftUtilities.incrementFromThrift(tincrement); table.increment(inc); } catch (IOException e) { LOG.warn(e.getMessage(), e); throw getIOError(e); } finally{ closeTable(table); } }