HBASE-13080 hbase shell message containing extra quote at the end of error message

Signed-off-by: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
This commit is contained in:
Abhishek Kumar 2015-02-22 22:56:47 +05:30 committed by Matteo Bertozzi
parent 78da65c412
commit 6a4bca86e2
1 changed files with 3 additions and 3 deletions

View File

@ -168,7 +168,7 @@ module Hbase
#--------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------
# Throw exception if table doesn't exist # Throw exception if table doesn't exist
def tableExists(table_name) def tableExists(table_name)
raise ArgumentError, "Table #{table_name} does not exist.'" unless exists?(table_name) raise ArgumentError, "Table #{table_name} does not exist." unless exists?(table_name)
end end
#---------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------
@ -181,7 +181,7 @@ module Hbase
# Drops a table # Drops a table
def drop(table_name) def drop(table_name)
tableExists(table_name) tableExists(table_name)
raise ArgumentError, "Table #{table_name} is enabled. Disable it first.'" if enabled?(table_name) raise ArgumentError, "Table #{table_name} is enabled. Disable it first." if enabled?(table_name)
@admin.deleteTable(org.apache.hadoop.hbase.TableName.valueOf(table_name)) @admin.deleteTable(org.apache.hadoop.hbase.TableName.valueOf(table_name))
end end
@ -372,7 +372,7 @@ module Hbase
# Truncates table (deletes all records by recreating the table) # Truncates table (deletes all records by recreating the table)
def truncate(table_name, conf = @conf) def truncate(table_name, conf = @conf)
table_description = @admin.getTableDescriptor(TableName.valueOf(table_name)) table_description = @admin.getTableDescriptor(TableName.valueOf(table_name))
raise ArgumentError, "Table #{table_name} is not enabled. Enable it first.'" unless enabled?(table_name) raise ArgumentError, "Table #{table_name} is not enabled. Enable it first." unless enabled?(table_name)
yield 'Disabling table...' if block_given? yield 'Disabling table...' if block_given?
@admin.disableTable(table_name) @admin.disableTable(table_name)