diff --git a/hbase-shell/src/main/ruby/shell/commands/describe.rb b/hbase-shell/src/main/ruby/shell/commands/describe.rb index 5ef02a03a84d..8d0b8c4342cb 100644 --- a/hbase-shell/src/main/ruby/shell/commands/describe.rb +++ b/hbase-shell/src/main/ruby/shell/commands/describe.rb @@ -44,12 +44,19 @@ def command(table) puts end formatter.footer - puts - formatter.header(%w[QUOTAS]) - count = quotas_admin.list_quotas(TABLE => table.to_s) do |_, quota| - formatter.row([quota]) + if admin.exists?(::HBaseQuotasConstants::QUOTA_TABLE_NAME.to_s) + if table.to_s != 'hbase:meta' + # No QUOTAS if hbase:meta table + puts + formatter.header(%w[QUOTAS]) + count = quotas_admin.list_quotas(TABLE => table.to_s) do |_, quota| + formatter.row([quota]) + end + formatter.footer(count) + end + else + puts 'Quota is disabled' end - formatter.footer(count) end # rubocop:enable Metrics/AbcSize, Metrics/MethodLength end