From a422310dadf1fe3c7bb999fe51d6a754fd979b46 Mon Sep 17 00:00:00 2001 From: Csaba Skrabak Date: Fri, 6 Apr 2018 15:32:37 -0700 Subject: [PATCH] HBASE-20286 Improving shell command compaction_state Signed-off-by: Apekshit Sharma --- .../src/main/ruby/shell/commands/compaction_state.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 91bd79d1880..05b75210c99 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