hadoop遠程調試源碼

一、將下列信息填寫到hadoop-en.sh環境變量中,若是調試NameNode.socket

HADOOP_NAMENODE_OPTS="-agentlib:jdwp=transport=dt_socket,address=8888,server=y,suspend=y"oop

#HADOOP_SECONDARYNAMENODE_OPTS="-agentlib:jdwp=transport=dt_socket,address=8789,server=y,suspend=y"spa

#HADOOP_DATANODE_OPTS="-agentlib:jdwp=transport=dt_socket,address=8790,server=y,suspend=y"調試

#HADOOP_BALANCER_OPTS="-agentlib:jdwp=transport=dt_socket,address=8791,server=y,suspend=y"server

#HADOOP_JOBTRACKER_OPTS="-agentlib:jdwp=transport=dt_socket,address=8792,server=y,suspend=y"ip

#HADOOP_TASKTRACKER_OPTS="-agentlib:jdwp=transport=dt_socket,address=8793,server=y,suspend=y"hadoop

二、打開Eclipse,設置文件如圖ci

三、按住Ctrl點進去便可看到NameNode源碼源碼

四、Debug設置ast

相關文章
相關標籤/搜索