diff --git a/CHANGES.txt b/CHANGES.txt index f153dfc6914..3865c1fa97e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -117,6 +117,7 @@ Release 0.21.0 - Unreleased HBASE-1999 When HTable goes away, close zk session in shutdown hook or something... HBASE-1997 zk tick time bounds maximum zk session time + HBASE-2003 [shell] deleteall ignores column if specified IMPROVEMENTS HBASE-1760 Cleanup TODOs in HTable diff --git a/bin/HBase.rb b/bin/HBase.rb index 2939e00807d..bca7024a35b 100644 --- a/bin/HBase.rb +++ b/bin/HBase.rb @@ -346,7 +346,7 @@ module HBase now = Time.now d = Delete.new(row.to_java_bytes, timestamp, nil) split = KeyValue.parseColumn(column.to_java_bytes) - d.deleteColumn(split[0], split.length > 1 ? split[1] : nil) + d.deleteColumn(split[0], split.length > 1 ? split[1] : nil, timestamp) @table.delete(d) @formatter.header() @formatter.footer(now) @@ -355,6 +355,10 @@ module HBase def deleteall(row, column = nil, timestamp = HConstants::LATEST_TIMESTAMP) now = Time.now d = Delete.new(row.to_java_bytes, timestamp, nil) + if column != nil + split = KeyValue.parseColumn(column.to_java_bytes) + d.deleteColumns(split[0], split.length > 1 ? split[1] : nil, timestamp) + end @table.delete(d) @formatter.header() @formatter.footer(now)