기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
Amazon EMR on EKS 서비스 통합 APIs를 사용하여 Amazon EMR on EKS AWS Step Functions 와 통합하는 방법을 알아봅니다. 서비스 통합 API는 해당 Amazon EMR on EKS API와 동일하지만 다음 표와 같이 모든 API에서 모든 통합 패턴을 지원하지 않습니다.
Step Functions의 AWS 서비스와 통합하는 방법에 대한 자세한 내용은 서비스 통합 및 섹션을 참조하세요Step Functions의 서비스 API에 파라미터 전달.
최적화된 Amazon EMR on EKS 통합이 Amazon EMR on EKS AWS SDK 통합과 어떻게 다른지
-
작업 실행(.sync) 통합 패턴이 지원됩니다.
-
요청 및 응답 통합 패턴에 대한 최적화는 없습니다.
-
작업 토큰을 사용하여 콜백 대기 통합 패턴은 지원되지 않습니다.
참고
Amazon EMR과 통합을 위해 Step Functions는 처음 10분과 이후 300초 동안 작업 폴링 빈도를 60초로 하드 코딩합니다.
API | 요청 및 응답 | 작업 실행(.sync) |
---|---|---|
CreateVirtualCluster | 지원 | 지원되지 않음 |
DeleteVirtualCluster | 지원 | 지원 |
StartJobRun | 지원 | 지원 |
지원되는 Amazon EMR on EKS API는 다음과 같습니다.
참고
Step Functions에는 작업의 최대 입력 또는 결과 데이터 크기에 대한 할당량이 있습니다. 이렇게 하면 다른 서비스로 데이터를 보내거나 받을 때 256KiB의 데이터를 UTF-8 인코딩 문자열로 제한합니다. 상태 시스템 실행과 관련된 할당량을 참조하세요.
다음에는 가상 클러스터를 만드는 Task
상태가 포함됩니다.
"Create_Virtual_Cluster": {
"Type": "Task",
"Resource": "arn:aws:states:::emr-containers:createVirtualCluster",
"Parameters": {
"Name": "MyVirtualCluster",
"ContainerProvider": {
"Id": "EKSClusterName",
"Type": "EKS",
"Info": {
"EksInfo": {
"Namespace": "Namespace"
}
}
}
},
"End": true
}
다음에는 작업을 가상 클러스터에 제출하고 완료될 때까지 기다리는 Task
상태가 포함됩니다.
"Submit_Job": {
"Type": "Task",
"Resource": "arn:aws:states:::emr-containers:startJobRun.sync",
"Parameters": {
"Name": "MyJobName",
"VirtualClusterId.$": "$.VirtualClusterId",
"ExecutionRoleArn": "arn:aws:iam::<accountId>
:role/job-execution-role",
"ReleaseLabel": "emr-6.2.0-latest",
"JobDriver": {
"SparkSubmitJobDriver": {
"EntryPoint": "s3://<amzn-s3-demo-bucket>
/jobs/trip-count.py",
"EntryPointArguments": [
"60"
],
"SparkSubmitParameters": "--conf spark.driver.cores=2 --conf spark.executor.instances=10 --conf spark.kubernetes.pyspark.pythonVersion=3 --conf spark.executor.memory=10G --conf spark.driver.memory=10G --conf spark.executor.cores=1 --conf spark.dynamicAllocation.enabled=false"
}
},
"ConfigurationOverrides": {
"ApplicationConfiguration": [
{
"Classification": "spark-defaults",
"Properties": {
"spark.executor.instances": "2",
"spark.executor.memory": "2G"
}
}
],
"MonitoringConfiguration": {
"PersistentAppUI": "ENABLED",
"CloudWatchMonitoringConfiguration": {
"LogGroupName": "MyLogGroupName",
"LogStreamNamePrefix": "MyLogStreamNamePrefix"
},
"S3MonitoringConfiguration": {
"LogUri": "s3://<amzn-s3-demo-logging-bucket1>
"
}
}
},
"Tags": {
"taskType"
: "jobName"
}
},
"End": true
}
다음에는 가상 클러스터를 삭제하고 삭제가 완료될 때까지 기다리는 Task
상태가 포함됩니다.
"Delete_Virtual_Cluster": {
"Type": "Task",
"Resource": "arn:aws:states:::emr-containers:deleteVirtualCluster.sync",
"Parameters": {
"Id.$": "$.VirtualClusterId"
},
"End": true
}
를 다른 AWS 서비스와 Step Functions 함께 사용할 때 IAM 권한을 구성하는 방법에 대한 자세한 내용은 섹션을 참조하세요Step Functions가 통합 서비스용 IAM 정책을 생성하는 방법.