From 0e22f74c7222e7520fd6488be638ff734e7171e8 Mon Sep 17 00:00:00 2001 From: Sakthi Date: Fri, 21 Dec 2018 00:46:47 -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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hbase-shell/src/main/ruby/shell/commands.rb b/hbase-shell/src/main/ruby/shell/commands.rb index d60d07cc04ebb3e93d38593d36d741ccc6de9612..844ef32dcc73327ec6019f1a418bfceacc25a698 100644 --- a/hbase-shell/src/main/ruby/shell/commands.rb +++ b/hbase-shell/src/main/ruby/shell/commands.rb @@ -169,6 +169,11 @@ module Shell strs = str.split("\n") raise (strs[0]).to_s unless strs.empty? end + if cause.is_a?(org.apache.hadoop.hbase.DoNotRetryIOException) + regex = /.*UnsupportedOperationException: quota support disabled.*/ + error = regex.match(cause.message) + raise 'Quota Support disabled. Please enable in configuration.' unless error.nil? + end # Throw the other exception which hasn't been handled above raise cause -- 2.17.2 (Apple Git-113)