1

I am running a hadoop job like this:

bin/hadoop jar /usr/joe/wordcount.jar org.myorg.WordCount /usr/joe/wordcount/input /usr/joe/wordcount/output

My question: How can I debug this with jdb? I don't need remote debugging. The job is running on same machine from which I want to debug.

morpheus
  • 18,676
  • 24
  • 96
  • 159

1 Answers1

0

You can always connect jdb to running process.

The easies way to run Java app in debug mode is to run it with debug parameters:

"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=32887"

After application is started you can always look for it using jps and connect to process with jdb

You can also export _JAVA_OPTIONS variable and this way make all JVMs to use these settings. This way, any JVM you start will always run in debug mode. But remember, only first one will be able to listen on TCP/IP port.

Oo.oO
  • 12,464
  • 3
  • 23
  • 45