DX Spark Submit Utility
Dx-spark-submit is a utility script that can be used in DNAnexus Spark applications to more easily submit and monitor a Spark job.
DNAnexus is working to phase out outdated terminology and change scripts using those terms to remove inappropriate language. The terms "master" and "slave" will be replaced with "driver" and "clusterWorker" in Spark documentation. DNAnexus will also eventually replace the older terms in the codebase. For now, variable names and scripts containing the older terms will still be used in the actual code.
A license is required to access Spark functionality on the DNAnexus Platform. Contact DNAnexus Sales for more information.
Usage
How does it work?
The dx-spark-submit utility simplifies some of the common Spark application tasks.
Allows easy overrides of Spark properties at the app developer and user level.
Sets the driver and executor log level.
Submits and sets up the UI to monitor Spark jobs.
Initiates log collection once the job is done (success or failure).
Spark Property Overrides
Spark apps depend on various configurations like spark-defaults.conf, hive-site.xml which will set up the environment for your application. There are certain scenarios where an application developer or the user of the application may want to override a default setting.
dx-spark-submit allows you to specify two configuration inputs.
Application configuration
User configuration
Application Configuration Json
Application config json (--app-config
) contains the list of configurations the app developer may want to restrict or override.
User Configuration Json
User config json (--user-config
) contains the list of configurations the app user may want to add or override. If you want to offer this override ability to users of your app you will need to reference this file in the app input spec, so it's available to dx-spark-submit.
Note: These Spark configurations cannot be overridden as they affect the basic functioning of the cluster application:
Log Collection
When --collect-logs
option is set, log collection will be triggered by the script. It will collect the logs from clusterWork and driver and upload to the project by default. If --log-collect-dir
is specified, the logs are copied to the specified folder in the project.
Note: Subjobs cannot use the log collection feature.
Log Level
--log-level
can be used to set the driver and executor log level (INFO, WARN, TRACE, DEBUG).
Spark Arguments
spark-driver-args
should contain the Spark application and any arguments you want to pass to spark-submit.
Example
Note: dx-spark-submit is located in /cluster/dnax/bin
on the Spark cluster worker container.
Last updated