Spark Streaming job configuration
Updated at:
You can configure a Spark Streaming job to process streaming data in an E-MapReduce (EMR) on ECS cluster.
Prerequisites
- A project is created. For more information, see Manage projects.
- The resources and data required for the job are prepared.
Procedure
-
Go to the Projects page in Data Platform.
-
Log in to the E-MapReduce console with your Alibaba Cloud account.
-
In the top navigation bar, select the region and resource group.
-
Click the Data Development tab.
-
-
In the row of the project you want to edit, click Edit Job.
- Create a Spark Streaming job.
- On the left side of the page, right-click the target folder and select Create Job.
- In the Create Job dialog box, enter a Job Name and Description, and for Job Type, select Spark Streaming.
- Click OK.
- Configure the job content.
- In the Content field, enter the required command-line parameters.
A Spark Streaming job submission command has the following format:
spark-submit [options] --class [MainClass] xxx.jar argsFor this example, the job Job Name is SlsStreaming. The Content field is configured as follows:--master yarn-client --driver-memory 7G --executor-memory 5G --executor-cores 1 --num-executors 32 --class com.aliyun.emr.checklist.benchmark.SlsStreaming emr-checklist_2.10-0.1.0.jar <project> <logstore> <access key> <secret key>Important- If the job JAR package is stored in Object Storage Service (OSS), use ossref://xxx/.../xxx.jar to reference the JAR package.
- You can also click +Insert OSS Path, set File Prefix to OSSREF, and select a file from the File Path field. The system automatically completes the path of the Spark Streaming script in OSS.
- Click Save.
- In the Content field, enter the required command-line parameters.
Is this page helpful?