当我运行hadoop wordcount
时发生此异常
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.tracing.SpanReceiverHost.get(Lorg/apache/hadoop/conf/Configuration;Ljava/lang/String;)Lorg/apache/hadoop/tracing/SpanReceiverHost;
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:634)
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:619)
at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:149)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2653)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:92)
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2687)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2669)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:371)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:295)
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.addInputPath(FileInputFormat.java:520)
at com.chen.main.WordCount.main(WordCount.java:67)
我想远程调试hadoop,输入路径为hdfs://112.74.78.239:50040/user/root/input/words
我该怎么办?
答案 0 :(得分:0)
尝试运行此命令
find / -name“* .jar”| xargs grep SpanReceiverHost.class
并找出除核心hadoop库之外的所有具有此类引用的jar。可能有相同类的jar但没有最新的java抛出异常的方法。从类路径中排除具有相同类(旧版本)但没有预期方法的jar。