hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r922058 - in /hadoop/hbase/branches/0.20: CHANGES.txt src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java
Date Thu, 11 Mar 2010 23:10:27 GMT
Author: stack
Date: Thu Mar 11 23:10:26 2010
New Revision: 922058

URL: http://svn.apache.org/viewvc?rev=922058&view=rev
Log:
HBASE-2268 PerformanceEvaluation --nomapred may assign duplicate random seed over multiple
testing threads

Modified:
    hadoop/hbase/branches/0.20/CHANGES.txt
    hadoop/hbase/branches/0.20/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java

Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=922058&r1=922057&r2=922058&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Thu Mar 11 23:10:26 2010
@@ -35,6 +35,8 @@ Release 0.20.4 - Unreleased
                (dhruba borthakur via Stack)
    HBASE-2308  Fix the bin/rename_table.rb script, make it work again
    HBASE-2307  hbase-2295 changed hregion size, testheapsize broke... fix it
+   HBASE-2269  PerformanceEvaluation "--nomapred" may assign duplicate random
+               seed over multiple testing threads (Tatsuya Kawano via Stack)
 
   IMPROVEMENTS
    HBASE-2180  Bad read performance from synchronizing hfile.fddatainputstream

Modified: hadoop/hbase/branches/0.20/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java?rev=922058&r1=922057&r2=922058&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java
(original)
+++ hadoop/hbase/branches/0.20/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java
Thu Mar 11 23:10:26 2010
@@ -666,7 +666,15 @@ public class PerformanceEvaluation imple
    * Subclass to particularize what happens per row.
    */
   static abstract class Test {
-    protected final Random rand = new Random(System.currentTimeMillis());
+    // Below is make it so when Tests are all running in the one
+    // jvm, that they each have a differently seeded Random. 
+    private static final Random randomSeed =
+      new Random(System.currentTimeMillis());
+    private static long nextRandomSeed() {
+      return randomSeed.nextLong();
+    }
+    protected final Random rand = new Random(nextRandomSeed());
+
     protected final int startRow;
     protected final int perClientRunRows;
     protected final int totalRows;



Mime
View raw message