diff --git a/hbase-shell/src/main/ruby/shell/commands.rb b/hbase-shell/src/main/ruby/shell/commands.rb index f17a7f63481..1b8de9e7f2b 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}!"