@Override public void mutateRow(ByteBuffer table, TRowMutations rowMutations) throws TIOError, TException { checkReadOnlyMode(); Table htable = getTable(table); try { htable.mutateRow(rowMutationsFromThrift(rowMutations)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } }
@Override public boolean checkAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, TCompareOp compareOp, ByteBuffer value, TRowMutations rowMutations) throws TIOError, TException { checkReadOnlyMode(); try (final Table htable = getTable(table)) { return htable.checkAndMutate(byteBufferToByteArray(row), byteBufferToByteArray(family)) .qualifier(byteBufferToByteArray(qualifier)) .ifMatches(compareOpFromThrift(compareOp), byteBufferToByteArray(value)) .thenMutate(rowMutationsFromThrift(rowMutations)); } catch (IOException e) { throw getTIOError(e); } }
@Override public void mutateRow(ByteBuffer table, TRowMutations rowMutations) throws TIOError, TException { checkReadOnlyMode(); Table htable = getTable(table); try { htable.mutateRow(rowMutationsFromThrift(rowMutations)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } }
@Override public void mutateRow(ByteBuffer table, TRowMutations rowMutations) throws TIOError, TException { checkReadOnlyMode(); Table htable = getTable(table); try { htable.mutateRow(rowMutationsFromThrift(rowMutations)); } catch (IOException e) { throw getTIOError(e); } finally { closeTable(htable); } }
@Override public boolean checkAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, TCompareOp compareOp, ByteBuffer value, TRowMutations rowMutations) throws TIOError, TException { checkReadOnlyMode(); try (final Table htable = getTable(table)) { return htable.checkAndMutate(byteBufferToByteArray(row), byteBufferToByteArray(family)) .qualifier(byteBufferToByteArray(qualifier)) .ifMatches(compareOpFromThrift(compareOp), byteBufferToByteArray(value)) .thenMutate(rowMutationsFromThrift(rowMutations)); } catch (IOException e) { throw getTIOError(e); } }
@Override public boolean checkAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, TCompareOp compareOp, ByteBuffer value, TRowMutations rowMutations) throws TIOError, TException { checkReadOnlyMode(); try (final Table htable = getTable(table)) { return htable.checkAndMutate(byteBufferToByteArray(row), byteBufferToByteArray(family)) .qualifier(byteBufferToByteArray(qualifier)) .ifMatches(compareOpFromThrift(compareOp), byteBufferToByteArray(value)) .thenMutate(rowMutationsFromThrift(rowMutations)); } catch (IOException e) { throw getTIOError(e); } }