hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r786684 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/regionserver/Store.java
Date Fri, 19 Jun 2009 22:02:13 GMT
Author: stack
Date: Fri Jun 19 22:02:12 2009
New Revision: 786684

URL: http://svn.apache.org/viewvc?rev=786684&view=rev
Log:
HBASE-1545 atomicIncrements creating new values with Long.MAX_VALUE

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/Store.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=786684&r1=786683&r2=786684&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Fri Jun 19 22:02:12 2009
@@ -208,6 +208,7 @@
                reinit
    HBASE-1387  Before release verify all object sizes using Ryans' instrumented
                JVM trick (Erik Holstad via Stack)
+   HBASE-1545  atomicIncrements creating new values with Long.MAX_VALUE
 
   IMPROVEMENTS
    HBASE-1089  Add count of regions on filesystem to master UI; add percentage

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/Store.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/Store.java?rev=786684&r1=786683&r2=786684&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/Store.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/Store.java Fri Jun 19
22:02:12 2009
@@ -1505,7 +1505,7 @@
    * @throws IOException
    */
   public long incrementColumnValue(byte [] row, byte [] family,
-      byte [] qualifier, long amount) throws IOException{
+      byte [] qualifier, long amount) throws IOException {
     long value = 0;
     List<KeyValue> result = new ArrayList<KeyValue>();
     KeyComparator keyComparator = this.comparator.getRawComparator();
@@ -1555,7 +1555,9 @@
   private long addNewKeyValue(byte [] row, byte [] family, byte [] qualifier, 
       long value, long amount) {
     long newValue = value + amount;
-    KeyValue newKv = new KeyValue(row, family, qualifier, Bytes.toBytes(newValue));
+    KeyValue newKv = new KeyValue(row, family, qualifier,
+        System.currentTimeMillis(),
+        Bytes.toBytes(newValue));
     add(newKv);
     return newValue;
   }



Mime
View raw message