You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by el...@apache.org on 2019/01/07 23:06:13 UTC

[2/2] hbase git commit: HBASE-21361: Disable printing of stack-trace in shell when quotas are not enabled

HBASE-21361: Disable printing of stack-trace in shell when quotas are not enabled

Signed-off-by: Josh Elser <el...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/5aaa7343
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/5aaa7343
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/5aaa7343

Branch: refs/heads/master
Commit: 5aaa73434e01d723a74a349920c779af27261ddc
Parents: a735a47
Author: Sakthi <sa...@gmail.com>
Authored: Fri Dec 21 10:47:16 2018 -0800
Committer: Josh Elser <el...@apache.org>
Committed: Mon Jan 7 16:39:13 2019 -0500

----------------------------------------------------------------------
 hbase-shell/src/main/ruby/shell/commands.rb | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/5aaa7343/hbase-shell/src/main/ruby/shell/commands.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/main/ruby/shell/commands.rb b/hbase-shell/src/main/ruby/shell/commands.rb
index be6dd85..4fdc8b5 100644
--- a/hbase-shell/src/main/ruby/shell/commands.rb
+++ b/hbase-shell/src/main/ruby/shell/commands.rb
@@ -179,6 +179,12 @@ module Shell
           error = regex.match(str)
           raise error[:message].capitalize unless error.nil?
         end
+        if cause.is_a?(org.apache.hadoop.hbase.DoNotRetryIOException)
+          regex = /.*UnsupportedOperationException: quota support disabled.*/
+          error = regex.match(cause.message)
+          error_msg = 'Quota Support disabled. Please enable in configuration.'
+          raise error_msg unless error.nil?
+        end
 
         # Throw the other exception which hasn't been handled above
         raise cause