HBASE-20258 Shell hangs when scanning a disabled table
Signed-off-by: Mike Drob <mdrob@apache.org>
This commit is contained in:
parent
8014c5c3ac
commit
143ed0d19d
|
@ -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
|
||||
|
|
|
@ -695,5 +695,16 @@ module Hbase
|
|||
assert_equal(0, splits.size)
|
||||
assert_equal([], splits)
|
||||
end
|
||||
|
||||
define_test "scan should throw an exception on a disabled table" do
|
||||
@test_table.disable
|
||||
begin
|
||||
assert_raise(RuntimeError) do
|
||||
@test_table.scan
|
||||
end
|
||||
ensure
|
||||
@test_table.enable
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue