

AWS Data Pipeline 不再提供給新客戶。的現有客戶 AWS Data Pipeline 可以繼續正常使用服務。[進一步了解](https://aws.amazon.com/blogs/big-data/migrate-workloads-from-aws-data-pipeline/)

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# EmrCluster
<a name="dp-object-emrcluster"></a>

代表 Amazon EMR 叢集的組態。[EmrActivity](dp-object-emractivity.md) 和 使用此物件[HadoopActivity](dp-object-hadoopactivity.md)來啟動叢集。

**Topics**
+ [排程器](#emrcluster-schedulers)
+ [Amazon EMR 版本](#dp-emrcluster-release-versions)
+ [Amazon EMR 許可](#w2aac52c17b9c11)
+ [語法](#emrcluster-syntax)
+ [範例](emrcluster-example.md)
+ [另請參閱](#emrcluster-seealso)

## 排程器
<a name="emrcluster-schedulers"></a>

排程器可提供在 Hadoop 叢集內指定資源配置和任務優先順序的方式。管理員或使用者可以為各種類別的使用者和應用程式選擇排程器。排程器可使用佇列，將資源配置給使用者和應用程式。您可以在建立叢集時設定這些佇列。您接著可以設定特定類型工作和使用者的優先順序。這可以讓您有效率地使用叢集資源，允許超過一名使用者將工作提交至叢集。有三種可用的排程器類型：
+ [FairScheduler](https://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/FairScheduler.html) — 嘗試在大量期間內平均排程資源。
+ [CapacityScheduler](https://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/CapacityScheduler.html) — 使用佇列來允許叢集管理員將使用者指派給具有不同優先順序和資源配置的佇列。
+ 預設 — 由叢集使用，可由您的網站設定。

## Amazon EMR 版本
<a name="dp-emrcluster-release-versions"></a>

Amazon EMR 版本是一組來自大數據生態系統的開源應用程式。每個版本都包含不同的大數據應用程式、元件和功能，您可以在建立叢集時選擇讓 Amazon EMR 安裝和設定。請使用版本標籤指定發行版本。發行標籤的格式應為 `emr-x.x.x`。例如 `emr-5.30.0`。根據發行標籤`emr-4.0.0`和更新版本的 Amazon EMR 叢集會使用 `releaseLabel` 屬性來指定`EmrCluster`物件的發行標籤。早期版本使用此 `amiVersion` 屬性。

**重要**  
所有使用發行版本 5.22.0 或更新版本建立的 Amazon EMR 叢集都會使用 [Signature 第 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) 版來驗證對 Amazon S3 的請求。某些早期版本會使用簽章版本 2。簽章版本 2 支援將不再提供。如需詳細資訊，請參閱 [Amazon S3 更新 — Sigv2 棄用期間延長和修改](https://aws.amazon.com/blogs/aws/amazon-s3-update-sigv2-deprecation-period-extended-modified/)。我們強烈建議您使用支援 Signature 第 4 版的 Amazon EMR 發行版本。使用早期版本時，從 EMR 4.7.x 開始，系列中的最新版本均已更新，可支援簽章版本 4。使用早期版本的 EMR 版本時，我們建議您使用此系列中的最新版本。此外，請避免使用 EMR 4.7.0 以下版本。

### 考量事項與限制
<a name="dp-emrcluster-considerations"></a>

#### 使用最新版本的 Task Runner
<a name="dp-task-runner-latest"></a>

如果您使用具有發行標籤的自我管理`EmrCluster`物件，請使用最新的任務執行器。如需 Task Runner 的詳細資訊，請參閱[使用任務執行器](dp-using-task-runner.md)。您可以為所有 Amazon EMR 組態分類設定屬性值。如需詳細資訊，請參閱《*Amazon EMR 版本指南*》中的[設定應用程式](https://docs.aws.amazon.com/ElasticMapReduce/latest/ReleaseGuide/emr-configure-apps.html)、 [EmrConfiguration](dp-object-emrconfiguration.md)和 [屬性](dp-object-property.md) 物件參考。

#### 支援 IMDSv2
<a name="dp-emr-imdsv2-support"></a>

舊版，僅 AWS Data Pipeline 支援 IMDSv1。現在， AWS Data Pipeline 支援 Amazon EMR 5.23.1、5.27.1 和 5.32 或更新版本，以及 Amazon EMR 6.2 或更新版本中的 IMDSv2。IMDSv2 使用工作階段導向方法，在從執行個體擷取中繼資料資訊時更好地處理身分驗證。您應該使用 TaskRunner-2.0 建立使用者受管資源，將執行個體設定為進行 IMDSv2 呼叫。 TaskRunner-2

#### Amazon EMR 5.32 或更新版本和 Amazon EMR 6.x
<a name="dp-emr-6-classpath"></a>

Amazon EMR 5.32 或更新版本和 6.x 發行系列使用 Hadoop 3.x 版，與 Hadoop 2.x 版相比，Hadoop 的 classpath 評估方式發生重大變化。Joda-Time 等常見程式庫已從 classpath 中移除。

如果 [EmrActivity](dp-object-emractivity.md)或 [HadoopActivity](dp-object-hadoopactivity.md)執行的 Jar 檔案對 Hadoop 3.x 中移除的程式庫具有相依性，則步驟會失敗，並顯示錯誤 `java.lang.NoClassDefFoundError`或 `java.lang.ClassNotFoundException`。使用 Amazon EMR 5.x 發行版本執行沒有問題的 Jar 檔案可能會發生這種情況。

若要修正此問題，您必須在啟動 `EmrActivity`或 之前，將 Jar 檔案相依性複製到`EmrCluster`物件上的 Hadoop classpath`HadoopActivity`。我們提供 bash 指令碼來執行此操作。bash 指令碼可在下列位置使用，其中 *MyRegion* 是`EmrCluster`物件執行 AWS 的區域，例如 `us-west-2`。

```
s3://datapipeline-MyRegion/MyRegion/bootstrap-actions/latest/TaskRunner/copy-jars-to-hadoop-classpath.sh
```

執行指令碼的方式取決於 `EmrActivity`或 是否在由 管理的資源`HadoopActivity`上執行， AWS Data Pipeline 還是在自我管理的資源上執行。

如果您使用 管理的資源 AWS Data Pipeline，請將 `bootstrapAction` 新增至 `EmrCluster` 物件。`bootstrapAction` 指定要複製為引數的指令碼和 Jar 檔案。每個`EmrCluster`物件最多可以新增 255 個`bootstrapAction`欄位，而且可以將`bootstrapAction`欄位新增至已有引導動作的`EmrCluster`物件。

若要將此指令碼指定為引導操作，請使用下列語法，其中 `JarFileRegion`是儲存 Jar 檔案的區域，而每個 *MyJarFile*** n都是要複製到 Hadoop classpath 之 Jar 檔案的 Amazon S3 中的絕對路徑。根據預設，請勿指定 Hadoop classpath 中的 Jar 檔案。

```
s3://datapipeline-MyRegion/MyRegion/bootstrap-actions/latest/TaskRunner/copy-jars-to-hadoop-classpath.sh,JarFileRegion,MyJarFile1,MyJarFile2[, ...]
```

下列範例會指定引導操作，在 Amazon S3： `my-jar-file.jar`和 中複製兩個 Jar 檔案`emr-dynamodb-tool-4.14.0-jar-with-dependencies.jar`。範例中使用的 區域是 us-west-2。

```
{
  "id" : "MyEmrCluster",
  "type" : "EmrCluster",
  "keyPair" : "my-key-pair",
  "masterInstanceType" : "m5.xlarge",
  "coreInstanceType" : "m5.xlarge",
  "coreInstanceCount" : "2",
  "taskInstanceType" : "m5.xlarge",
  "taskInstanceCount": "2",
  "bootstrapAction" : ["s3://datapipeline-us-west-2/us-west-2/bootstrap-actions/latest/TaskRunner/copy-jars-to-hadoop-classpath.sh,us-west-2,s3://path/to/my-jar-file.jar,s3://dynamodb-dpl-us-west-2/emr-ddb-storage-handler/4.14.0/emr-dynamodb-tools-4.14.0-jar-with-dependencies.jar"]
}
```

您必須儲存並啟用管道，新 的變更`bootstrapAction`才會生效。

如果您使用自我管理的資源，您可以將指令碼下載到叢集執行個體，並使用 SSH 從命令列執行指令碼。指令碼會建立名為 `datapipeline-jars.sh`的目錄，`/etc/hadoop/conf/shellprofile.d`以及該目錄中名為 的檔案。以命令列引數提供的 jar 檔案會複製到指令碼建立名為 的目錄`/home/hadoop/datapipeline_jars`。如果您的叢集設定不同，請在下載後適當修改指令碼。

在命令列上執行指令碼的語法與使用上一個範例中`bootstrapAction`顯示的 略有不同。在引數之間使用空格而非逗號，如下列範例所示。

```
./copy-jars-to-hadoop-classpath.sh us-west-2 s3://path/to/my-jar-file.jar s3://dynamodb-dpl-us-west-2/emr-ddb-storage-handler/4.14.0/emr-dynamodb-tools-4.14.0-jar-with-dependencies.jar
```

## Amazon EMR 許可
<a name="w2aac52c17b9c11"></a>

當您建立自訂 IAM 角色時，請仔細考慮叢集執行其工作所需的最低許可。請務必授予必要資源的存取權，例如 Amazon S3 中的檔案或 Amazon RDS、Amazon Redshift 或 DynamoDB 中的資料。若您希望將 `visibleToAllUsers` 設為 False，您的角色必須擁有適當的許可來執行此作業。請注意，`DataPipelineDefaultRole` 沒有這些許可。您必須提供 `DefaultDataPipelineResourceRole`和 `DataPipelineDefaultRole`角色的聯集做為`EmrCluster`物件角色，或為此目的建立自己的角色。

## 語法
<a name="emrcluster-syntax"></a>


****  

| 物件呼叫欄位 | Description | 槽類型 | 
| --- | --- | --- | 
| schedule | 在排程間隔的執行期間會呼叫此物件。指定其他物件的排程參考，以設定此物件的相依性執行順序。您可以在物件上明確設定排程以滿足這項要求，例如，指定 "schedule": \$1"ref": "DefaultSchedule"\$1。在大部分的情況下，建議您將排程參考放在預設的管道物件，讓所有物件都繼承該排程。或者，如果管道有排程的樹狀目錄 (主排程內還有排程)，您可以建立含排程參考的父物件。如需範例選用排程組態的詳細資訊，請參閱[https://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-object-schedule.html](https://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-object-schedule.html)。 | 參考物件，例如  "schedule":\$1"ref":"myScheduleId"\$1 | 

 


****  

| 選用欄位 | Description | 槽類型 | 
| --- | --- | --- | 
| actionOnResourceFailure | 此資源的資源故障之後所採取的動作。有效值為 "retryall" (這會在指定的時間內重試叢集所有任務) 和 "retrynone"。 | String | 
| actionOnTaskFailure | 此資源的任務失敗之後所採取的動作。有效值為 "continue (繼續)" (表示不終止叢集) 和 "terminate (終止)"。 | String | 
| additionalMasterSecurityGroupIds | EMR 叢集額外主安全群組的識別符，遵循 sg-01XXXX6a 格式。如需詳細資訊，請參閱《[Amazon EMR 管理指南》中的 Amazon EMR 其他安全群組](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-additional-sec-groups.html)。  | String | 
| additionalSlaveSecurityGroupIds | EMR 叢集額外從屬安全群組的識別符，遵循 sg-01XXXX6a 格式。 | String | 
| amiVersion | Amazon EMR 用來安裝叢集節點的 Amazon Machine Image (AMI) 版本。如需詳細資訊，請參閱 [Amazon EMR 管理指南](https://docs.aws.amazon.com/emr/latest/ManagementGuide/)。 | String | 
| 應用程式 | 以逗號分隔引數安裝在叢集中的應用程式。根據預設，會安裝 Hive 和 Pig。此參數僅適用於 Amazon EMR 4.0 版及更新版本。 | String | 
| attemptStatus | 遠端活動最新回報的狀態。 | String | 
| attemptTimeout | 遠端工作完成的逾時。如果設定，則系統可能會重試未在設定開始時間內完成的遠端活動。 | Period | 
| availabilityZone | 叢集執行所在的可用區域。 | String | 
| bootstrapAction | 當叢集啟動時要執行的動作。您可以指定逗號分隔引數。若要指定上限 255 的多個動作，請新增多個 bootstrapAction 欄位。預設行為是不使用任何引導操作啟動叢集。 | String | 
| 組態 | Amazon EMR 叢集的組態。此參數僅適用於 Amazon EMR 4.0 版及更新版本。 | 參考物件，例如 "configuration":\$1"ref":"myEmrConfigurationId"\$1 | 
| coreInstanceBidPrice | 您願意為 Amazon EC2 執行個體支付的最高 Spot 價格。如果已指定出價，Amazon EMR 會使用執行個體群組適用的 Spot 執行個體。指定貨幣為 USD。 | String | 
| coreInstanceCount | 用於叢集的核心節點數目。 | Integer | 
| coreInstanceType | 用於核心節點的 Amazon EC2 執行個體類型。請參閱 [Amazon EMR 叢集支援的 Amazon EC2 執行個體](dp-emr-supported-instance-types.md)。 | String | 
| coreGroupConfiguration | Amazon EMR 叢集核心執行個體群組的組態。此參數僅適用於 Amazon EMR 4.0 版及更新版本。 | 參考物件，例如 “configuration”: \$1“ref”: “myEmrConfigurationId”\$1 | 
| coreEbsConfiguration | 將連接至 Amazon EMR 叢集中核心群組中每個核心節點的 Amazon EBS 磁碟區的組態。如需詳細資訊，請參閱《Amazon EC2 使用者指南》中的[支援 EBS 最佳化的執行個體類型](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html)。 | 參考物件，例如 “coreEbsConfiguration”: \$1“ref”: “myEbsConfiguration”\$1 | 
| customAmiId | 僅適用於 Amazon EMR 5.7.0 版及更新版本。指定 Amazon EMR 佈建 Amazon EC2 執行個體時要使用之自訂 AMI 的 AMI ID。它也可以用來取代引導操作來自訂叢集節點組態。如需詳細資訊，請參閱《Amazon EMR 管理指南》中的下列主題。[使用自訂 AMI](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html) | String | 
| EbsBlockDeviceConfig |  與執行個體群組相關聯的請求 Amazon EBS 區塊型設備組態。包含指定的磁碟區數量，這些磁碟區會與執行個體群組中的每個執行個體產生關聯性。包含 `volumesPerInstance` 和 `volumeSpecification`，其中： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/datapipeline/latest/DeveloperGuide/dp-object-emrcluster.html)  | 參考物件，例如 “EbsBlockDeviceConfig”: \$1“ref”: “myEbsBlockDeviceConfig”\$1 | 
| emrManagedMasterSecurityGroupId | Amazon EMR 叢集主安全群組的識別符，其格式為 sg-01XXXX6a。如需詳細資訊，請參閱《Amazon EMR 管理指南》中的[設定安全群組](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-security-groups.html)。 | String | 
| emrManagedSlaveSecurityGroupId | Amazon EMR 叢集從屬安全群組的識別符，其格式為 sg-01XXXX6a。 | String | 
| enableDebugging | 在 Amazon EMR 叢集上啟用偵錯。 | String | 
| failureAndRerunMode | 描述相依性故障或重新執行時的消費者節點行為。 | 列舉 | 
| hadoopSchedulerType | 叢集的排程器類型。有效類型為： PARALLEL\$1FAIR\$1SCHEDULING、 PARALLEL\$1CAPACITY\$1SCHEDULING 和  DEFAULT\$1SCHEDULER。 | 列舉 | 
| httpProxy | 用戶端用來連線到 AWS 服務的 Proxy 主機。 | 參考物件，例如 "httpProxy":\$1"ref":"myHttpProxyId"\$1 | 
| initTimeout | 等候資源啟動的時間長短。 | Period | 
| keyPair | 用來登入 Amazon EMR 叢集主節點的 Amazon EC2 金鑰對。 | String | 
| lateAfterTimeout | 物件必須完成的管道啟動後經過的時間。只有在排程類型未設定為 時，才會觸發它ondemand。 | Period | 
| masterInstanceBidPrice | 您願意為 Amazon EC2 執行個體支付的最高 Spot 價格。介於 0 到 20.00 的小數值 (不含 0 和 20.00)。指定貨幣為 USD。設定此值可為 Amazon EMR 叢集主節點啟用 Spot 執行個體。如果已指定出價，Amazon EMR 會使用執行個體群組適用的 Spot 執行個體。 | String | 
| masterInstanceType | 用於主節點的 Amazon EC2 執行個體類型。請參閱 [Amazon EMR 叢集支援的 Amazon EC2 執行個體](dp-emr-supported-instance-types.md)。 | String | 
| masterGroupConfiguration | Amazon EMR 叢集主要執行個體群組的組態。此參數僅適用於 Amazon EMR 4.0 版及更新版本。 | 參考物件，例如 “configuration”: \$1“ref”: “myEmrConfigurationId”\$1 | 
| masterEbsConfiguration | 將連接至 Amazon EMR 叢集中主群組中每個主節點的 Amazon EBS 磁碟區的組態。如需詳細資訊，請參閱《Amazon EC2 使用者指南》中的[支援 EBS 最佳化的執行個體類型](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html)。 | 參考物件，例如 “masterEbsConfiguration”: \$1“ref”: “myEbsConfiguration”\$1 | 
| maxActiveInstances | 同時作用中的元件執行個體數目上限。重新執行不計入作用中的執行個體數量。 | Integer | 
| maximumRetries | 故障時嘗試重試的次數上限。 | Integer | 
| onFail | 目前物件發生故障時要執行的動作。 | 參考物件，例如 "onFail":\$1"ref":"myActionId"\$1 | 
| onLateAction | 某個物件尚未排程或仍未完成時，應該觸發的動作。 | 參考物件，例如 "onLateAction":\$1"ref":"myActionId"\$1 | 
| onSuccess | 目前物件成功時要執行的動作。 | 參考物件，例如 "onSuccess":\$1"ref":"myActionId"\$1 | 
| parent | 目前物件的父系，其插槽已被繼承。 | 參考物件，例如 "parent":\$1"ref":"myBaseObjectId"\$1 | 
| pipelineLogUri | 用於上傳管道日誌的 Amazon S3 URI （例如 's3：//BucketName/Key/')。 | String | 
| region | Amazon EMR 叢集應在其中執行的區域程式碼。根據預設，叢集執行所在的區域和管道相同。您可以在和相依資料集相同的區域中執行叢集。 | 列舉 | 
| releaseLabel | EMR 叢集的版本標籤。 | String | 
| reportProgressTimeout | 遠端工作連續呼叫 reportProgress 的逾時。如果設定，則不回報指定時段進度的遠端活動，可能會視為已停滯而重試。 | Period | 
| resourceRole |  AWS Data Pipeline 用來建立 Amazon EMR 叢集的 IAM 角色。預設角色為 DataPipelineDefaultRole。 | String | 
| retryDelay | 兩次重試嘗試之間的逾時持續時間。 | Period | 
| role | 傳遞至 Amazon EMR 以建立 EC2 節點的 IAM 角色。 | String | 
| runsOn | 此物件不允許此欄位。 | 參考物件，例如 "runsOn":\$1"ref":"myResourceId"\$1 | 
| securityConfiguration | 要套用至叢集的 EMR 安全組態識別符。此參數僅適用於 Amazon EMR 4.8.0 版及更新版本。 | String | 
| serviceAccessSecurityGroupId | Amazon EMR 叢集之服務存取安全群組的識別符。 | 字串. 它遵循 sg-01XXXX6a 格式，例如 sg-1234abcd。 | 
| scheduleType | 排程類型可讓您指定管道定義的物件應該排程在間隔開頭還是間隔結尾。值為：cron、ondemand 和 timeseries。timeseries 排程表示執行個體會排程在每個間隔的結尾。cron 排程表示執行個體會排程在每個間隔的開頭。ondemand 排程可讓您在每次啟用時執行一次管道。您不必複製或重新建立管道，然後再執行一次。若您使用 ondemand 排程，則必須在預設物件中指定此排程，且其必須是針對管道中物件指定的唯一 scheduleType。若要使用 ondemand 管道，請針對每次後續執行呼叫 ActivatePipeline 操作。 | 列舉 | 
| subnetId | 要在其中啟動 Amazon EMR 叢集的子網路識別符。 | String | 
| supportedProducts | 在 Amazon EMR 叢集上安裝第三方軟體的參數，例如 Hadoop 的第三方分佈。 | String | 
| taskInstanceBidPrice | 您願意為 EC2 執行個體支付的 Spot 價格上限。介於 0 到 20.00 的小數值 (不含 0 和 20.00)。指定貨幣為 USD。如果已指定出價，Amazon EMR 會使用執行個體群組適用的 Spot 執行個體。 | String | 
| taskInstanceCount | 要用於 Amazon EMR 叢集的任務節點數量。 | Integer | 
| taskInstanceType | 用於任務節點的 Amazon EC2 執行個體類型。 | String | 
| taskGroupConfiguration | Amazon EMR 叢集任務執行個體群組的組態。此參數僅適用於 Amazon EMR 4.0 版及更新版本。 | 參考物件，例如 “configuration”: \$1“ref”: “myEmrConfigurationId”\$1 | 
| taskEbsConfiguration | Amazon EMR 叢集中將連接至任務群組中每個任務節點的 Amazon EBS 磁碟區的組態。如需詳細資訊，請參閱《Amazon EC2 使用者指南》中的[支援 EBS 最佳化的執行個體類型](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html)。 | 參考物件，例如 “taskEbsConfiguration”: \$1“ref”: “myEbsConfiguration”\$1 | 
| terminateAfter | 在這些小時後終止資源。 | Integer | 
| VolumeSpecification |   Amazon EBS 磁碟區規格，例如 Amazon EMR 叢集中連接至 Amazon EC2 執行個體的 Amazon EBS 磁碟區請求的磁碟區類型、IOPS 和大小，以 Gigibyte (GiB) 為單位。節點可以是核心節點、主節點或任務節點。 `VolumeSpecification` 包括： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/datapipeline/latest/DeveloperGuide/dp-object-emrcluster.html)  | 參考物件，例如 “VolumeSpecification”: \$1“ref”: “myVolumeSpecification”\$1 | 
| useOnDemandOnLastAttempt | 最後一次嘗試請求資源時，提出隨需執行個體請求，而不是 Spot 執行個體請求。這可確保即使之前所有的嘗試都失敗，最後一次嘗試也不會中斷。 | Boolean | 
| workerGroup | 此物件不允許此欄位。 | String | 

 


****  

| 執行時間欄位 | Description | 槽類型 | 
| --- | --- | --- | 
| @activeInstances | 目前已排程的作用中執行個體物件清單。 | 參考物件，例如 "activeInstances":\$1"ref":"myRunnableObjectId"\$1 | 
| @actualEndTime | 此物件執行完成的時間。 | DateTime | 
| @actualStartTime | 此物件執行開始的時間。 | DateTime | 
| cancellationReason | 若此物件已取消，會提供 cancellationReason。 | String | 
| @cascadeFailedOn | 物件失敗所在相依性鏈的描述。 | 參考物件，例如 "cascadeFailedOn":\$1"ref":"myRunnableObjectId"\$1 | 
| emrStepLog | 步驟日誌僅適用於 Amazon EMR 活動嘗試。 | String | 
| errorId | 若此物件失敗，會提供錯誤 ID。 | String | 
| errorMessage | 若此物件失敗，會提供錯誤訊息。 | String | 
| errorStackTrace | 如果此物件失敗，則為錯誤堆疊追蹤。 | String | 
| @failureReason | 資源故障的原因。 | String | 
| @finishedTime | 此物件完成其執行的時間。 | DateTime | 
| hadoopJobLog | Amazon EMR 活動嘗試時可使用 Hadoop 任務日誌。 | String | 
| @healthStatus | 反映已達終止狀態之最後一個物件執行個體成功或失敗的物件運作狀態。 | String | 
| @healthStatusFromInstanceId | 已達終止狀態之最後一個執行個體物件的 ID。 | String | 
| @healthStatusUpdatedTime | 上次更新運作狀態的時間。 | DateTime | 
| hostname | 選取任務嘗試之用戶端的主機名稱。 | String | 
| @lastDeactivatedTime | 此物件最後停用的時間。 | DateTime | 
| @latestCompletedRunTime | 執行完成最近一次執行的時間。 | DateTime | 
| @latestRunTime | 執行排程最近一次執行的時間。 | DateTime | 
| @nextRunTime | 下次要排程執行的時間。 | DateTime | 
| reportProgressTime | 遠端活動最近報告進度的時間。 | DateTime | 
| @scheduledEndTime | 物件的排程結束時間。 | DateTime | 
| @scheduledStartTime | 物件的排程開始時間。 | DateTime | 
| @status | 此物件的狀態。 | String | 
| @version | 建立物件使用的管道版本。 | String | 
| @waitingOn | 此物件等待之相依性清單的描述。 | 參考物件，例如 "waitingOn":\$1"ref":"myRunnableObjectId"\$1 | 

 


****  

| 系統欄位 | Description | 槽類型 | 
| --- | --- | --- | 
| @error | 描述格式錯誤物件的錯誤。 | String | 
| @pipelineId | 此物件所屬管道的 ID。 | String | 
| @sphere | 物件在生命週期中的位置。元件物件引發執行個體物件，這會執行嘗試物件。 | String | 

# 範例
<a name="emrcluster-example"></a>

以下為此物件類型的範例。

**Topics**
+ [使用 hadoopVersion 啟動 Amazon EMR 叢集](emrcluster-example-launch.md)
+ [使用發行標籤 emr-4.x 或更高版本啟動 Amazon EMR 叢集](emrcluster-example-release-label.md)
+ [在 Amazon EMR 叢集上安裝其他軟體](emrcluster-example-install-software.md)
+ [停用 3.x 版本的伺服器端加密](emrcluster-example1-disable-encryption.md)
+ [停用 4.x 版本的伺服器端加密](emrcluster-example2-disable-encryption.md)
+ [設定 Hadoop KMS ACL 並在 HDFS 中建立加密區域](emrcluster-example-hadoop-kms.md)
+ [指定自訂 IAM 角色](emrcluster-example-custom-iam-roles.md)
+ [在適用於 Java 的 AWS 開發套件中使用 EmrCluster 資源](emrcluster-example-java.md)
+ [在私有子網路中設定 Amazon EMR 叢集](emrcluster-example-private-subnet.md)
+ [將 EBS 磁碟區連接到叢集節點](emrcluster-example-ebs.md)

# 使用 hadoopVersion 啟動 Amazon EMR 叢集
<a name="emrcluster-example-launch"></a>

**Example**  <a name="example1"></a>
下列範例使用 AMI 版本 1.0 和 Hadoop 0.20 啟動 Amazon EMR 叢集。  

```
{
  "id" : "MyEmrCluster",
  "type" : "EmrCluster",
  "hadoopVersion" : "0.20",
  "keyPair" : "my-key-pair",
  "masterInstanceType" : "m3.xlarge",
  "coreInstanceType" : "m3.xlarge",
  "coreInstanceCount" : "10",
  "taskInstanceType" : "m3.xlarge",
  "taskInstanceCount": "10",
  "bootstrapAction" : ["s3://Region.elasticmapreduce/bootstrap-actions/configure-hadoop,arg1,arg2,arg3","s3://Region.elasticmapreduce/bootstrap-actions/configure-hadoop/configure-other-stuff,arg1,arg2"]
}
```

# 使用發行標籤 emr-4.x 或更高版本啟動 Amazon EMR 叢集
<a name="emrcluster-example-release-label"></a>

**Example**  
下列範例使用較新的`releaseLabel`欄位啟動 Amazon EMR 叢集：  

```
{
  "id" : "MyEmrCluster",
  "type" : "EmrCluster",
  "keyPair" : "my-key-pair",
  "masterInstanceType" : "m3.xlarge",
  "coreInstanceType" : "m3.xlarge",
  "coreInstanceCount" : "10",
  "taskInstanceType" : "m3.xlarge",
  "taskInstanceCount": "10",
  "releaseLabel": "emr-4.1.0",
  "applications": ["spark", "hive", "pig"],
  "configuration": {"ref":"myConfiguration"}  
}
```

# 在 Amazon EMR 叢集上安裝其他軟體
<a name="emrcluster-example-install-software"></a>

**Example**  <a name="example2"></a>
`EmrCluster` 提供在 Amazon EMR 叢集上安裝第三方軟體`supportedProducts`的欄位，例如，它可讓您安裝自訂 Hadoop 分佈，例如 MapR。它接受要讀取及採取動作的第三方軟體引數逗號分隔清單。以下範例會示範如何使用 `EmrCluster` 的 `supportedProducts` 欄位建立自訂 MapR M3 版本叢集，在其上安裝 Karmasphere Analytics，並在其上執行 `EmrActivity` 物件。  

```
{
    "id": "MyEmrActivity",
    "type": "EmrActivity",
    "schedule": {"ref": "ResourcePeriod"},
    "runsOn": {"ref": "MyEmrCluster"},
    "postStepCommand": "echo Ending job >> /mnt/var/log/stepCommand.txt",    
    "preStepCommand": "echo Starting job > /mnt/var/log/stepCommand.txt",
    "step": "/home/hadoop/contrib/streaming/hadoop-streaming.jar,-input,s3n://elasticmapreduce/samples/wordcount/input,-output, \
     hdfs:///output32113/,-mapper,s3n://elasticmapreduce/samples/wordcount/wordSplitter.py,-reducer,aggregate"
  },
  {    
    "id": "MyEmrCluster",
    "type": "EmrCluster",
    "schedule": {"ref": "ResourcePeriod"},
    "supportedProducts": ["mapr,--edition,m3,--version,1.2,--key1,value1","karmasphere-enterprise-utility"],
    "masterInstanceType": "m3.xlarge",
    "taskInstanceType": "m3.xlarge"
}
```

# 停用 3.x 版本的伺服器端加密
<a name="emrcluster-example1-disable-encryption"></a>

**Example**  <a name="example3"></a>
根據預設， 建立的 Hadoop 2.x 版`EmrCluster`活動 AWS Data Pipeline 會啟用伺服器端加密。若您想要停用伺服器端加密，您必須在叢集物件定義中指定引導操作。  
以下範例會建立停用伺服器端加密的 `EmrCluster` 活動：  

```
{  
   "id":"NoSSEEmrCluster",
   "type":"EmrCluster",
   "hadoopVersion":"2.x",
   "keyPair":"my-key-pair",
   "masterInstanceType":"m3.xlarge",
   "coreInstanceType":"m3.large",
   "coreInstanceCount":"10",
   "taskInstanceType":"m3.large",
   "taskInstanceCount":"10",
   "bootstrapAction":["s3://Region.elasticmapreduce/bootstrap-actions/configure-hadoop,-e, fs.s3.enableServerSideEncryption=false"]
}
```

# 停用 4.x 版本的伺服器端加密
<a name="emrcluster-example2-disable-encryption"></a>

**Example**  <a name="example4"></a>
您必須使用 `EmrConfiguration` 物件停用伺服器端加密。  
以下範例會建立停用伺服器端加密的 `EmrCluster` 活動：  

```
   {
      "name": "ReleaseLabelCluster",
      "releaseLabel": "emr-4.1.0",
      "applications": ["spark", "hive", "pig"],
      "id": "myResourceId",
      "type": "EmrCluster",
      "configuration": {
        "ref": "disableSSE"
      }
    },
    {
      "name": "disableSSE",
      "id": "disableSSE",
      "type": "EmrConfiguration",
      "classification": "emrfs-site",
      "property": [{
        "ref": "enableServerSideEncryption"
      }
      ]
    },
    {
      "name": "enableServerSideEncryption",
      "id": "enableServerSideEncryption",
      "type": "Property",
      "key": "fs.s3.enableServerSideEncryption",
      "value": "false"
    }
```

# 設定 Hadoop KMS ACL 並在 HDFS 中建立加密區域
<a name="emrcluster-example-hadoop-kms"></a>

**Example**  <a name="example5"></a>
下列物件會建立 Hadoop KMS 的 ACL，並在 HDFS 中建立加密區域及對應的加密金鑰：  

```
{
      "name": "kmsAcls",
      "id": "kmsAcls",
      "type": "EmrConfiguration",
      "classification": "hadoop-kms-acls",
      "property": [
        {"ref":"kmsBlacklist"},
        {"ref":"kmsAcl"}
      ]
    },
    {
      "name": "hdfsEncryptionZone",
      "id": "hdfsEncryptionZone",
      "type": "EmrConfiguration",
      "classification": "hdfs-encryption-zones",
      "property": [
        {"ref":"hdfsPath1"},
        {"ref":"hdfsPath2"}
      ]
    },
    {
      "name": "kmsBlacklist",
      "id": "kmsBlacklist",
      "type": "Property",
      "key": "hadoop.kms.blacklist.CREATE",
      "value": "foo,myBannedUser"
    },
    {
      "name": "kmsAcl",
      "id": "kmsAcl",
      "type": "Property",
      "key": "hadoop.kms.acl.ROLLOVER",
      "value": "myAllowedUser"
    },
    {
      "name": "hdfsPath1",
      "id": "hdfsPath1",
      "type": "Property",
      "key": "/myHDFSPath1",
      "value": "path1_key"
    },
    {
      "name": "hdfsPath2",
      "id": "hdfsPath2",
      "type": "Property",
      "key": "/myHDFSPath2",
      "value": "path2_key"
    }
```

# 指定自訂 IAM 角色
<a name="emrcluster-example-custom-iam-roles"></a>

**Example**  <a name="example6"></a>
根據預設， `DataPipelineDefaultRole`會以 Amazon EMR 服務角色和 Amazon EC2 執行個體描述檔`DataPipelineDefaultResourceRole`的形式 AWS Data Pipeline 傳遞，以代表您建立資源。不過，您可以建立自訂 Amazon EMR 服務角色和自訂執行個體描述檔，並改用它們。 AWS Data Pipeline 應該有足夠的許可來使用自訂角色建立叢集，而且您必須新增 AWS Data Pipeline 做為信任的實體。  
下列範例物件指定 Amazon EMR 叢集的自訂角色：  

```
{  
   "id":"MyEmrCluster",
   "type":"EmrCluster",
   "hadoopVersion":"2.x",
   "keyPair":"my-key-pair",
   "masterInstanceType":"m3.xlarge",
   "coreInstanceType":"m3.large",
   "coreInstanceCount":"10",
   "taskInstanceType":"m3.large",
   "taskInstanceCount":"10",
   "role":"emrServiceRole",
   "resourceRole":"emrInstanceProfile"
}
```

# 在適用於 Java 的 AWS 開發套件中使用 EmrCluster 資源
<a name="emrcluster-example-java"></a>

**Example**  <a name="example7"></a>
下列範例示範如何使用 `EmrCluster`和 `EmrActivity` 建立 Amazon EMR 4.x 叢集，以使用 Java 開發套件執行 Spark 步驟：  

```
public class dataPipelineEmr4 {

  public static void main(String[] args) {
    
	AWSCredentials credentials = null;
	credentials = new ProfileCredentialsProvider("/path/to/AwsCredentials.properties","default").getCredentials();
	DataPipelineClient dp = new DataPipelineClient(credentials);
	CreatePipelineRequest createPipeline = new CreatePipelineRequest().withName("EMR4SDK").withUniqueId("unique");
	CreatePipelineResult createPipelineResult = dp.createPipeline(createPipeline);
	String pipelineId = createPipelineResult.getPipelineId();
    
	PipelineObject emrCluster = new PipelineObject()
	    .withName("EmrClusterObj")
	    .withId("EmrClusterObj")
	    .withFields(
			new Field().withKey("releaseLabel").withStringValue("emr-4.1.0"),
			new Field().withKey("coreInstanceCount").withStringValue("3"),
			new Field().withKey("applications").withStringValue("spark"),
			new Field().withKey("applications").withStringValue("Presto-Sandbox"),
			new Field().withKey("type").withStringValue("EmrCluster"),
			new Field().withKey("keyPair").withStringValue("myKeyName"),
			new Field().withKey("masterInstanceType").withStringValue("m3.xlarge"),
			new Field().withKey("coreInstanceType").withStringValue("m3.xlarge")        
			);
  
	PipelineObject emrActivity = new PipelineObject()
	    .withName("EmrActivityObj")
	    .withId("EmrActivityObj")
	    .withFields(
			new Field().withKey("step").withStringValue("command-runner.jar,spark-submit,--executor-memory,1g,--class,org.apache.spark.examples.SparkPi,/usr/lib/spark/lib/spark-examples.jar,10"),
			new Field().withKey("runsOn").withRefValue("EmrClusterObj"),
			new Field().withKey("type").withStringValue("EmrActivity")
			);
      
	PipelineObject schedule = new PipelineObject()
	    .withName("Every 15 Minutes")
	    .withId("DefaultSchedule")
	    .withFields(
			new Field().withKey("type").withStringValue("Schedule"),
			new Field().withKey("period").withStringValue("15 Minutes"),
			new Field().withKey("startAt").withStringValue("FIRST_ACTIVATION_DATE_TIME")
			);
      
	PipelineObject defaultObject = new PipelineObject()
	    .withName("Default")
	    .withId("Default")
	    .withFields(
			new Field().withKey("failureAndRerunMode").withStringValue("CASCADE"),
			new Field().withKey("schedule").withRefValue("DefaultSchedule"),
			new Field().withKey("resourceRole").withStringValue("DataPipelineDefaultResourceRole"),
			new Field().withKey("role").withStringValue("DataPipelineDefaultRole"),
			new Field().withKey("pipelineLogUri").withStringValue("s3://myLogUri"),
			new Field().withKey("scheduleType").withStringValue("cron")
			);     
      
	List<PipelineObject> pipelineObjects = new ArrayList<PipelineObject>();
    
	pipelineObjects.add(emrActivity);
	pipelineObjects.add(emrCluster);
	pipelineObjects.add(defaultObject);
	pipelineObjects.add(schedule);
    
	PutPipelineDefinitionRequest putPipelineDefintion = new PutPipelineDefinitionRequest()
	    .withPipelineId(pipelineId)
	    .withPipelineObjects(pipelineObjects);
    
	PutPipelineDefinitionResult putPipelineResult = dp.putPipelineDefinition(putPipelineDefintion);
	System.out.println(putPipelineResult);
    
	ActivatePipelineRequest activatePipelineReq = new ActivatePipelineRequest()
	    .withPipelineId(pipelineId);
	ActivatePipelineResult activatePipelineRes = dp.activatePipeline(activatePipelineReq);
	
      System.out.println(activatePipelineRes);
      System.out.println(pipelineId);
    
    }

}
```

# 在私有子網路中設定 Amazon EMR 叢集
<a name="emrcluster-example-private-subnet"></a>

**Example**  <a name="example8"></a>
此範例包含組態，該組態會在 VPC 內的私有子網路中啟動叢集。如需詳細資訊，請參閱《[Amazon EMR 管理指南》中的在 VPC 中啟動 Amazon EMR 叢集](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-vpc-launching-job-flows.html)。 **此組態為選擇性。您可以在任何使用 `EmrCluster` 物件的管道中使用它。  
若要在私有子網路中啟動 Amazon EMR 叢集，請在`EmrCluster`組態`serviceAccessSecurityGroupId`中指定 `SubnetId`、`emrManagedSlaveSecurityGroupId`、 `emrManagedMasterSecurityGroupId`和 。  

```
{
  "objects": [
    {
      "output": {
        "ref": "S3BackupLocation"
      },
      "input": {
        "ref": "DDBSourceTable"
      },
      "maximumRetries": "2",
      "name": "TableBackupActivity",
      "step": "s3://dynamodb-emr-#{myDDBRegion}/emr-ddb-storage-handler/2.1.0/emr-ddb-2.1.0.jar,org.apache.hadoop.dynamodb.tools.DynamoDbExport,#{output.directoryPath},#{input.tableName},#{input.readThroughputPercent}",
      "id": "TableBackupActivity",
      "runsOn": {
        "ref": "EmrClusterForBackup"
      },
      "type": "EmrActivity",
      "resizeClusterBeforeRunning": "false"
    },
    {
      "readThroughputPercent": "#{myDDBReadThroughputRatio}",
      "name": "DDBSourceTable",
      "id": "DDBSourceTable",
      "type": "DynamoDBDataNode",
      "tableName": "#{myDDBTableName}"
    },
    {
      "directoryPath": "#{myOutputS3Loc}/#{format(@scheduledStartTime, 'YYYY-MM-dd-HH-mm-ss')}",
      "name": "S3BackupLocation",
      "id": "S3BackupLocation",
      "type": "S3DataNode"
    },
    {
      "name": "EmrClusterForBackup",
      "coreInstanceCount": "1",
      "taskInstanceCount": "1",
      "taskInstanceType": "m4.xlarge",
      "coreInstanceType": "m4.xlarge",
      "releaseLabel": "emr-4.7.0",
      "masterInstanceType": "m4.xlarge",
      "id": "EmrClusterForBackup",
      "subnetId": "#{mySubnetId}",
      "emrManagedMasterSecurityGroupId": "#{myMasterSecurityGroup}",
      "emrManagedSlaveSecurityGroupId": "#{mySlaveSecurityGroup}",
      "serviceAccessSecurityGroupId": "#{myServiceAccessSecurityGroup}",
      "region": "#{myDDBRegion}",
      "type": "EmrCluster",
      "keyPair": "user-key-pair"
    },
    {
      "failureAndRerunMode": "CASCADE",
      "resourceRole": "DataPipelineDefaultResourceRole",
      "role": "DataPipelineDefaultRole",
      "pipelineLogUri": "#{myPipelineLogUri}",
      "scheduleType": "ONDEMAND",
      "name": "Default",
      "id": "Default"
    }
  ],
  "parameters": [
    {
      "description": "Output S3 folder",
      "id": "myOutputS3Loc",
      "type": "AWS::S3::ObjectKey"
    },
    {
      "description": "Source DynamoDB table name",
      "id": "myDDBTableName",
      "type": "String"
    },
    {
      "default": "0.25",
      "watermark": "Enter value between 0.1-1.0",
      "description": "DynamoDB read throughput ratio",
      "id": "myDDBReadThroughputRatio",
      "type": "Double"
    },
    {
      "default": "us-east-1",
      "watermark": "us-east-1",
      "description": "Region of the DynamoDB table",
      "id": "myDDBRegion",
      "type": "String"
    }
  ],
  "values": {
     "myDDBRegion": "us-east-1",
      "myDDBTableName": "ddb_table",
      "myDDBReadThroughputRatio": "0.25",
      "myOutputS3Loc": "s3://s3_path",
      "mySubnetId": "subnet_id",
      "myServiceAccessSecurityGroup":  "service access security group",
      "mySlaveSecurityGroup": "slave security group",
      "myMasterSecurityGroup": "master security group",
      "myPipelineLogUri": "s3://s3_path"
  }
}
```

# 將 EBS 磁碟區連接到叢集節點
<a name="emrcluster-example-ebs"></a>

**Example**  <a name="example8"></a>
您可以將 EBS 磁碟區連接到您管道中 EMR 叢集內任何類型的節點。若要將 EBS 磁碟區連接到節點，請在您的 `EmrCluster` 組態中使用 `coreEbsConfiguration`、`masterEbsConfiguration` 和 `TaskEbsConfiguration`。  
此 Amazon EMR 叢集範例會將 Amazon EBS 磁碟區用於其主節點、任務和核心節點。如需詳細資訊，請參閱《[Amazon EMR 管理指南》中的 Amazon EMR 中的 Amazon EBS 磁碟區](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-storage.html)。 **  
這些組態都是選擇性的。您可以在任何使用 `EmrCluster` 物件的管道中使用他們。  
在管道中，按一下 `EmrCluster` 物件組態，選擇 **Master EBS Configuration (主要 EBS 組態)**、**Core EBS Configuration (核心 EBS 組態)** 或 **Task EBS Configuration (任務 EBS 組態)**，然後輸入與以下範例相似的組態詳細資訊。  

```
{
  "objects": [
    {
      "output": {
        "ref": "S3BackupLocation"
      },
      "input": {
        "ref": "DDBSourceTable"
      },
      "maximumRetries": "2",
      "name": "TableBackupActivity",
      "step": "s3://dynamodb-emr-#{myDDBRegion}/emr-ddb-storage-handler/2.1.0/emr-ddb-2.1.0.jar,org.apache.hadoop.dynamodb.tools.DynamoDbExport,#{output.directoryPath},#{input.tableName},#{input.readThroughputPercent}",
      "id": "TableBackupActivity",
      "runsOn": {
        "ref": "EmrClusterForBackup"
      },
      "type": "EmrActivity",
      "resizeClusterBeforeRunning": "false"
    },
    {
      "readThroughputPercent": "#{myDDBReadThroughputRatio}",
      "name": "DDBSourceTable",
      "id": "DDBSourceTable",
      "type": "DynamoDBDataNode",
      "tableName": "#{myDDBTableName}"
    },
    {
      "directoryPath": "#{myOutputS3Loc}/#{format(@scheduledStartTime, 'YYYY-MM-dd-HH-mm-ss')}",
      "name": "S3BackupLocation",
      "id": "S3BackupLocation",
      "type": "S3DataNode"
    },
    {
      "name": "EmrClusterForBackup",
      "coreInstanceCount": "1",
      "taskInstanceCount": "1",
      "taskInstanceType": "m4.xlarge",
      "coreInstanceType": "m4.xlarge",
      "releaseLabel": "emr-4.7.0",
      "masterInstanceType": "m4.xlarge",
      "id": "EmrClusterForBackup",
      "subnetId": "#{mySubnetId}",
      "emrManagedMasterSecurityGroupId": "#{myMasterSecurityGroup}",
      "emrManagedSlaveSecurityGroupId": "#{mySlaveSecurityGroup}",
      "region": "#{myDDBRegion}",
      "type": "EmrCluster",
      "coreEbsConfiguration": {
        "ref": "EBSConfiguration"
      },
      "masterEbsConfiguration": {
        "ref": "EBSConfiguration"
      },
      "taskEbsConfiguration": {
        "ref": "EBSConfiguration"
      },
      "keyPair": "user-key-pair"
    },
    {
       "name": "EBSConfiguration",
        "id": "EBSConfiguration",
        "ebsOptimized": "true",
        "ebsBlockDeviceConfig" : [
            { "ref": "EbsBlockDeviceConfig" }
        ],
        "type": "EbsConfiguration"
    },
    {
        "name": "EbsBlockDeviceConfig",
        "id": "EbsBlockDeviceConfig",
        "type": "EbsBlockDeviceConfig",
        "volumesPerInstance" : "2",
        "volumeSpecification" : {
            "ref": "VolumeSpecification"
        }
    },
    {
      "name": "VolumeSpecification",
      "id": "VolumeSpecification",
      "type": "VolumeSpecification",
      "sizeInGB": "500",
      "volumeType": "io1",
      "iops": "1000"
    },
    {
      "failureAndRerunMode": "CASCADE",
      "resourceRole": "DataPipelineDefaultResourceRole",
      "role": "DataPipelineDefaultRole",
      "pipelineLogUri": "#{myPipelineLogUri}",
      "scheduleType": "ONDEMAND",
      "name": "Default",
      "id": "Default"
    }
  ],
  "parameters": [
    {
      "description": "Output S3 folder",
      "id": "myOutputS3Loc",
      "type": "AWS::S3::ObjectKey"
    },
    {
      "description": "Source DynamoDB table name",
      "id": "myDDBTableName",
      "type": "String"
    },
    {
      "default": "0.25",
      "watermark": "Enter value between 0.1-1.0",
      "description": "DynamoDB read throughput ratio",
      "id": "myDDBReadThroughputRatio",
      "type": "Double"
    },
    {
      "default": "us-east-1",
      "watermark": "us-east-1",
      "description": "Region of the DynamoDB table",
      "id": "myDDBRegion",
      "type": "String"
    }
  ],
  "values": {
     "myDDBRegion": "us-east-1",
      "myDDBTableName": "ddb_table",
      "myDDBReadThroughputRatio": "0.25",
      "myOutputS3Loc": "s3://s3_path",
      "mySubnetId": "subnet_id",
      "mySlaveSecurityGroup": "slave security group",
      "myMasterSecurityGroup": "master security group",
      "myPipelineLogUri": "s3://s3_path"
  }
}
```

## 另請參閱
<a name="emrcluster-seealso"></a>
+ [EmrActivity](dp-object-emractivity.md)