HBASE-20286 Improving shell command compaction_state
Signed-off-by: Apekshit Sharma <appy@apache.org>
This commit is contained in:
parent
e4b8bd665a
commit
a422310dad
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue