Eclipse Remote Debugging Spark

Source: Internet
Author: User
Http://zhangrenhua.com Blog has moved

background On the premise of installing spark, the code we write needs to be debugged remotely. Read many documents online to find each one that is right and share it today.
Modify the configuration file to modify the ${spark_home}/bin/spark-class file, locate the java_opts: Parameter description:-xdebug Enable debugging features
-XRUNJDWP enables the JDWP implementation with several sub-options:
Transport=dt_socket JPDA The transfer method between front-end and Back-end. Dt_socket represents the use of socket transmissions.
The address=8888 JVM listens for requests on port 8888, which is set to a non-conflicting port.
Server=y y indicates that the JVM being started is the debugger. If n, the JVM that starts is the debugger.
Suspend=y y 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.

start Spark Application This article takes a sample of my own code: first package the written code on the server, and then execute the code below. If the parameters do not understand the official documents (note: Be sure to choose Yarn-client mode run): Spark-submit--class Spark. Demo--masteryarn-client/home/hadoop/apptest/spark-demo.jar/tmp/data.txt--executor-memory 1024m
Set the IP and port for remote debugging in eclipse




A summary of the running jar files must be consistent with the source code on eclipse.


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.