简体   繁体   中英

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. 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.

It starts debugging fine in main but when it comes to job.waitForCompletion(true); it fails with a new file JobSubmitter.class which says:

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?

Sources are packed into a different JAR. In your case you must look for the path share/hadoop/mapreduce/sources .

In there exists the hadoop-mapreduce-client-core-2.2.0-sources.jar that you must provide in eclipse.

This was the easiest problem i met in hadoop. :) You just got to click on Attach Sources and select the required *-sources.jar in the sources folder.

If you got an error for hadoop-common-2.2.0.jar then you got to attach hadoop-common-2.2.0-source.jar

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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