HBASE-12681 truncate_preserve command fails with undefined method 'getTable' error (Ashish)

This commit is contained in:
tedyu 2014-12-13 08:59:56 -08:00
parent a0e473730e
commit 29c233e6e8
1 changed files with 1 additions and 1 deletions

View File

@ -384,7 +384,7 @@ module Hbase
#----------------------------------------------------------------------------------------------
# Truncates table while maintaing region boundaries (deletes all records by recreating the table)
def truncate_preserve(table_name, conf = @conf)
h_table = @connection.getTable(table_name)
h_table = @conn.getTable(table_name)
splits = h_table.getRegionLocations().keys().map{|i| Bytes.toString(i.getStartKey)}.delete_if{|k| k == ""}.to_java :String
splits = org.apache.hadoop.hbase.util.Bytes.toByteArrays(splits)
table_description = h_table.getTableDescriptor()