hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r902269 - in /hadoop/hbase/trunk: CHANGES.txt bin/HBase.rb
Date Fri, 22 Jan 2010 21:12:30 GMT
Author: stack
Date: Fri Jan 22 21:12:30 2010
New Revision: 902269

URL: http://svn.apache.org/viewvc?rev=902269&view=rev
Log:
HBASE-2160 Can't put with ts in shell

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=902269&r1=902268&r2=902269&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Fri Jan 22 21:12:30 2010
@@ -189,6 +189,7 @@
                (Lars George and Gary Helmling via Stack)
    HBASE-2156  HBASE-2037 broke Scan - only a test for trunk
    HBASE-2057  Cluster won't stop (Gary Helmling and JD via JD)
+   HBASE-2160  Can't put with ts in shell
 
   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=902269&r1=902268&r2=902269&view=diff
==============================================================================
--- hadoop/hbase/trunk/bin/HBase.rb (original)
+++ hadoop/hbase/trunk/bin/HBase.rb Fri Jan 22 21:12:30 2010
@@ -447,17 +447,20 @@
 
     def put(row, column, value, timestamp = nil)
       now = Time.now 
-      p = nil
-      if timestamp
-        p = Put.new(row.to_java_bytes, timestamp)
-      else
-        p = Put.new(row.to_java_bytes)
-      end
+      p = Put.new(row.to_java_bytes)
       split = KeyValue.parseColumn(column.to_java_bytes)
       if split.length > 1
-        p.add(split[0], split[1], value.to_java_bytes)
+        if timestamp
+          p.add(split[0], split[1], timestamp, value.to_java_bytes)
+        else
+          p.add(split[0], split[1], value.to_java_bytes)
+        end
       else
-        p.add(split[0], nil, value.to_java_bytes)
+        if timestamp
+          p.add(split[0], nil, timestamp, value.to_java_bytes)
+        else
+          p.add(split[0], nil, value.to_java_bytes)
+        end
       end
       @table.put(p)
       @formatter.header()



Mime
View raw message