Search code examples
debugginghadoopremote-debugging

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?


Solution

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