HBASE-20258 Shell hangs when scanning a disabled table
Signed-off-by: Mike Drob <mdrob@apache.org>
This commit is contained in:
parent
4772a4ebdd
commit
a8994afbfe
|
@ -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
|
||||
|
|
|
@ -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