From 892e27925f39fdd2c13b25560f642b645aa65700 Mon Sep 17 00:00:00 2001 From: Sakthi Date: Thu, 20 Dec 2018 02:27:13 -0800 Subject: [PATCH] HBASE-21361: Disable printing of stack-trace in shell when quotas are not enabled --- hbase-shell/src/main/ruby/shell/commands.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hbase-shell/src/main/ruby/shell/commands.rb b/hbase-shell/src/main/ruby/shell/commands.rb index d60d07cc04ebb3e93d38593d36d741ccc6de9612..26fa4f3206d90ba275c10a8f4872824d103ab334 100644 --- a/hbase-shell/src/main/ruby/shell/commands.rb +++ b/hbase-shell/src/main/ruby/shell/commands.rb @@ -169,6 +169,12 @@ module Shell strs = str.split("\n") raise (strs[0]).to_s unless strs.empty? end + if cause.is_a?(org.apache.hadoop.hbase.DoNotRetryIOException) + s = /.*UnsupportedOperationException: quota support disabled.*/.match(cause.message) + if !s.nil? + raise "Quota Support disabled. Please enable in configuration." + end + end # Throw the other exception which hasn't been handled above raise cause -- 2.17.2 (Apple Git-113)