forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
7.5 KiB
7.5 KiB
Submitting a Spark2x Job
Scenario
This section describes how to submit an Oozie job of the Spark2x type on Hue.
Procedure
- Create a workflow. For details, see Creating a Workflow.
- On the workflow editing page, select
next to Spark program and drag it to the operation area.
- In the Spark window that is displayed, set the value of Files, for example, to hdfs://hacluster/user/admin/examples/apps/spark2x/lib/oozie-examples.jar. Set the value of jar/py name, for example, to org.apache.oozie.example.SparkFileCopy, and click Add.
- Set the value of Main class, for example, org.apache.oozie.example.SparkFileCopy.
- Click PARAMETER+ to add related input and output parameters.
For example, add the following parameters:
- hdfs://hacluster/user/admin/examples/input-data/text/data.txt
- hdfs://hacluster/user/admin/examples/output-data/spark_workflow
- In the Options list text box, specify Spark parameters, for example, --conf spark.yarn.archive=hdfs://hacluster/user/spark2x/jars/8.1.2.2/spark-archive-2x.zip --conf spark.eventLog.enabled=true --conf spark.eventLog.dir=hdfs://hacluster/spark2xJobHistory2x.
- Click the configuration button
in the upper right corner. Set the value of Spark Master, for example, to yarn-cluster. Set the value of Mode, for example, cluster.
- On the configuration page that is displayed, click Delete + to delete a directory, for example, hdfs://hacluster/user/admin/examples/output-data/spark_workflow.
- Click PROPERTIES+ and add sharelib used by Oozie. Enter the attribute name oozie.action.sharelib.for.spark in the left text box and the attribute value spark2x in the right text box.
- Click
in the upper right corner of the Oozie editor.
If you need to modify the job name before saving the job (default value: My Workflow), click the name directly for modification, for example, Spark-Workflow.
- After the configuration is saved, click
, and submit the job.
After the job is submitted, you can view the related contents of the job, such as the detailed information, logs, and processes, on Hue.
Parent topic: Submitting a Workflow Job