diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java index 56fb736a736..30bb22257a0 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java @@ -2880,7 +2880,7 @@ public class HBaseAdmin implements Abortable, Closeable { public void cloneSnapshot(final String snapshotName, final TableName tableName) throws IOException, TableExistsException, RestoreSnapshotException, InterruptedException { if (tableExists(tableName)) { - throw new TableExistsException("Table '" + tableName + " already exists"); + throw new TableExistsException(tableName); } internalRestoreSnapshot(snapshotName, tableName); waitUntilTableIsEnabled(tableName); diff --git a/hbase-server/src/main/ruby/shell/commands.rb b/hbase-server/src/main/ruby/shell/commands.rb index dbfa8fce9ad..72f6eb23e73 100644 --- a/hbase-server/src/main/ruby/shell/commands.rb +++ b/hbase-server/src/main/ruby/shell/commands.rb @@ -90,8 +90,8 @@ module Shell rescue org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException valid_cols = table(args.first).get_all_columns.map { |c| c + '*' } raise "Unknown column family! Valid column names: #{valid_cols.join(", ")}" - rescue org.apache.hadoop.hbase.TableExistsException => e - raise "Table already exists: #{e.message}!" + rescue org.apache.hadoop.hbase.TableExistsException + raise "Table already exists: #{args.first}!" end end end