HBASE-4886 - truncate fails in HBase shell (Lars H)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1207651 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
01c389c879
commit
01652cecb9
|
@ -271,13 +271,8 @@ module Hbase
|
|||
|
||||
#----------------------------------------------------------------------------------------------
|
||||
# Truncates table (deletes all records by recreating the table)
|
||||
def truncate(table_name, conf = nil)
|
||||
h_table = nil
|
||||
unless conf
|
||||
h_table = org.apache.hadoop.hbase.client.HTable.new(table_name)
|
||||
else
|
||||
h_table = org.apache.hadoop.hbase.client.HTable.new(conf, table_name)
|
||||
end
|
||||
def truncate(table_name, conf = @conf)
|
||||
h_table = org.apache.hadoop.hbase.client.HTable.new(conf, table_name)
|
||||
table_description = h_table.getTableDescriptor()
|
||||
yield 'Disabling table...' if block_given?
|
||||
disable(table_name)
|
||||
|
|
Loading…
Reference in New Issue