Eclipse remote debugging of hadoop code

Source: Internet
Author: User

Eclipse remote debugging of hadoop code
ZxxJPDA introduction Sun Microsystem's Java Platform Debugger Architecture (JPDA) technology is a multi-layer Architecture that allows you to easily debug Java applications in various environments. JPDA consists of two interfaces (JVM Tool Interface and JDI), one Protocol (Java Debug Wire Protocol), and two software components (backend and front-end) used to merge them. It is designed to allow debugging personnel to debug in any environment. For more details, refer to the remote debugging of Java application JDWP using Eclipse to set JVM to support remote debugging. Eclipse also supports JDWP, you only need to load the following parameters when the JVM of each module is started:
Dt_socket indicates that socket transmission is used. Address = 8000JVM listens for requests on port 8000. Set this parameter to a non-conflicting port. Server = yy indicates that the started JVM is debugged. If it is n, the JVM started is the debugger. Suspend = yy indicates that the started JVM will pause and wait until the debugger is connected. If suspend is n, the JVM does not pause the wait.
You need to add the process you want to debug at the end of the $ HADOOP_HOME/etc/hadoop/hadoop-env.sh File
# Remote namenode debuggingExport HADOOP_NAMENODE_OPTS = "-agentlib: jdwp = transport = dt_socket, address = 8888, server = y, suspend = y"# Remote debugging of datanodeExport HADOOP_DATANODE_OPTS = "-agentlib: jdwp = transport = dt_socket, address = 9888, server = y, suspend = y"# Remote debugging RM
Export YARN_RESOURCEMANAGER_OPTS = "-agentlib: jdwp = transport = dt_socket, address = 10888, server = y, suspend = y"# Remote debugging NM
Export YARN_NODEMANAGER_OPTS = "-agentlib: jdwp = transport = dt_socket, address = 10888, server = y, suspend = y"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.