HBASE-2003 [shell] deleteall ignores column if specified
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@883242 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e7ee750f6c
commit
866453467e
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue