From 62b3ab69d8b0953ed2e85c754d3959349f28f9f7 Mon Sep 17 00:00:00 2001 From: Balazs Meszaros Date: Tue, 27 Mar 2018 15:33:54 +0200 Subject: [PATCH] HBASE-20258 Shell hangs when scanning a disabled table --- hbase-shell/src/main/ruby/shell/commands.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hbase-shell/src/main/ruby/shell/commands.rb b/hbase-shell/src/main/ruby/shell/commands.rb index 990e978dde..c1186216e4 100644 --- a/hbase-shell/src/main/ruby/shell/commands.rb +++ b/hbase-shell/src/main/ruby/shell/commands.rb @@ -114,6 +114,9 @@ module Shell if cause.is_a?(org.apache.hadoop.hbase.TableNotFoundException) raise "Unknown table #{args.first}!" end + if cause.is_a?(org.apache.hadoop.hbase.TableNotEnabledException) + raise "Table #{args.first} is disabled!" + end if cause.is_a?(org.apache.hadoop.hbase.UnknownRegionException) raise "Unknown region #{args.first}!" end @@ -147,7 +150,7 @@ module Shell end # Throw the other exception which hasn't been handled above - raise cause + raise cause.to_s end end end -- 2.16.1