hadoop远程调试




1、修改etc/hadoop/yarn.sh,增加以下内容
export YARN_NODEMANAGER_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8788,server=y,suspend=y”
export YARN_RESOUCEMANAGER_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8788,server=y,suspend=y”
还可以在hadoop-env.sh, mapreduce-env.sh中设置其它选项


2、启动hadoop,其中start-yarn.sh时,会出现以下日志:
localhost: Listening for transport dt_socket at address: 8788

3、启动调试 run-debug configuration,填入ip 与port

458624.png


4、在集群中执行一个job
hadoop jar hadoop-mapreduce-examples-2.3.0.jar wordcount /input /output

你可能感兴趣的:(hadoop远程调试)