hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1569129 - /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HFilePerformanceEvaluation.java
Date Mon, 17 Feb 2014 22:35:49 GMT
Author: larsh
Date: Mon Feb 17 22:35:48 2014
New Revision: 1569129

URL: http://svn.apache.org/r1569129
Log:
HBASE-10552 HFilePerformanceEvaluation.GaussianRandomReadBenchmark fails sometimes.

Modified:
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HFilePerformanceEvaluation.java

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HFilePerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HFilePerformanceEvaluation.java?rev=1569129&r1=1569128&r2=1569129&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HFilePerformanceEvaluation.java
(original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/HFilePerformanceEvaluation.java
Mon Feb 17 22:35:48 2014
@@ -355,7 +355,8 @@ public class HFilePerformanceEvaluation 
     private byte [] getGaussianRandomRowBytes() {
       int r = (int) randomData.nextGaussian((double)totalRows / 2.0,
           (double)totalRows / 10.0);
-      return format(r);
+      // make sure r falls into [0,totalRows)
+      return format(Math.min(totalRows, Math.max(r,0)));
     }
   }
 



Mime
View raw message