Repository: hbase
Updated Branches:
  refs/heads/branch-1 778f443b0 -> d4853f037


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


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d4853f03
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d4853f03
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d4853f03

Branch: refs/heads/branch-1
Commit: d4853f0379faaaab649f4bbe914d60b1bc706b0d
Parents: 778f443
Author: tedyu <[email protected]>
Authored: Sat Dec 13 09:01:53 2014 -0800
Committer: tedyu <[email protected]>
Committed: Sat Dec 13 09:01:53 2014 -0800

----------------------------------------------------------------------
 hbase-shell/src/main/ruby/hbase/admin.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d4853f03/hbase-shell/src/main/ruby/hbase/admin.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/main/ruby/hbase/admin.rb 
b/hbase-shell/src/main/ruby/hbase/admin.rb
index 748a41c..e5c312b 100644
--- a/hbase-shell/src/main/ruby/hbase/admin.rb
+++ b/hbase-shell/src/main/ruby/hbase/admin.rb
@@ -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()

Reply via email to