You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2020/03/06 07:31:28 UTC
[hbase] branch master updated: HBASE-23909 : list_regions raise
correct error if it is being splitted/merged/transitioning (#1238)
This is an automated email from the ASF dual-hosted git repository.
vjasani 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 4ef326b HBASE-23909 : list_regions raise correct error if it is being splitted/merged/transitioning (#1238)
4ef326b is described below
commit 4ef326be153f6eca953a39624ec4a3b1a044d55c
Author: Viraj Jasani <vj...@apache.org>
AuthorDate: Fri Mar 6 13:01:17 2020 +0530
HBASE-23909 : list_regions raise correct error if it is being splitted/merged/transitioning (#1238)
Signed-off-by: Wellington Ramos Chevreuil <wc...@apache.org>
Signed-off-by: Peter Somogyi <ps...@apache.org>
Signed-off-by: Jan Hentschel <ja...@ultratendency.com>
---
hbase-shell/src/main/ruby/shell/commands/list_regions.rb | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hbase-shell/src/main/ruby/shell/commands/list_regions.rb b/hbase-shell/src/main/ruby/shell/commands/list_regions.rb
index f748066..262ab1e 100644
--- a/hbase-shell/src/main/ruby/shell/commands/list_regions.rb
+++ b/hbase-shell/src/main/ruby/shell/commands/list_regions.rb
@@ -216,7 +216,12 @@ EOF
def get_regions_for_server(regions_for_table, server_name)
regions_for_table.select do |hregion|
- accept_server_name? server_name, hregion.getServerName.toString
+ actual_server_name = hregion.getServerName
+ if actual_server_name == nil
+ raise "Some regions might be splitting or merging or transitioning due to other" \
+ " reasons"
+ end
+ accept_server_name? server_name, actual_server_name.toString
end
end