From commits-return-65349-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Fri Jan 12 16:37:23 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 73785180621 for ; Fri, 12 Jan 2018 16:37:23 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 62C58160C33; Fri, 12 Jan 2018 15:37:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AA599160C30 for ; Fri, 12 Jan 2018 16:37:22 +0100 (CET) Received: (qmail 44298 invoked by uid 500); 12 Jan 2018 15:37:21 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 44289 invoked by uid 99); 12 Jan 2018 15:37:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jan 2018 15:37:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A9ACBDFB31; Fri, 12 Jan 2018 15:37:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tedyu@apache.org To: commits@hbase.apache.org Message-Id: <5d8590e8c50d40208d990186062680d0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: hbase git commit: HBASE-19771 restore_snapshot shell command gives wrong namespace if the namespace doesn't exist Date: Fri, 12 Jan 2018 15:37:21 +0000 (UTC) Repository: hbase Updated Branches: refs/heads/master 20ccaef84 -> 8bbfcdda4 HBASE-19771 restore_snapshot shell command gives wrong namespace if the namespace doesn't exist Signed-off-by: tedyu 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/master Commit: 8bbfcdda46aeec23ebcdc1713cf636081a1c96d0 Parents: 20ccaef Author: Janos Gub Authored: Fri Jan 12 10:16:13 2018 +0100 Committer: tedyu 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: (?[^\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}!"