HBASE-20286 Improving shell command compaction_state Signed-off-by: Apekshit Sharma <a...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a422310d Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a422310d Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a422310d Branch: refs/heads/HBASE-19064 Commit: a422310dadf1fe3c7bb999fe51d6a754fd979b46 Parents: e4b8bd6 Author: Csaba Skrabak <kekcs...@gmail.com> Authored: Fri Apr 6 15:32:37 2018 -0700 Committer: Apekshit Sharma <a...@apache.org> Committed: Fri Apr 6 15:32:37 2018 -0700 ---------------------------------------------------------------------- hbase-shell/src/main/ruby/shell/commands/compaction_state.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/a422310d/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb ---------------------------------------------------------------------- diff --git a/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb b/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb index 91bd79d..05b7521 100644 --- a/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb +++ b/hbase-shell/src/main/ruby/shell/commands/compaction_state.rb @@ -22,14 +22,16 @@ module Shell class CompactionState < Command def help <<-EOF - Gets compaction status for a table: + Gets compaction status (MAJOR, MAJOR_AND_MINOR, MINOR, NONE) for a table: hbase> compaction_state 'ns1:t1' hbase> compaction_state 't1' EOF end def command(table_name) - admin.getCompactionState(table_name) + rv = admin.getCompactionState(table_name) + formatter.row([rv]) + rv end end end