HDFS-2541. svn merge -c 1204114 from trunk
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1204115 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c36a44d11b
commit
ab33fa953b
|
@ -31,6 +31,9 @@ Release 0.23.1 - UNRELEASED
|
|||
|
||||
BUG FIXES
|
||||
|
||||
HDFS-2541. For a sufficiently large value of blocks, the DN Scanner
|
||||
may request a random number with a negative seed value. (harsh)
|
||||
|
||||
Release 0.23.0 - 2011-11-01
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -34,7 +34,6 @@ import java.util.Date;
|
|||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.TreeSet;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
@ -252,8 +251,9 @@ class BlockPoolSliceScanner {
|
|||
*/
|
||||
long period = Math.min(scanPeriod,
|
||||
Math.max(blockMap.size(),1) * 600 * 1000L);
|
||||
int periodInt = Math.abs((int)period);
|
||||
return System.currentTimeMillis() - scanPeriod +
|
||||
DFSUtil.getRandom().nextInt((int)period);
|
||||
DFSUtil.getRandom().nextInt(periodInt);
|
||||
}
|
||||
|
||||
/** Adds block to list of blocks */
|
||||
|
|
Loading…
Reference in New Issue