How to debug hadoop mapreduce jobs from eclipse?

后端 未结 5 1943
走了就别回头了
走了就别回头了 2020-12-09 10:16

I\'m running hadoop in a single-machine, local-only setup, and I\'m looking for a nice, painless way to debug mappers and reducers in eclipse. Eclipse has no probl

5条回答
  •  执笔经年
    2020-12-09 11:05

    Make changes in /bin/hadoop (hadoop-env.sh) script. Check to see what command has been fired. If the command is jar, then only add remote debug configuration.

    if [ "$COMMAND" = "jar" ] ; then
      exec "$JAVA" -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8999 $JAVA_HEAP_MAX $HADOOP_OPTS $CLASS "$@"
    else
      exec "$JAVA" $JAVA_HEAP_MAX $HADOOP_OPTS $CLASS "$@"
    fi
    

提交回复
热议问题