Skip to content

Commit ea62faa

Browse files
committed
Handle TableExistsException
1 parent 6381682 commit ea62faa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/ruby/shell/commands.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ def translate_hbase_exceptions(*args)
4949
rescue org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException
5050
valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
5151
raise "Unknown column family! Valid column names: #{valid_cols.join(", ")}"
52+
rescue org.apache.hadoop.hbase.TableExistsException
53+
raise "Table already exists: #{args.first}!"
5254
end
5355
end
5456
end

0 commit comments

Comments
 (0)