This is an automated email from the ASF dual-hosted git repository.

zghao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 2b61b99  HBASE-25300 'Unknown table hbase:quota' happens when desc 
table in shell if quota disabled (#2673)
2b61b99 is described below

commit 2b61b99668bfc7b969a60c88aaf020b984c881a9
Author: XinSun <ddu...@gmail.com>
AuthorDate: Thu Nov 19 09:16:25 2020 +0800

    HBASE-25300 'Unknown table hbase:quota' happens when desc table in shell if 
quota disabled (#2673)
    
    Signed-off-by: Guanghao Zhang <zg...@apache.org>
    Signed-off-by: Pankaj Kumar<pankajku...@apache.org>
---
 hbase-shell/src/main/ruby/shell/commands/describe.rb | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/hbase-shell/src/main/ruby/shell/commands/describe.rb 
b/hbase-shell/src/main/ruby/shell/commands/describe.rb
index c32b77d..9865924 100644
--- a/hbase-shell/src/main/ruby/shell/commands/describe.rb
+++ b/hbase-shell/src/main/ruby/shell/commands/describe.rb
@@ -44,14 +44,18 @@ EOF
           puts
         end
         formatter.footer
-        if table.to_s != 'hbase:meta'
-          # No QUOTAS if hbase:meta table
-          puts
-          formatter.header(%w[QUOTAS])
-          count = quotas_admin.list_quotas(::HBaseConstants::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(::HBaseConstants::TABLE => 
table.to_s) do |_, quota|
+              formatter.row([quota])
+            end
+            formatter.footer(count)
           end
-          formatter.footer(count)
+        else
+          puts 'Quota is disabled'
         end
       end
       # rubocop:enable Metrics/AbcSize, Metrics/MethodLength

Reply via email to