HBASE-18660 Remove duplicate code from the checkAndPut method in HTable (Yun Zhao)

This commit is contained in:
Michael Stack 2017-08-22 21:19:24 -07:00
parent 3be5e8ce00
commit 7b8cf37c3b
1 changed files with 1 additions and 13 deletions

View File

@ -747,19 +747,7 @@ public class HTable implements Table {
final byte [] family, final byte [] qualifier, final byte [] value,
final Put put)
throws IOException {
ClientServiceCallable<Boolean> callable = new ClientServiceCallable<Boolean>(this.connection, getName(), row,
this.rpcControllerFactory.newController(), put.getPriority()) {
@Override
protected Boolean rpcCall() throws Exception {
MutateRequest request = RequestConverter.buildMutateRequest(
getLocation().getRegionInfo().getRegionName(), row, family, qualifier,
new BinaryComparator(value), CompareType.EQUAL, put);
MutateResponse response = doMutate(request);
return Boolean.valueOf(response.getProcessed());
}
};
return rpcCallerFactory.<Boolean> newCaller(this.writeRpcTimeout).
callWithRetries(callable, this.operationTimeout);
return checkAndPut(row, family, qualifier, CompareOp.EQUAL, value, put);
}
/**