Skip to content

Commit 756ca4e

Browse files
committed
Remove singleton seed generator and use ThreadLocalRandom instead
1 parent 513ba94 commit 756ca4e

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,17 +1141,9 @@ public long getBufferSize() {
11411141
* A test. Subclass to particularize what happens per row.
11421142
*/
11431143
static abstract class TestBase {
1144-
// Below is make it so when Tests are all running in the one
1145-
// jvm, that they each have a differently seeded Random.
1146-
private static final Random randomSeed = new Random(EnvironmentEdgeManager.currentTime());
1147-
1148-
private static long nextRandomSeed() {
1149-
return randomSeed.nextLong();
1150-
}
1151-
11521144
private final long everyN;
11531145

1154-
protected final Random rand = new Random(nextRandomSeed());
1146+
protected final Random rand = ThreadLocalRandom.current();
11551147
protected final Configuration conf;
11561148
protected final TestOptions opts;
11571149

0 commit comments

Comments
 (0)