Author: apurtell
Date: Mon Nov 23 04:29:01 2009
New Revision: 883244
URL: http://svn.apache.org/viewvc?rev=883244&view=rev
Log:
HBASE-2003 [shell] deleteall ignores column if specified
Modified:
hadoop/hbase/branches/0.20/CHANGES.txt
hadoop/hbase/branches/0.20/bin/HBase.rb
Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=883244&r1=883243&r2=883244&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Mon Nov 23 04:29:01 2009
@@ -28,7 +28,8 @@
HBASE-1777 column length is not checked before saved to memstore
HBASE-1895 HConstants.MAX_ROW_LENGTH is incorrectly 64k, should be 32k
HBASE-1925 IllegalAccessError: Has not been initialized (getMaxSequenceId)
- HBASE-1929 If hbase-default.xml is not in CP, zk session timeout is 10
secs!
+ HBASE-1929 If hbase-default.xml is not in CP, zk session timeout is 10
+ seconds
HBASE-1927 Scanners not closed properly in certain circumstances
HBASE-1934 NullPointerException in ClientScanner (Andrew Purtell via Stack)
HBASE-1946 Unhandled exception at regionserver (Dmitriy Lyfar via Stack)
@@ -37,7 +38,8 @@
(Andrew McCall via Clint Morgan and Stack)
HBASE-1953 Overhaul of overview.html (html fixes, typos, consistency) -
no content changes (Lars Francke via Stack)
- HBASE-1954 Transactional scans do not see newest put (Clint Morgan via
Stack)
+ HBASE-1954 Transactional scans do not see newest put (Clint Morgan via
+ Stack)
HBASE-1919 code: HRS.delete seems to ignore exceptions it shouldnt
HBASE-1951 Stack overflow when calling HTable.checkAndPut()
when deleting a lot of values
@@ -46,7 +48,8 @@
HBASE-1949 KeyValue expiration by Time-to-Live during major compaction is
broken (Gary Helmling via Stack)
HBASE-1957 Get-s can't set a Filter (Roman Kalyakin via Stack)
- HBASE-1959 Compress tables during 0.19 to 0.20 migration (Dave Latham via
Stack)
+ HBASE-1959 Compress tables during 0.19 to 0.20 migration (Dave Latham via
+ Stack)
HBASE-1928 ROOT and META tables stay in transition state (making the system
not usable) if the designated regionServer dies before the
assignment is complete (Yannis Pavlidis via Stack)
@@ -57,6 +60,7 @@
sometimes - Temporary fix
HBASE-1965 On restart of branch, master complains about not being able
to set safe mode
+ HBASE-2003 [shell] deleteall ignores column if specified
IMPROVEMENTS
HBASE-1899 Use scanner caching in shell count
Modified: hadoop/hbase/branches/0.20/bin/HBase.rb
URL:
http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/bin/HBase.rb?rev=883244&r1=883243&r2=883244&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/bin/HBase.rb (original)
+++ hadoop/hbase/branches/0.20/bin/HBase.rb Mon Nov 23 04:29:01 2009
@@ -361,7 +361,8 @@
def delete(row, column, timestamp = HConstants::LATEST_TIMESTAMP)
now = Time.now
d = Delete.new(row.to_java_bytes, timestamp, nil)
- d.deleteColumn(Bytes.toBytes(column))
+ split = KeyValue.parseColumn(column.to_java_bytes)
+ d.deleteColumn(split[0], split.length > 1 ? split[1] : nil, timestamp)
@table.delete(d)
@formatter.header()
@formatter.footer(now)
@@ -370,6 +371,10 @@
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)