ccristian / caliper

Automatically exported from code.google.com/p/caliper
Apache License 2.0
0 stars 0 forks source link

Method not found: org.apache.commons.math.stat.descriptive.rank.Percentile.setData #290

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. This very simple benchmark:

public class ArrayDigestBench {
    double[] data = new double[10000];

    @Param({"16", "32"})
    int pageSize;

    @BeforeExperiment
    protected void setUp() throws Exception {
        Random random = new Random();
        for (int i = 0; i < data.length; i++) {
            data[i] = random.nextDouble();
        }
    }

    @Benchmark
    double timeArrayDigest(int reps) {
        double r = 0;
        TDigest ad = new ArrayDigest(pageSize, 100);
        for (int i = 0; i < reps; i++) {
            for (double x : data) {
                ad.add(x);
            }
            System.out.printf("%d\n", i);
            r += ad.quantile(0.999);
        }
        System.out.printf("returning\n");
        return r;
    }
}

2. mvn compile
3. mvn exec:java -Dexec.mainClass="com.google.caliper.runner.CaliperMain" 
-Dexec.args="com.tdunning.math.stats.ArrayDigestBench"

What is the expected output? What do you see instead?

I would expect the normal caliper sort of output.

What version of the product are you using? On what operating system?

OSX version 10.9.2, 16GB RAM

java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

  <dependency>
            <groupId>com.google.caliper</groupId>
            <artifactId>caliper</artifactId>
            <version>1.0-beta-SNAPSHOT</version>
   </dependency>

Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 
05:51:28-0800)

Please provide any additional information below

java.lang.NoSuchMethodError: 
org.apache.commons.math.stat.descriptive.rank.Percentile.setData([D)V
    at com.google.caliper.runner.ConsoleResultProcessor.processTrial(ConsoleResultProcessor.java:86)
    at com.google.caliper.runner.ExperimentingCaliperRun.run(ExperimentingCaliperRun.java:154)
    at com.google.caliper.runner.CaliperMain.exitlessMain(CaliperMain.java:140)
    at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:79)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
    at java.lang.Thread.run(Thread.java:722)

Original issue reported on code.google.com by ted.dunn...@gmail.com on 4 Mar 2014 at 1:11

GoogleCodeExporter commented 9 years ago
I wonder if you have a dependency resolution issue.  What version of 
commons-math is listed when you do $mvn dependency:list?

Original comment by gak@google.com on 4 Mar 2014 at 10:10

GoogleCodeExporter commented 9 years ago
I thought about that as well.  Commons math 2.1 is pulled in via Caliper.  
Commons math3 was pulled in via Mahout, but I excluded that and got the same 
result.

None of Mahout, datafu and stream lib have a commons math 2 dependency.

[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ t-digest ---
[INFO] com.tdunning:t-digest:jar:1.1-SNAPSHOT
[INFO] +- org.apache.mahout:mahout-math:jar:0.9:compile
[INFO] |  +- com.google.guava:guava:jar:16.0:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.5:compile
[INFO] +- com.linkedin.datafu:datafu:jar:1.1.0:test
[INFO] |  \- commons-io:commons-io:jar:1.4:test
[INFO] +- com.clearspring.analytics:stream:jar:2.5.1:test
[INFO] |  \- it.unimi.dsi:fastutil:jar:6.5.7:test
[INFO] +- junit:junit:jar:4.8.2:test
[INFO] \- com.google.caliper:caliper:jar:1.0-beta-SNAPSHOT:compile
[INFO]    +- com.google.code.gson:gson:jar:2.2.2:compile
[INFO]    +- joda-time:joda-time:jar:1.6:compile
[INFO]    +- com.sun.jersey:jersey-client:jar:1.11:compile
[INFO]    |  \- com.sun.jersey:jersey-core:jar:1.11:compile
[INFO]    +- com.google.inject:guice:jar:3.0:compile
[INFO]    |  +- javax.inject:javax.inject:jar:1:compile
[INFO]    |  \- aopalliance:aopalliance:jar:1.0:compile
[INFO]    +- com.google.inject.extensions:guice-multibindings:jar:3.0:compile
[INFO]    +- com.google.inject.extensions:guice-assistedinject:jar:3.0:compile
[INFO]    +- org.apache.commons:commons-math:jar:2.1:compile
[INFO]    \- 
com.google.code.java-allocation-instrumenter:java-allocation-instrumenter:jar:2.
1:compile
[INFO]       +- org.ow2.asm:asm:jar:4.0:compile
[INFO]       +- org.ow2.asm:asm-analysis:jar:4.0:compile
[INFO]       +- org.ow2.asm:asm-commons:jar:4.0:compile
[INFO]       +- org.ow2.asm:asm-tree:jar:4.0:compile
[INFO]       +- org.ow2.asm:asm-util:jar:4.0:compile
[INFO]       \- org.ow2.asm:asm-xml:jar:4.0:compile

Original comment by ted.dunn...@gmail.com on 5 Mar 2014 at 3:22