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:20:06 UTC

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

Repository: hbase
Updated Branches:
  refs/heads/branch-2 97219f1ac -> 2bd1b28d5


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/2bd1b28d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2bd1b28d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2bd1b28d

Branch: refs/heads/branch-2
Commit: 2bd1b28d5ed51d665f79699449712deaa5b412ff
Parents: eab2439
Author: Sakthi <sa...@gmail.com>
Authored: Fri Dec 21 10:47:16 2018 -0800
Committer: Josh Elser <el...@apache.org>
Committed: Mon Jan 7 18:07:46 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/2bd1b28d/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 00ee8eb..d1b91f4 100644
--- a/hbase-shell/src/main/ruby/shell/commands.rb
+++ b/hbase-shell/src/main/ruby/shell/commands.rb
@@ -177,6 +177,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


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

Posted by el...@apache.org.
HBASE-21362: Disable printing of stack-trace in shell when quotas are violated

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/eab24394
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/eab24394
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/eab24394

Branch: refs/heads/branch-2
Commit: eab243942f4912cdcbebab8a67fa67e89e69dae2
Parents: 97219f1
Author: Sakthi <sa...@gmail.com>
Authored: Wed Dec 26 17:01:22 2018 -0800
Committer: Josh Elser <el...@apache.org>
Committed: Mon Jan 7 18:07:46 2019 -0500

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/eab24394/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 f90b5d3..00ee8eb 100644
--- a/hbase-shell/src/main/ruby/shell/commands.rb
+++ b/hbase-shell/src/main/ruby/shell/commands.rb
@@ -167,6 +167,16 @@ module Shell
           strs = str.split("\n")
           raise (strs[0]).to_s unless strs.empty?
         end
+        if cause.is_a?(org.apache.hadoop.hbase.quotas.SpaceLimitingException)
+          strs = cause.message.split("\n")
+          raise(strs[0]).to_s unless strs.empty?
+        end
+        if cause.is_a?(org.apache.hadoop.hbase.client.RetriesExhaustedException)
+          str = cause.cause.to_s
+          regex = /.*RpcThrottlingException: (?<message>[^\n]+).*/
+          error = regex.match(str)
+          raise error[:message].capitalize unless error.nil?
+        end
 
         # Throw the other exception which hasn't been handled above
         raise cause