Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6587B200D08 for ; Wed, 23 Aug 2017 06:20:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 641551682F1; Wed, 23 Aug 2017 04:20:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A86711682F0 for ; Wed, 23 Aug 2017 06:20:00 +0200 (CEST) Received: (qmail 27558 invoked by uid 500); 23 Aug 2017 04:19:59 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 27549 invoked by uid 99); 23 Aug 2017 04:19:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Aug 2017 04:19:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 102EAE0AF6; Wed, 23 Aug 2017 04:19:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: stack@apache.org To: commits@hbase.apache.org Message-Id: <8b9d7def0eaf4449883597d8b427f801@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) archived-at: Wed, 23 Aug 2017 04:20:01 -0000 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 Authored: Tue Aug 22 21:19:24 2017 -0700 Committer: Michael Stack 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 callable = new ClientServiceCallable(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. newCaller(this.writeRpcTimeout). - callWithRetries(callable, this.operationTimeout); + return checkAndPut(row, family, qualifier, CompareOp.EQUAL, value, put); } /**