HBASE-25497 move_namespaces_rsgroup should change hbase.rsgroup.name … (#2875)

* HBASE-25497 move_namespaces_rsgroup should change hbase.rsgroup.name config in NamespaceDescriptor

Signed-off-by: Zheng Wang <wangzheng@apache.org>
This commit is contained in:
xijiawen 2021-01-18 18:57:02 +08:00 committed by GitHub
parent d5debe15b5
commit 9e9bec24d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -31,6 +31,10 @@ CMD
def command(dest, namespaces)
rsgroup_admin.move_namespaces(dest, namespaces)
namespaces.each do |ns|
arg = {'METHOD' => 'set', 'hbase.rsgroup.name' => dest}
admin.alter_namespace(ns, arg)
end
end
end
end

View File

@ -114,8 +114,16 @@ module Hbase
assert_not_nil(group)
assert_true(@admin.listTablesInRSGroup(group_name).contains(org.apache.hadoop.hbase.TableName.valueOf(ns_table_name)))
ns_table_name2 = 'test_namespace:test_ns_table2'
@shell.command(:create, ns_table_name2, 'f')
assert_true(@admin.listTablesInRSGroup(group_name).contains(org.apache.hadoop.hbase.TableName.valueOf(ns_table_name2)))
assert_equal(2, @admin.listTablesInRSGroup(group_name).count)
@shell.command(:disable, ns_table_name)
@shell.command(:drop, ns_table_name)
@shell.command(:disable, ns_table_name2)
@shell.command(:drop, ns_table_name2)
@shell.command(:drop_namespace, namespace_name)
remove_rsgroup(group_name)
end