HBASE-1136 HashFunction inadvertently destroys some randomness
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@735825 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9e33297f7e
commit
03adaea261
|
@ -1,4 +1,10 @@
|
||||||
HBase Change Log
|
HBase Change Log
|
||||||
|
Release 0.20.0 - Unreleased
|
||||||
|
INCOMPATIBLE CHANGES
|
||||||
|
|
||||||
|
BUG FIXES
|
||||||
|
HBASE-1136 HashFunction inadvertently destroys some randomness
|
||||||
|
|
||||||
Release 0.19.0 - Unreleased
|
Release 0.19.0 - Unreleased
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
HBASE-885 TableMap and TableReduce should be interfaces
|
HBASE-885 TableMap and TableReduce should be interfaces
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<project name="hbase" default="jar">
|
<project name="hbase" default="jar">
|
||||||
<property name="version" value="0.19.0"/>
|
<property name="version" value="0.20.0-dev"/>
|
||||||
<property name="Name" value="HBase"/>
|
<property name="Name" value="HBase"/>
|
||||||
<property name="final.name" value="hbase-${version}"/>
|
<property name="final.name" value="hbase-${version}"/>
|
||||||
<property name="year" value="2008"/>
|
<property name="year" value="2008"/>
|
||||||
|
|
|
@ -118,7 +118,8 @@ public final class HashFunction {
|
||||||
}
|
}
|
||||||
int[] result = new int[nbHash];
|
int[] result = new int[nbHash];
|
||||||
for (int i = 0, initval = 0; i < nbHash; i++) {
|
for (int i = 0, initval = 0; i < nbHash; i++) {
|
||||||
initval = result[i] = Math.abs(hashFunction.hash(b, initval) % maxValue);
|
initval = hashFunction.hash(b, initval);
|
||||||
|
result[i] = Math.abs(initval) % maxValue;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}//end hash()
|
}//end hash()
|
||||||
|
|
Loading…
Reference in New Issue