Apache9 commented on code in PR #6559:
URL: https://github.com/apache/hbase/pull/6559#discussion_r1897584607
##########
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java:
##########
@@ -1881,15 +1880,15 @@ boolean testRow(final int i, final long startTime)
throws IOException {
protected abstract Pair<byte[], byte[]> getStartAndStopRow();
- protected Pair<byte[], byte[]> generateStartAndStopRows(int maxRange) {
- int start = this.rand.nextInt(Integer.MAX_VALUE) % opts.totalRows;
- int stop = start + maxRange;
+ protected Pair<byte[], byte[]> generateStartAndStopRows(long maxRange) {
+ long start = ThreadLocalRandom.current().nextLong(Long.MAX_VALUE) %
opts.totalRows;
Review Comment:
I used to think we can specify the seed with command line argument...
So here we just want to make sure that different threads have different
sequence, use ThreadLocalRandom is OK.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]