You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2017/07/19 00:44:56 UTC

[14/21] hbase git commit: HBASE-15858 Some region server group shell commands don't work

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/2669ccab
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2669ccab
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2669ccab

Branch: refs/heads/HBASE-15631-branch-1
Commit: 2669ccab561b919bf8f2e5606797ad6514f794ac
Parents: aa8a1b8
Author: Andrew Purtell <ap...@apache.org>
Authored: Wed Jul 5 15:37:47 2017 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Tue Jul 18 17:44:31 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/2669ccab/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/2669ccab/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