hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r883242 - in /hadoop/hbase/trunk: CHANGES.txt bin/HBase.rb
Date Mon, 23 Nov 2009 04:25:24 GMT
Author: apurtell
Date: Mon Nov 23 04:25:24 2009
New Revision: 883242

URL: http://svn.apache.org/viewvc?rev=883242&view=rev
Log:
HBASE-2003 [shell] deleteall ignores column if specified

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/bin/HBase.rb

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=883242&r1=883241&r2=883242&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Mon Nov 23 04:25:24 2009
@@ -117,6 +117,7 @@
    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

Modified: hadoop/hbase/trunk/bin/HBase.rb
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/bin/HBase.rb?rev=883242&r1=883241&r2=883242&view=diff
==============================================================================
--- hadoop/hbase/trunk/bin/HBase.rb (original)
+++ hadoop/hbase/trunk/bin/HBase.rb Mon Nov 23 04:25:24 2009
@@ -346,7 +346,7 @@
       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 @@
     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)



Mime
View raw message