HBASE-25300 'Unknown table hbase:quota' happens when desc table in shell if quota disabled (#2673)
Signed-off-by: Guanghao Zhang <zghao@apache.org> Signed-off-by: Pankaj Kumar<pankajkumar@apache.org>
This commit is contained in:
parent
4d41de1df0
commit
9769e3fe7b
@ -44,14 +44,18 @@ EOF
|
|||||||
puts
|
puts
|
||||||
end
|
end
|
||||||
formatter.footer
|
formatter.footer
|
||||||
if table.to_s != 'hbase:meta'
|
if admin.exists?(::HBaseQuotasConstants::QUOTA_TABLE_NAME.to_s)
|
||||||
# No QUOTAS if hbase:meta table
|
if table.to_s != 'hbase:meta'
|
||||||
puts
|
# No QUOTAS if hbase:meta table
|
||||||
formatter.header(%w[QUOTAS])
|
puts
|
||||||
count = quotas_admin.list_quotas(::HBaseConstants::TABLE => table.to_s) do |_, quota|
|
formatter.header(%w[QUOTAS])
|
||||||
formatter.row([quota])
|
count = quotas_admin.list_quotas(::HBaseConstants::TABLE => table.to_s) do |_, quota|
|
||||||
|
formatter.row([quota])
|
||||||
|
end
|
||||||
|
formatter.footer(count)
|
||||||
end
|
end
|
||||||
formatter.footer(count)
|
else
|
||||||
|
puts 'Quota is disabled'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
||||||
|
Loading…
x
Reference in New Issue
Block a user