--- a/hbase-server/src/main/ruby/shell/commands.rb +++ b/hbase-server/src/main/ruby/shell/commands.rb @@ -87,7 +87,13 @@ module Shell 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.exceptions.TableExistsException - raise "Table already exists: #{args.first}!" + # Use the command name to differentiate what to output + if self.class.name.split('::').last == "CloneSnapshot" + # args[1] is the second arg in the array + raise "Table already exists: #{args[1]}!" + else + raise "Table already exists: #{args.first}!" + end end end end