You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2019/04/07 00:47:14 UTC

[hbase] branch branch-2 updated (5e03efc -> 0b46ac5)

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a change to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git.


    from 5e03efc  HBASE-22070 Checking restoreDir in RestoreSnapshotHelper
     new 448f267  HBASE-22177 Do not recreate IOException in RawAsyncHBaseAdmin.adminCall
     new 0b46ac5  HBASE-22179 Fix RawAsyncHBaseAdmin.getCompactionState

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java    | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)


[hbase] 02/02: HBASE-22179 Fix RawAsyncHBaseAdmin.getCompactionState

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 0b46ac5db329ce583d71b5060a293d557b70a2ef
Author: zhangduo <zh...@apache.org>
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<CompactionState> regionStates = new ArrayList<>();
+          ConcurrentLinkedQueue<CompactionState> regionStates = new ConcurrentLinkedQueue<>();
           List<CompletableFuture<CompactionState>> 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);
                 }
               }
             });


[hbase] 01/02: HBASE-22177 Do not recreate IOException in RawAsyncHBaseAdmin.adminCall

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 448f26775c2e9eadce65dd3bda9ce943352c14ba
Author: zhangduo <zh...@apache.org>
AuthorDate: Sat Apr 6 22:11:17 2019 +0800

    HBASE-22177 Do not recreate IOException in RawAsyncHBaseAdmin.adminCall
---
 .../main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 851c70a..fb202d6 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
@@ -403,7 +403,7 @@ class RawAsyncHBaseAdmin implements AsyncAdmin {
       @Override
       public void run(PRESP resp) {
         if (controller.failed()) {
-          future.completeExceptionally(new IOException(controller.errorText()));
+          future.completeExceptionally(controller.getFailed());
         } else {
           try {
             future.complete(respConverter.convert(resp));