diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java index 43ef7d0..c72ed90 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java @@ -1159,9 +1159,18 @@ public class PerformanceEvaluation extends Configured implements Tool { protected void testTakedown() throws IOException { super.testTakedown(); if (this.reportLatency) { - DescriptiveStatistics ds; Arrays.sort(times); - ds = new DescriptiveStatistics(times); + /* + * Work around a packaging problem in Hadoop 1.2.1. The pom depends on commons-math-2.2 + * but tgz ships commons-math-2.1. The version of DescriptiveStatistics in 2.1 doesn't + * provide the constructor we want, so add all values manually. This is probably terrible + * for the memory footprint. + * TODO: use DescriptiveStatistics(double[]) when we drop support for hadoop-1.2.1 + */ + DescriptiveStatistics ds = new DescriptiveStatistics(); + for (double t : times) { + ds.addValue(t); + } LOG.info("randomRead latency log (ms), on " + times.length + " measures"); LOG.info("99.9999% = " + ds.getPercentile(99.9999d)); LOG.info(" 99.999% = " + ds.getPercentile(99.999d));