HBASE-17496 RSGroup shell commands:get_server_rsgroup don't work and commands display an incorrect result size (Guangxu Cheng)
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/7bd973c5 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7bd973c5 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7bd973c5 Branch: refs/heads/HBASE-15631-branch-1 Commit: 7bd973c5c3c8a3a0e729b2c545fc78c67894a478 Parents: 582977f Author: Andrew Purtell <apurt...@apache.org> Authored: Wed Jul 5 18:23:19 2017 -0700 Committer: Andrew Purtell <apurt...@apache.org> Committed: Wed Jul 19 15:32:37 2017 -0700 ---------------------------------------------------------------------- hbase-shell/src/main/ruby/shell/commands/get_rsgroup.rb | 5 ++--- hbase-shell/src/main/ruby/shell/commands/get_server_rsgroup.rb | 5 ++--- hbase-shell/src/main/ruby/shell/commands/get_table_rsgroup.rb | 3 +-- hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb | 3 +-- 4 files changed, 6 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/7bd973c5/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 122020a..a5b41af 100644 --- a/hbase-shell/src/main/ruby/shell/commands/get_rsgroup.rb +++ b/hbase-shell/src/main/ruby/shell/commands/get_rsgroup.rb @@ -33,12 +33,11 @@ EOF end def command(group_name) - now = Time.now - formatter.header(['RSGROUP '.concat(group_name)]) + formatter.header(['GROUP INFORMATION']) rsgroup_admin.get_rsgroup(group_name) do |s| formatter.row([s]) end - formatter.footer(now) + formatter.footer() end end end http://git-wip-us.apache.org/repos/asf/hbase/blob/7bd973c5/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 dddf080..fd2ccc7 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 @@ -33,10 +33,9 @@ EOF end def command(server) - now = Time.now - group_name = rsgroup_admin.getRSGroupOfServer(server).getName + group_name = rsgroup_admin.get_rsgroup_of_server(server).getName formatter.row([group_name]) - formatter.footer(now, 1) + formatter.footer(1) end end end http://git-wip-us.apache.org/repos/asf/hbase/blob/7bd973c5/hbase-shell/src/main/ruby/shell/commands/get_table_rsgroup.rb ---------------------------------------------------------------------- diff --git a/hbase-shell/src/main/ruby/shell/commands/get_table_rsgroup.rb b/hbase-shell/src/main/ruby/shell/commands/get_table_rsgroup.rb index 6939c12..9684687 100644 --- a/hbase-shell/src/main/ruby/shell/commands/get_table_rsgroup.rb +++ b/hbase-shell/src/main/ruby/shell/commands/get_table_rsgroup.rb @@ -33,11 +33,10 @@ EOF end def command(table) - now = Time.now group_name = rsgroup_admin.get_rsgroup_of_table(table).getName formatter.row([group_name]) - formatter.footer(now, 1) + formatter.footer(1) end end end http://git-wip-us.apache.org/repos/asf/hbase/blob/7bd973c5/hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb ---------------------------------------------------------------------- diff --git a/hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb b/hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb index 5ab923a..393797d 100644 --- a/hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb +++ b/hbase-shell/src/main/ruby/shell/commands/list_rsgroups.rb @@ -35,7 +35,6 @@ EOF end def command(regex = '.*') - now = Time.now formatter.header(['GROUPS']) regex = /#{regex}/ unless regex.is_a?(Regexp) @@ -44,7 +43,7 @@ EOF formatter.row([group]) end - formatter.footer(now, list.size) + formatter.footer(list.size) end end end