sources study-part 6- remote debugging

when run in cluster(pseudo),it is difficult to debug the code.i have tried to debug use some tricks to do it:

a use the jdpa debug platform.

add this options to hadoop opts after start and before to run a job:

HADOOP_OPTS="$HADOOP_OPTS -agentlib:jdwp=transport=dt_socket,address=8001,server=y,suspend=y"
but i foud it is useful for debuggin the client phase.when the client submited a job to JT,the client have not authority to control the job progress,so i think it as this.

 

b separate the dfs and mapred.

start the dfs daemons in the command ,and start your JT and TT in eclispe.and TT must be run in debug mode to debug.

but sometimes this is failed to get your purpose,why?threads,undetermined things to affect to debug?

你可能感兴趣的:(hadoop,socket)