Repository: hbase Updated Branches: refs/heads/master 3be5e8ce0 -> 7b8cf37c3
HBASE-18660 Remove duplicate code from the checkAndPut method in HTable (Yun Zhao) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/7b8cf37c Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7b8cf37c Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7b8cf37c Branch: refs/heads/master Commit: 7b8cf37c3b7cd82ba2e41947b64bf98bed121c55 Parents: 3be5e8c Author: Michael Stack <[email protected]> Authored: Tue Aug 22 21:19:24 2017 -0700 Committer: Michael Stack <[email protected]> Committed: Tue Aug 22 21:19:24 2017 -0700 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hbase/client/HTable.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/7b8cf37c/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java index 2920281..43b05f4 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java @@ -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); } /**
