Hbase 26275 update error message when executing deleteall with ROWPREFIXFILTER in meta table (#4205)
Signed-off-by: Xiaolin Ha <haxiaolin@apache.org>
This commit is contained in:
parent
e008cb836d
commit
4ff63f6570
|
@ -244,7 +244,11 @@ EOF
|
|||
# delete operation doesn't need read permission. Retaining the read check for
|
||||
# meta table as a part of HBASE-5837.
|
||||
if is_meta_table?
|
||||
raise ArgumentError, 'Row Not Found' if _get_internal(row).nil?
|
||||
if row.is_a?(Hash) and row.key?('ROWPREFIXFILTER')
|
||||
raise ArgumentError, 'deleteall with ROWPREFIXFILTER in hbase:meta is not allowed.'
|
||||
else
|
||||
raise ArgumentError, 'Row Not Found' if _get_internal(row).nil?
|
||||
end
|
||||
end
|
||||
if row.is_a?(Hash)
|
||||
_deleterows_internal(row, column, timestamp, args, all_version)
|
||||
|
|
|
@ -194,6 +194,13 @@ module Hbase
|
|||
assert_nil(res2)
|
||||
end
|
||||
|
||||
define_test "deleteall with row prefix in hbase:meta should not be allowed." do
|
||||
assert_raise(ArgumentError) do
|
||||
@meta_table = table('hbase:meta')
|
||||
@meta_table.deleteall({ROWPREFIXFILTER => "test_meta"})
|
||||
end
|
||||
end
|
||||
|
||||
define_test "append should work with value" do
|
||||
@test_table.append("123", 'x:cnt2', '123')
|
||||
assert_equal("123123", @test_table._append_internal("123", 'x:cnt2', '123'))
|
||||
|
|
Loading…
Reference in New Issue