如何使用Step Functions创建具有不同规格的EMR集群?

0

【以下的问题经过翻译处理】 我正在使用Step Functions创建暂时的Amazon EMR集群。对于任务节点,我使用Spot实例,并为超时设置了终止群集的规则。我能在Step Function脚本中使用多个Spot规则来创建不同规格的集群吗(例如:i3.8xlarge和i4.8xlarge)?通过Amazon EMR控制台,可以在实例群中提到最多五种实例类型。是否有示例脚本可以帮助我测试多个实例类型?我正在参考“使用Step Functions调用Amazon EMR”来创建我的集群。

profile picture
EXPERT
demandé il y a 6 mois12 vues
1 réponse
0

【以下的回答经过翻译处理】 在 Step Function 中添加类似以下的 JSON 代码:

[
{
  "Name": "MainFleet",
  "InstanceFleetType": "MAIN",
  "TargetOnDemandCapacity": 1,
  "InstanceTypeConfigs": [{"InstanceType": "m3.xlarge"}]
},
{
  "Name": "CoreFleet",
  "InstanceFleetType": "CORE",
  "TargetSpotCapacity": 11,
  "TargetOnDemandCapacity": 11,
  "LaunchSpecifications": {
    "SpotSpecification": {
      "TimeoutDurationMinutes": 20,
      "TimeoutAction": "SWITCH_TO_ON_DEMAND"
    }
  },
  "InstanceTypeConfigs": [
    {
      "InstanceType": "r4.xlarge",
      "BidPriceAsPercentageOfOnDemandPrice": 50,
      "WeightedCapacity": 1
    },
    {
      "InstanceType": "r4.2xlarge",
      "BidPriceAsPercentageOfOnDemandPrice": 50,
      "WeightedCapacity": 2
    },
    {
      "InstanceType": "r4.4xlarge",
      "BidPriceAsPercentageOfOnDemandPrice": 50,
      "WeightedCapacity": 4
    }
  ]
}
]

profile picture
EXPERT
répondu il y a 6 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions