

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 开始使用流处理作业
<a name="jobs-spark-streaming-getting-started"></a>

请参阅以下说明，了解如何开始使用流处理作业。

1. 要创建应用程序，请参阅[开始使用 Amazon EMR Serverless](https://docs.amazonaws.cn/emr/latest/EMR-Serverless-UserGuide/getting-started.html)。请注意，您的应用程序必须运行 [Amazon EMR 7.1.0 或更高版本](https://docs.amazonaws.cn/emr/latest/ReleaseGuide/emr-710-release.html)。

1. 应用程序准备就绪后，将`mode`参数设置为`STREAMING`以提交流媒体作业，类似于以下 Amazon CLI 示例。

   ```
   aws emr-serverless start-job-run \
   --application-id {{<APPPLICATION_ID>}} \
   --execution-role-arn {{<JOB_EXECUTION_ROLE>}} \
   --mode 'STREAMING' \
   --job-driver '{
       "sparkSubmit": {
           "entryPoint": "s3://{{<streaming script>}}",
           "entryPointArguments": ["s3://{{<DOC-EXAMPLE-BUCKET-OUTPUT>}}/output"],
           "sparkSubmitParameters": "--conf spark.executor.cores=4
               --conf spark.executor.memory=16g 
               --conf spark.driver.cores=4
               --conf spark.driver.memory=16g 
               --conf spark.executor.instances=3"
       }
   }'
   ```