我正在尝试在eclispe中调试mapreduce程序。我把 export HADOOP_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5002"
在 hadoop-env.sh
并将eclipse配置为在localhost的端口5002上进行远程调试。
它开始调试良好 main
但是当涉及到 job.waitForCompletion(true);
新文件失败 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.
如何调试map和reduce函数,甚至我的 RecoredRedader
上课?
2条答案
按热度按时间sirbozc51#
源被打包到另一个jar里。在你的情况下,你必须寻找道路
share/hadoop/mapreduce/sources
.在那里存在着
hadoop-mapreduce-client-core-2.2.0-sources.jar
您必须在eclipse中提供。osh3o9ms2#
这是我在hadoop中遇到的最简单的问题您只需单击attachsources并在sources文件夹中选择所需的*-sources.jar。
如果hadoop-common-2.2.0.jar出现错误,那么必须附加hadoop-common-2.2.0-source.jar