instance fleet

Instance fleet

  • instance fleet让用户可以在EMR中选择多种机型。

  • instance fleet的配置中,要指定OD和Spot的target capacity;EMR会负责达到容量要求,当有spot被回收时,EMR会替换成其他的机型。

  • 如果是在控制台,可以为每个fleet指定5种EC2机型;如果用CLI,则可以指定30种

  • 每种node type(primary, core, task)只能有一个instance fleet

创建Instance fleet示例

使用OD,

aws emr create-cluster --release-label emr-5.3.1 --service-role EMR_DefaultRole \
  --ec2-attributes InstanceProfile=EMR_EC2_DefaultRole \
  --instance-fleets \
    InstanceFleetType=MASTER,TargetOnDemandCapacity=1,InstanceTypeConfigs=['{InstanceType=m5.xlarge}'] \
    InstanceFleetType=CORE,TargetOnDemandCapacity=1,InstanceTypeConfigs=['{InstanceType=m5.xlarge}']

使用Spot:

aws emr create-cluster --release-label emr-5.3.1 --service-role EMR_DefaultRole \
  --ec2-attributes InstanceProfile=EMR_EC2_DefaultRole \
  --instance-fleets \
    InstanceFleetType=MASTER,TargetSpotCapacity=1,\
InstanceTypeConfigs=['{InstanceType=m5.xlarge,BidPrice=0.5}'] \
    InstanceFleetType=CORE,TargetSpotCapacity=1,\
InstanceTypeConfigs=['{InstanceType=m5.xlarge,BidPrice=0.5}']