Eclipse Remote Debugging Hadoop code

Source: Internet
Author: User

ZXXJPDA IntroductionSun Microsystem's Java Platform Debugger Architecture (JPDA) technology is a multi-tiered architecture that enables you to easily debug Java applications in a variety of environments. The JPDA consists of two interfaces (JVM Tool Interface and JDI), one protocol (Java Debug wire Protocol), and two software components (backend and front end) for merging them. It is designed to allow debuggers to be debugged in any environment. for a more detailed introduction, you can refer to using Eclipse to remotely debug Java applicationsJDWP SettingsThe JVM itself supports remote debugging, and Eclipse also supports JDWP, which simply loads the following parameters when the JVM of each module is started:
Dt_socket represents the use of socket transmissions. address=8000The JVM listens for requests on Port 8000, which is set to a non-conflicting port. server=yy indicates that the JVM being started is the debugger. If n, the JVM that starts is the debugger. suspend=yy indicates that the JVM that is started pauses the wait until the debugger is connected to the execution. Suspend=n, the JVM does not pause the wait.
need to add the process you want to debug at the end of the $hadoop_home/etc/hadoop/hadoop-env.sh file
#远程调试namenode export hadoop_namenode_opts= "-agentlib:jdwp=transport=dt_socket,address=8888,server=y,suspend=y" #远程调试datanode export hadoop_datanode_opts= "-agentlib:jdwp=transport=dt_socket,address=9888,server=y,suspend=y" #远程调试RM
export yarn_resourcemanager_opts= "-agentlib:jdwp=transport=dt_socket,address=10888,server=y,suspend=y" #远程调试NM
export yarn_nodemanager_opts= "-agentlib:jdwp=transport=dt_socket,address=10888,server=y,suspend=y"

Eclipse Remote Debugging Hadoop code

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.