You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Yang <te...@gmail.com> on 2012/02/03 07:01:41 UTC

debug pig UDF in production EC2 using eclipse ?

sometimes I need to debug a pig UDF in production EC2 cluster using eclipse,

this is normally what I do for debugging a remote jvm:

add "-Xdebug -Xrunjdwp:transport=dt_socket,address=12345,server=y,suspend=y
" to JVM options

then connect eclipse "debug remote application" to this remote host and
port 12345

but EC2 normally does not open any ports, so I do ssh tunneling from my
laptop (where eclipse runs) to EC2,
and then tell eclipse to connect to localhost:12345  ( the ssh command is
"ssh -L12345:ec2_box:12345 ec2_box )

the above procedure works perfect for normal java jobs. but somehow it
takes a long while for pig (running in -x local mode ) to respond ---
although it does finally connect to eclipse


how do you handle such cases?

Thanks
Yang