hadoop - 配置 EMR 集群以实现公平调度

标签 hadoop apache-spark emr amazon-emr

我正在尝试通过公平调度启动一个 emr 集群,以便我可以并行运行多个步骤。我看到这可以通过管道 ( https://aws.amazon.com/about-aws/whats-new/2015/06/run-parallel-hadoop-jobs-on-your-amazon-emr-cluster-using-aws-data-pipeline/ ) 实现,但我已经通过调用 awscli[1] 的气流作业自动进行了集群管理/创建,所以只更新我的配置会很棒。

aws emr create-cluster \
        --applications Name=Spark Name=Ganglia \
        --ec2-attributes "${EC2_PROPERTIES}" \
        --service-role EMR_DefaultRole \
        --release-label emr-5.8.0 \
        --log-uri ${S3_LOGS} \
        --enable-debugging \
        --name ${CLUSTER_NAME} \
        --region us-east-1 \
        --instance-groups InstanceGroupType=MASTER,InstanceCount=1,InstanceType=m3.xlarge InstanceGroupType=CORE,InstanceCount=4,InstanceType=m3.xlarge)

我认为可以使用 --configurations ( https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html ) 标志来实现,但不确定环境名称是否正确

最佳答案

是的,你是对的。您可以使用 EMR 配置来实现您的目标。您可以使用如下内容创建一个 JSON 文件:

yarn 配置.json:

[
  {
    "Classification": "yarn-site",
    "Properties": {
      "yarn.resourcemanager.scheduler.class": "org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler"
    }
  }
]

根据 Hadoop Fair Scheduler docs

然后将您的 AWS CLI 修改为:

aws emr create-cluster \
        --applications Name=Spark Name=Ganglia \
        --ec2-attributes "${EC2_PROPERTIES}" \
        --service-role EMR_DefaultRole \
        --release-label emr-5.8.0 \
        --log-uri ${S3_LOGS} \
        --enable-debugging \
        --name ${CLUSTER_NAME} \
        --region us-east-1 \
        --instance-groups \
        --configurations file://yarn-config.json
InstanceGroupType=MASTER,InstanceCount=1,InstanceType=m3.xlarge 
InstanceGroupType=CORE,InstanceCount=4,InstanceType=m3.xlarge)

关于hadoop - 配置 EMR 集群以实现公平调度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48195766/

相关文章:

hadoop - UIMA DUCC 与 Hadoop 上的 UIMA

hadoop - Amazon EMR JSON

apache-spark - 如何将应用程序提交到yarn-cluster,以便包中的jar也被复制?

java - Spark 作业无法连接到 Cassandra

hadoop - 通过Amazon Elastic MapReduce上的MapReduce程序访问时无法加载Hive-JDBC驱动程序

hadoop - 在Spark中按用户ID分组

apache-spark - 如何使用Spark将输出作为单独的文件写入现有HDFS目录下?

apache-spark - 从spark sql插入hive表

scala - 从日期中提取字段

r - 在 Sparklyr 中按组计算分位数