简体   繁体   English

在Eclipse中调试hadoop 2.2.0时找不到hadoop-mapreduce-client-core-2.2.0.jar的源

[英]Source not found for hadoop-mapreduce-client-core-2.2.0.jar when debugging hadoop 2.2.0 in eclipse

I am trying to debug my mapreduce programs in eclispe. 我正在尝试在eclispe中调试我的mapreduce程序。 I put export HADOOP_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5002" in hadoop-env.sh and configured eclipse for remote debugging on port 5002 of localhost. 我将export HADOOP_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5002"放到hadoop-env.sh并将eclipse配置为在本地主机的端口5002上进行远程调试。

It starts debugging fine in main but when it comes to job.waitForCompletion(true); 它开始在main调试良好,但涉及到job.waitForCompletion(true); it fails with a new file JobSubmitter.class which says: 它失败并显示一个新文件JobSubmitter.class ,其中说:

Source not found
The JAR file /home/hduser/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.2.0.jarhas no source attachment. You can attach the source by clicking Attach Source below.

How could I debug map and reduce functions or even my RecoredRedader class? 我该如何调试map并简化功能,甚至调试我的RecoredRedader类?

Sources are packed into a different JAR. 源被打包到不同的JAR中。 In your case you must look for the path share/hadoop/mapreduce/sources . 在您的情况下,您必须寻找路径share/hadoop/mapreduce/sources

In there exists the hadoop-mapreduce-client-core-2.2.0-sources.jar that you must provide in eclipse. 其中存在必须在eclipse中提供的hadoop-mapreduce-client-core-2.2.0-sources.jar

This was the easiest problem i met in hadoop. 这是我在hadoop中遇到的最简单的问题。 :) You just got to click on Attach Sources and select the required *-sources.jar in the sources folder. :)您只需要单击附加源,然后在源文件夹中选择所需的* -sources.jar。

If you got an error for hadoop-common-2.2.0.jar then you got to attach hadoop-common-2.2.0-source.jar 如果您收到hadoop-common-2.2.0.jar错误,则必须附加hadoop-common-2.2.0-source.jar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM