for (TKeyValue kv : mutation.getPut().getValues()) {
put.add(kv.getKey().getFamily(), kv.getKey().getQualifier(), newRowLock.getCurrentTimestamp(), kv.getValue());
}
if (!table.checkAndPut(row, LOCK_FAMILY, LOCK_QUALIFIER, currentRowLockBytes, put)) {
// Consider as conflict because another transaction might acquire lock of this row.
throw new ConflictException("can't acquire row's lock");
} else {
rowTxState.setCurrent(newRowLock);
}
break;
}
case REMOVE: {
Delete delete = new Delete(row);
if (mutation.getRemove().getRemoveFamiliesSize() > 0) {
for (ByteBuffer removeFamily : mutation.getRemove().getRemoveFamilies()) {
delete.deleteFamily(removeFamily.array(), mutationTimestamp);
}
}
if (mutation.getRemove().getRemoveCellsSize() > 0) {
for (TCellKey removeCell : mutation.getRemove().getRemoveCells()) {
delete.deleteColumns(removeCell.getFamily(), removeCell.getQualifier(), mutationTimestamp);
}
}
if (!table.checkAndDelete(row, LOCK_FAMILY, LOCK_QUALIFIER, currentRowLockBytes, delete)) {
// Consider as conflict because another transaction might acquire lock of this row.
throw new ConflictException("can't acquire row's lock");
}
break;
}
default:
break;