hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From syuanji...@apache.org
Subject [09/50] hbase git commit: HBASE-15858 Some region server group shell commands don't work
Date Sat, 11 Jun 2016 04:55:55 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/a0f49c98
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a0f49c98
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a0f49c98

Branch: refs/heads/hbase-12439
Commit: a0f49c988419d48f6c655f46ac78f8199c643b50
Parents: 53eb27b
Author: tedyu <yuzhihong@gmail.com>
Authored: Wed Jun 1 21:13:33 2016 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Wed Jun 1 21:13:33 2016 -0700

----------------------------------------------------------------------
 hbase-shell/src/main/ruby/shell/commands/get_rsgroup.rb  |  2 +-
 .../src/main/ruby/shell/commands/get_server_rsgroup.rb   |  2 +-
 hbase-shell/src/test/ruby/shell/rsgroup_shell_test.rb    | 11 +++++++----
 3 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/a0f49c98/hbase-shell/src/main/ruby/shell/commands/get_rsgroup.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/main/ruby/shell/commands/get_rsgroup.rb b/hbase-shell/src/main/ruby/shell/commands/get_rsgroup.rb
index 6772aa1..ce4be71 100644
--- a/hbase-shell/src/main/ruby/shell/commands/get_rsgroup.rb
+++ b/hbase-shell/src/main/ruby/shell/commands/get_rsgroup.rb
@@ -34,7 +34,7 @@ EOF
       def command(group_name)
         now = Time.now
         formatter.header(['GROUP INFORMATION'])
-        group_admin.get_rsgroup(group_name) do |s|
+        rsgroup_admin.get_rsgroup(group_name) do |s|
           formatter.row([s])
         end
         formatter.footer(now)

http://git-wip-us.apache.org/repos/asf/hbase/blob/a0f49c98/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/a0f49c98/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