hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-18660 Remove duplicate code from the checkAndPut method in HTable (Yun Zhao)
Date Wed, 23 Aug 2017 04:19:59 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 28909b8f1 -> 9c36c0c52


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/9c36c0c5
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9c36c0c5
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9c36c0c5

Branch: refs/heads/branch-2
Commit: 9c36c0c52f53bd365e73225315920a8712c64f62
Parents: 28909b8
Author: Michael Stack <stack@apache.org>
Authored: Tue Aug 22 21:19:24 2017 -0700
Committer: Michael Stack <stack@apache.org>
Committed: Tue Aug 22 21:19:53 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/9c36c0c5/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);
   }
 
   /**


Mime
View raw message