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 a8994afbfe
commit 17b84cfb9b
1 changed files with 4 additions and 2 deletions

View File

@ -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