From f44d7b50219771dac953436e34aa8fa47822c563 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 d7730cf891..8c48ee528f 100644 --- a/hbase-shell/src/main/ruby/shell/commands.rb +++ b/hbase-shell/src/main/ruby/shell/commands.rb @@ -116,6 +116,9 @@ module Shell raise "Unknown table #{strs[0]}!" if strs.size == 1 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 @@ -149,7 +152,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