HBASE-20286 Improving shell command compaction_state

Signed-off-by: Apekshit Sharma <appy@apache.org>
This commit is contained in:
Csaba Skrabak 2018-04-06 15:32:37 -07:00 committed by Apekshit Sharma
parent e4b8bd665a
commit a422310dad
1 changed files with 4 additions and 2 deletions

View File

@ -22,14 +22,16 @@ module Shell
class CompactionState < Command class CompactionState < Command
def help def help
<<-EOF <<-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 'ns1:t1'
hbase> compaction_state 't1' hbase> compaction_state 't1'
EOF EOF
end end
def command(table_name) def command(table_name)
admin.getCompactionState(table_name) rv = admin.getCompactionState(table_name)
formatter.row([rv])
rv
end end
end end
end end