Spark job subtypes
For the Spark job type, the available subtypes are listed below.- SQL Aggregation job
A Spark SQL aggregation job where user-defined parameters are injected into a built-in SQL template at runtime. - Custom Python job
The Custom Python job provides user the ability to run Python code via Fusion. This job supports Python 3.6+ code. - Script
This job lets you run a custom Scala script in Fusion.
Basic parameters
To enter advanced parameters in the UI, click Advanced. Those parameters are described in the advanced parameters section.
- Spark job ID. The unique ID for the Spark job that references this job in the API. This is the
idfield in the configuration file. Required field. - Scala script. The Scala script to be executed in Fusion as a Spark job. This is the
scriptfield in the configuration file.
Advanced parameters
If you click the Advanced toggle, the following optional fields are displayed in the UI.- Spark Settings. This section lets you enter
parameter name:parameter valueoptions to use for Spark configuration. This is thesparkConfigfield in the configuration file. - Spark shell options. This section lets you enter
parameter name:parameter valueoptions to send to the Spark shell when the job is run. This is theshellOptionsfield in the configuration file. - Interpreter params. This section lets you enter
parameter name:parameter valueoptions to bind thekey:valuepairs to the Scala interpreter. This is theinterpreterParamsfield in the configuration file.
See Additional Spark jobs for more information.
Spark Configuration Properties
Fusion passes all configuration properties with prefix “spark.” to the Spark master, Spark worker and each Spark application, both for aggregation jobs and custom-scripted processing. These properties are stored in Fusion’s ZooKeeper and can be updated via requests to Fusion endpointapi/configurations
which will update the stored value without restarting the service, therefore existing jobs and SparkContexts will not be affected.
The Fusion endpoint api/configurations returns all configured properties for that installation.
You can examine spark default configurations in a Unix shell using the utilities curl and grep.
Here is an example that checks a local Fusion installation running on port FUSION_PORT: