idea远程调试namenode

1、在hadoop-env.sh增加如下配置

#hadoop远程debug配置
#远程调试NameNode
export HADOOP_NAMENODE_OPTS="-agentlib:jdwp=transport=dt_socket,address=8888,server=y,suspend=y"
#远程调试DataNode
#export HADOOP_DataNode_OPTS="-agentlib:jdwp=transport=dt_socket,address=9888,server=y,suspend=y"
#远程调试ResourceManager
#export YARN_RESOURCEMANAGER_OPTS="-agentlib:jdwp=transport=dt_socket,address=10888,server=y,suspend=y"
#远程调试NodeManager
#export YARN_NODEMANAGER_OPTS="-agentlib:jdwp=transport=dt_socket,address=11888,server=y,suspend=y"

2、启动namenode,看到如下结果说明namenode已debug模式启动

hadoop-daemon.sh start namenode
starting namenode, logging to /**/**/namenode-192.***.**.**.out
Listening for transport dt_socket at address: 8888

3、设置IDEA远程调试

参考https://blog.csdn.net/u014513883/article/details/53583495

你可能感兴趣的:(Hadoop)