hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [15/22] hbase git commit: HBASE-15858 Some region server group shell commands don't work
Date Wed, 19 Jul 2017 23:21:51 GMT
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/2d09a560
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2d09a560
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2d09a560

Branch: refs/heads/HBASE-15631-branch-1
Commit: 2d09a56011222ab2c40e063afd41e4fc479a790e
Parents: 9629f31
Author: Andrew Purtell <apurtell@apache.org>
Authored: Wed Jul 5 15:37:47 2017 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Wed Jul 19 16:21:10 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/2d09a560/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/2d09a560/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


Mime
View raw message