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/22 08:44:47 UTC
[hbase] branch master updated: HBASE-22282 Should deal with error
in the callback of RawAsyncHBaseAdmin.splitRegion methods
This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new 38ff46f HBASE-22282 Should deal with error in the callback of RawAsyncHBaseAdmin.splitRegion methods
38ff46f is described below
commit 38ff46f88fc7bc2746b03cf31bef2b1897489021
Author: zhangduo <zh...@apache.org>
AuthorDate: Sun Apr 21 23:03:05 2019 +0800
HBASE-22282 Should deal with error in the callback of RawAsyncHBaseAdmin.splitRegion methods
---
.../java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java | 8 ++++++++
1 file changed, 8 insertions(+)
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 b6ced40..35cb922 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
@@ -1367,6 +1367,10 @@ class RawAsyncHBaseAdmin implements AsyncAdmin {
public CompletableFuture<Void> splitRegion(byte[] regionName) {
CompletableFuture<Void> future = new CompletableFuture<>();
addListener(getRegionLocation(regionName), (location, err) -> {
+ if (err != null) {
+ future.completeExceptionally(err);
+ return;
+ }
RegionInfo regionInfo = location.getRegion();
if (regionInfo.getReplicaId() != RegionInfo.DEFAULT_REPLICA_ID) {
future
@@ -1397,6 +1401,10 @@ class RawAsyncHBaseAdmin implements AsyncAdmin {
"splitPoint is null. If you don't specify a splitPoint, use splitRegion(byte[]) instead");
CompletableFuture<Void> future = new CompletableFuture<>();
addListener(getRegionLocation(regionName), (location, err) -> {
+ if (err != null) {
+ future.completeExceptionally(err);
+ return;
+ }
RegionInfo regionInfo = location.getRegion();
if (regionInfo.getReplicaId() != RegionInfo.DEFAULT_REPLICA_ID) {
future