Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to debug Hadoop remotely

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "how to debug Hadoop remotely", which is easy to understand and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn how to debug Hadoop remotely.

How to debug Hadoop remotely

When investigating abnormal problems such as JobTracker, remote debug is often needed to achieve single-step tracking. Remote debugging is faster and more comprehensive than printing logs. The basic steps for remote debugging are listed here.

1. Configure the jvm option to enable remote debug

All deamon launches for Hadoop are done by the bin/hadoop script, and the last line of the script executes the java command to start the JVM process. So to enable remote debug, you only need to modify the last line of the script.

The last line before modification is as follows:

Exec "$JAVA" $HADOOP_OPTS-classpath "$CLASSPATH" $CLASS "$@"

The last line after modification is as follows:

Exec "$JAVA"-Xdebug-Xrunjdwp:transport=dt_socket,address=50010,server=y,suspend=n $HADOOP_OPTS-classpath "$CLASSPATH" $CLASS "$@"

The bold font part is the new jvm parameter.

These parameters mean to start a server socket on port 50070 and pass debugging information through Java Debug Wire Protocol (jdwp). Suspend=n means that the client (eclipse) does not need to hang when it is not connected, that is, the process runs as usual when debugging is not started.

It is important to note that the port number here must be free and open to the public. Usually, the production machine has only a small number of ports open.

2. Configure eclipse to debug remotely

A. Start eclipse

B. Click Go to Run-> Debug Configurations on the menu.

C. Find Remote Java Application on the configuration interface and right-click to create a new one

D. Configure the link information of the remote application

The main thing here is to fill in the host name and port number.

F. In the last step, click Apply to keep the configuration and then click Debug to start remote debugging.

The above is all the contents of the article "how to debug Hadoop remotely". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report