hbase-commits mailing list archives

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

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

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=902268&r1=902267&r2=902268&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Fri Jan 22 21:10:22 2010
@@ -65,6 +65,7 @@
                (Gary Helmling via Stack)
    HBASE-2156  HBASE-2037 broke Scan
    HBASE-2057  Cluster won't stop (Gary Helmling and JD via JD)
+   HBASE-2160  Can't put with ts in she
 
   IMPROVEMENTS
    HBASE-1970  Export does one version only; make it configurable how many

Modified: hadoop/hbase/branches/0.20/bin/HBase.rb
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/bin/HBase.rb?rev=902268&r1=902267&r2=902268&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/bin/HBase.rb (original)
+++ hadoop/hbase/branches/0.20/bin/HBase.rb Fri Jan 22 21:10:22 2010
@@ -443,17 +443,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