2016-08-09 61 views
0

當我運行hadoop wordcount此異常發生日食調試Hadoop的單詞計數,和異常發生

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

請嘗試執行此命令

find/-name「* .jar」| xargs grep SpanReceiverHost.class

找出除核心hadoop庫之外的所有具有此類引用的jar。可能有同類的jar,但沒有最新的java拋出異常的方法。從具有相同類(舊版本)但沒有預期方法的類路徑中排除jar。