HBASE-15858 Some region server group shell commands don't work
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/1705cb0f Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1705cb0f Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1705cb0f Branch: refs/heads/HBASE-15631-branch-1 Commit: 1705cb0f0a05d7b79021cf18e16c5bd74b3cd427 Parents: 5a12a16 Author: Andrew Purtell <apurt...@apache.org> Authored: Wed Jul 5 15:37:47 2017 -0700 Committer: Andrew Purtell <apurt...@apache.org> Committed: Wed Jul 19 15:32:37 2017 -0700 ---------------------------------------------------------------------- .../src/main/ruby/shell/commands/get_server_rsgroup.rb | 2 +- hbase-shell/src/test/ruby/shell/rsgroup_shell_test.rb | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/1705cb0f/hbase-shell/src/main/ruby/shell/commands/get_server_rsgroup.rb ---------------------------------------------------------------------- diff --git a/hbase-shell/src/main/ruby/shell/commands/get_server_rsgroup.rb b/hbase-shell/src/main/ruby/shell/commands/get_server_rsgroup.rb index 322f6bb..a689a7c 100644 --- a/hbase-shell/src/main/ruby/shell/commands/get_server_rsgroup.rb +++ b/hbase-shell/src/main/ruby/shell/commands/get_server_rsgroup.rb @@ -31,7 +31,7 @@ EOF def command(server) now = Time.now - group_name = rsgroup_admin.getGroupOfServer(server).getName + group_name = rsgroup_admin.getRSGroupOfServer(server).getName formatter.row([group_name]) formatter.footer(now, 1) end http://git-wip-us.apache.org/repos/asf/hbase/blob/1705cb0f/hbase-shell/src/test/ruby/shell/rsgroup_shell_test.rb ---------------------------------------------------------------------- diff --git a/hbase-shell/src/test/ruby/shell/rsgroup_shell_test.rb b/hbase-shell/src/test/ruby/shell/rsgroup_shell_test.rb index d892775..1040ed8 100644 --- a/hbase-shell/src/test/ruby/shell/rsgroup_shell_test.rb +++ b/hbase-shell/src/test/ruby/shell/rsgroup_shell_test.rb @@ -49,12 +49,15 @@ module Hbase assert_not_nil(group) assert_equal(0, group.getServers.count) - hostport = - @rsgroup_admin.getRSGroupInfo('default').getServers.iterator.next.toString + hostport = @rsgroup_admin.getRSGroupInfo('default').getServers.iterator.next + @shell.command('get_rsgroup', 'default') + hostPortStr = hostport.toString + @shell.command('get_server_rsgroup', [hostPortStr]) @shell.command('move_rsgroup_servers', group_name, - [hostport]) + [hostPortStr]) assert_equal(1, @rsgroup_admin.getRSGroupInfo(group_name).getServers.count) + assert_equal(group_name, @rsgroup_admin.getRSGroupOfServer(hostport).getName) @shell.command('move_rsgroup_tables', group_name, @@ -65,7 +68,7 @@ module Hbase @hbase.rsgroup_admin(@formatter).get_rsgroup(group_name) do |line| case count when 1 - assert_equal(hostport, line) + assert_equal(hostPortStr, line) when 3 assert_equal(table_name, line) end