From 9a964d9b19b264816ad55729be8e031a1989ebde Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 20 Feb 2015 11:04:46 +0530 Subject: [PATCH] HBASE-13058-shell unknown table message update --- hbase-shell/src/main/ruby/shell/commands.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hbase-shell/src/main/ruby/shell/commands.rb b/hbase-shell/src/main/ruby/shell/commands.rb index 2128164..4602db6 100644 --- a/hbase-shell/src/main/ruby/shell/commands.rb +++ b/hbase-shell/src/main/ruby/shell/commands.rb @@ -103,8 +103,8 @@ module Shell # Get the special java exception which will be handled cause = e.cause if cause.kind_of?(org.apache.hadoop.hbase.TableNotFoundException) then - str = java.lang.String.new("#{cause}") - raise "Unknown table #{str}!" + first_arg = args.first + raise "Unknown table #{first_arg}!" end if cause.kind_of?(org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException) then exceptions = cause.getCauses @@ -113,6 +113,10 @@ module Shell valid_cols = table(args.first).get_all_columns.map { |c| c + '*' } raise "Unknown column family! Valid column names: #{valid_cols.join(", ")}" end + if exception.kind_of?(org.apache.hadoop.hbase.TableNotFoundException) then + first_arg = args.first + raise "Unknown table #{first_arg}!" + end end end if cause.kind_of?(org.apache.hadoop.hbase.TableExistsException) then -- 1.8.4.msysgit.0