From commits-return-84653-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Sun Apr 7 06:43:00 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (unknown [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5B5F9180784 for ; Sun, 7 Apr 2019 08:42:59 +0200 (CEST) Received: (qmail 5426 invoked by uid 500); 7 Apr 2019 06:23:20 -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 5092 invoked by uid 99); 7 Apr 2019 06:23:19 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Apr 2019 06:23:19 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id D209481DA9; Sun, 7 Apr 2019 00:47:30 +0000 (UTC) Date: Sun, 07 Apr 2019 00:47:32 +0000 To: "commits@hbase.apache.org" Subject: [hbase] 02/02: HBASE-22179 Fix RawAsyncHBaseAdmin.getCompactionState MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: zhangduo@apache.org In-Reply-To: <155459805068.32451.7603022977644529915@gitbox.apache.org> References: <155459805068.32451.7603022977644529915@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: hbase X-Git-Refname: refs/heads/branch-2.2 X-Git-Reftype: branch X-Git-Rev: 67304694b3723d412545482c71515f278e5decf6 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20190407004730.D209481DA9@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. zhangduo pushed a commit to branch branch-2.2 in repository https://gitbox.apache.org/repos/asf/hbase.git commit 67304694b3723d412545482c71515f278e5decf6 Author: zhangduo AuthorDate: Sat Apr 6 22:17:46 2019 +0800 HBASE-22179 Fix RawAsyncHBaseAdmin.getCompactionState --- .../java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java index fb202d6..55c6598 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java @@ -36,6 +36,7 @@ import java.util.Optional; import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import java.util.function.BiConsumer; @@ -2931,7 +2932,7 @@ class RawAsyncHBaseAdmin implements AsyncAdmin { future.completeExceptionally(err); return; } - List regionStates = new ArrayList<>(); + ConcurrentLinkedQueue regionStates = new ConcurrentLinkedQueue<>(); List> futures = new ArrayList<>(); locations.stream().filter(loc -> loc.getServerName() != null) .filter(loc -> loc.getRegion() != null).filter(loc -> !loc.getRegion().isOffline()) @@ -2973,9 +2974,9 @@ class RawAsyncHBaseAdmin implements AsyncAdmin { case NONE: default: } - if (!future.isDone()) { - future.complete(state); - } + } + if (!future.isDone()) { + future.complete(state); } } });