This topic describes how to configure a Spark Streaming job.
- A project is created. For more information, see Manage projects.
- All required resources and data to be processed are obtained.
- Log on to the Alibaba Cloud E-MapReduce console with an Alibaba Cloud account.
- Click the Data Platform tab.
- In the Projects section, click Edit Job in the row of a project.
- In the left-side navigation pane, right-click the required folder and choose Create Job from the shortcut menu.
Note You can also right-click the folder to create a subfolder, rename the folder, or delete the folder.
- In the dialog box that appears, set the Name and Description parameters, and select Spark Streaming from the Job Type drop-down list.
This option indicates that a Spark Streaming job will be created.
- Click OK.
- Specify the command line arguments required to submit the job in the Content field.
You can use the following command syntax to submit a Spark Streaming job:
spark-submit [options] --class [MainClass] xxx.jar argsThe following example uses a job with Name set to SlsStreaming to demonstrate the Content value:
--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> <accessKey> <secretKey>Notice
- If a job is stored in OSS as a JAR file, you can reference the JAR file by using the ossref://xxx/.../xxx.jar directory.
- Click Enter an OSS path in the lower part of the page. In the dialog box that appears, set File Prefix to OSSREF and specify the file in File Path. The system automatically completes the path of the Spark Streaming script in OSS.
- Click Save.