java.lang.NoSuchMethodError: com.google.common.base.Stopwatch.elapsedMillis()J

Apache's JIRA Issue Tracker | Venkat Ranganathan | 2 years ago
  1. 1

    Running mvn clean test -Dhadoop2.version=2.4.0 has many unit test failures because guava version mismatch. For example: ====== completeJobToyExample(org.apache.mahout.cf.taste.hadoop.als.ParallelALSFactorizationJobTest) Time elapsed: 0.736 sec <<< ERROR! java.lang.NoSuchMethodError: com.google.common.base.Stopwatch.elapsedMillis()J at __randomizedtesting.SeedInfo.seed([BEBBF9ACD237F984:B570D1523391FD4E]:0) at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.listStatus(FileInputFormat.java:278) at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.getSplits(FileInputFormat.java:375) at org.apache.hadoop.mapreduce.JobSubmitter.writeNewSplits(JobSubmitter.java:493) at org.apache.hadoop.mapreduce.JobSubmitter.writeSplits(JobSubmitter.java:510) at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:394) at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1285) at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1282) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548) at org.apache.hadoop.mapreduce.Job.submit(Job.java:1282) at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1303) at org.apache.mahout.cf.taste.hadoop.als.ParallelALSFactorizationJob.run(ParallelALSFactorizationJob.java:172) at org.apache.mahout.cf.taste.hadoop.als.ParallelALSFactorizationJobTest.explicitExample(ParallelALSFactorizationJobTest.java:112) at org.apache.mahout.cf.taste.hadoop.als.ParallelALSFactorizationJobTest.completeJobToyExample(ParallelALSFactorizationJobTest.java:71) ===== hadoop mapreduce V2 is using guava v11.0.2 and mahout is using guava version 16.0 After trying different versions guava version 14.0 seems to have hadoop MR V2 compatible jars and mahout needed classes. The unit tests ran successfully after changing the dependency in mahout to v14.0

    Apache's JIRA Issue Tracker | 2 years ago | Venkat Ranganathan
    java.lang.NoSuchMethodError: com.google.common.base.Stopwatch.elapsedMillis()J
  2. 0

    hadoop打成jar包放到服务器上运行问题集 - todo-hadoop学习记录 - 博客频道 - CSDN.NET

    csdn.net | 4 months ago
    java.lang.NoSuchMethodError: com.google.common.base.Stopwatch.elapsedMillis()J
  3. 0

    Hadoop 2.6.0 wordcount example running error, Please help me!

    Stack Overflow | 1 year ago | Hai Zhou
    java.lang.NoSuchMethodError: org.apache.hadoop.mapreduce.v2.util.MRApps.addLog4jSystemProperties(Ljava/lang/String;JILjava/util/List;Lorg/apache/hadoop/conf/Configuration;)V
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    gobblin don't work in hadoop 2.7.1

    GitHub | 1 year ago | zhaolmtravelsky
    java.lang.NoSuchMethodError: org.apache.hadoop.mapreduce.v2.util.MRApps.crossPlatformifyMREnv(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/yarn/api/ApplicationConstants$Environment;)Ljava/lang/String;

  1. r1chjames 1 times, last 6 months ago
5 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NoSuchMethodError

    com.google.common.base.Stopwatch.elapsedMillis()J

    at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.listStatus()
  2. Hadoop
    Job$10.run
    1. org.apache.hadoop.mapreduce.lib.input.FileInputFormat.listStatus(FileInputFormat.java:278)
    2. org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat.listStatus(SequenceFileInputFormat.java:59)
    3. org.apache.hadoop.mapreduce.lib.input.FileInputFormat.getSplits(FileInputFormat.java:375)
    4. org.apache.hadoop.mapreduce.JobSubmitter.writeNewSplits(JobSubmitter.java:493)
    5. org.apache.hadoop.mapreduce.JobSubmitter.writeSplits(JobSubmitter.java:510)
    6. org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:394)
    7. org.apache.hadoop.mapreduce.Job$10.run(Job.java:1285)
    8. org.apache.hadoop.mapreduce.Job$10.run(Job.java:1282)
    8 frames
  3. Java RT
    Subject.doAs
    1. java.security.AccessController.doPrivileged(Native Method)
    2. javax.security.auth.Subject.doAs(Subject.java:415)
    2 frames
  4. Hadoop
    UserGroupInformation.doAs
    1. org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1556)
    1 frame
  5. Hadoop
    Job.waitForCompletion
    1. org.apache.hadoop.mapreduce.Job.submit(Job.java:1282)
    2. org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1303)
    2 frames
  6. org.apache.mahout
    SparseVectorsFromSequenceFiles.run
    1. org.apache.mahout.vectorizer.DocumentProcessor.tokenizeDocuments(DocumentProcessor.java:93)
    2. org.apache.mahout.vectorizer.SparseVectorsFromSequenceFiles.run(SparseVectorsFromSequenceFiles.java:257)
    2 frames
  7. Hadoop
    ToolRunner.run
    1. org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    2. org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    2 frames
  8. org.apache.mahout
    SparseVectorsFromSequenceFiles.main
    1. org.apache.mahout.vectorizer.SparseVectorsFromSequenceFiles.main(SparseVectorsFromSequenceFiles.java:56)
    1 frame
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  10. Hadoop
    ProgramDriver.driver
    1. org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:72)
    2. org.apache.hadoop.util.ProgramDriver.run(ProgramDriver.java:145)
    3. org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:153)
    3 frames
  11. org.apache.mahout
    MahoutDriver.main
    1. org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:195)
    1 frame