Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 460921831D for ; Sun, 20 Mar 2016 04:23:13 +0000 (UTC) Received: (qmail 90751 invoked by uid 500); 20 Mar 2016 04:23:08 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 90712 invoked by uid 500); 20 Mar 2016 04:23:08 -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 90688 invoked by uid 99); 20 Mar 2016 04:23:08 -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; Sun, 20 Mar 2016 04:23:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E2BD1DFBC8; Sun, 20 Mar 2016 04:23:07 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tedyu@apache.org To: commits@hbase.apache.org Message-Id: <7987964b59324561981a6d0e8605fd73@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: hbase git commit: HBASE-15479 No more garbage or beware of autoboxing (Vladimir Rodionov) Date: Sun, 20 Mar 2016 04:23:07 +0000 (UTC) Repository: hbase Updated Branches: refs/heads/0.98 c26c554ab -> f39c53057 HBASE-15479 No more garbage or beware of autoboxing (Vladimir Rodionov) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f39c5305 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f39c5305 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f39c5305 Branch: refs/heads/0.98 Commit: f39c530577b9ec81c14cd97654bdf9144dae3de3 Parents: c26c554 Author: tedyu Authored: Sat Mar 19 21:22:51 2016 -0700 Committer: tedyu Committed: Sat Mar 19 21:22:51 2016 -0700 ---------------------------------------------------------------------- .../apache/hadoop/hbase/client/AsyncProcess.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/f39c5305/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java index 1143101..ca590fc 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java @@ -324,7 +324,7 @@ class AsyncProcess { // Remember the previous decisions about regions or region servers we put in the // final multi. - Map regionIncluded = new HashMap(); + Map regionIncluded = new HashMap(); Map serverIncluded = new HashMap(); int posInList = -1; @@ -414,10 +414,10 @@ class AsyncProcess { * @return true if this region is considered as busy. */ protected boolean canTakeOperation(HRegionLocation loc, - Map regionsIncluded, + Map regionsIncluded, Map serversIncluded) { - long regionId = loc.getRegionInfo().getRegionId(); - Boolean regionPrevious = regionsIncluded.get(regionId); + HRegionInfo regionInfo = loc.getRegionInfo(); + Boolean regionPrevious = regionsIncluded.get(regionInfo); if (regionPrevious != null) { // We already know what to do with this region. @@ -427,14 +427,14 @@ class AsyncProcess { Boolean serverPrevious = serversIncluded.get(loc.getServerName()); if (Boolean.FALSE.equals(serverPrevious)) { // It's a new region, on a region server that we have already excluded. - regionsIncluded.put(regionId, Boolean.FALSE); + regionsIncluded.put(regionInfo, Boolean.FALSE); return false; } AtomicInteger regionCnt = taskCounterPerRegion.get(loc.getRegionInfo().getRegionName()); if (regionCnt != null && regionCnt.get() >= maxConcurrentTasksPerRegion) { // Too many tasks on this region already. - regionsIncluded.put(regionId, Boolean.FALSE); + regionsIncluded.put(regionInfo, Boolean.FALSE); return false; } @@ -457,7 +457,7 @@ class AsyncProcess { } if (!ok) { - regionsIncluded.put(regionId, Boolean.FALSE); + regionsIncluded.put(regionInfo, Boolean.FALSE); serversIncluded.put(loc.getServerName(), Boolean.FALSE); return false; } @@ -467,7 +467,7 @@ class AsyncProcess { assert serverPrevious.equals(Boolean.TRUE); } - regionsIncluded.put(regionId, Boolean.TRUE); + regionsIncluded.put(regionInfo, Boolean.TRUE); return true; }