You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2018/01/15 07:41:15 UTC

[16/27] hbase git commit: HBASE-19771 restore_snapshot shell command gives wrong namespace if the namespace doesn't exist

HBASE-19771 restore_snapshot shell command gives wrong namespace if the namespace doesn't exist

Signed-off-by: tedyu <yu...@gmail.com>


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

Branch: refs/heads/HBASE-19064
Commit: 8bbfcdda46aeec23ebcdc1713cf636081a1c96d0
Parents: 20ccaef
Author: Janos Gub <jg...@hortonworks.com>
Authored: Fri Jan 12 10:16:13 2018 +0100
Committer: tedyu <yu...@gmail.com>
Committed: Fri Jan 12 07:37:10 2018 -0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/8bbfcdda/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 f17a7f6..1b8de9e 100644
--- a/hbase-shell/src/main/ruby/shell/commands.rb
+++ b/hbase-shell/src/main/ruby/shell/commands.rb
@@ -117,7 +117,8 @@ module Shell
           raise "Unknown region #{args.first}!"
         end
         if cause.is_a?(org.apache.hadoop.hbase.NamespaceNotFoundException)
-          raise "Unknown namespace #{args.first.split(':')[0]}!"
+          s = /.*NamespaceNotFoundException: (?<namespace>[^\n]+).*/.match(cause.message)
+          raise "Unknown namespace #{s['namespace']}!"
         end
         if cause.is_a?(org.apache.hadoop.hbase.snapshot.SnapshotDoesNotExistException)
           raise "Unknown snapshot #{args.first}!"