HBASE-1545 atomicIncrements creating new values with Long.MAX_VALUE
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@786684 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
650b114f06
commit
9c5c2d32db
|
@ -208,6 +208,7 @@ Release 0.20.0 - Unreleased
|
|||
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
|
||||
|
|
|
@ -1505,7 +1505,7 @@ public class Store implements HConstants {
|
|||
* @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 @@ public class Store implements HConstants {
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue