【问题标题】:AWS EMRFS Consistent View enable via SDKAWS EMRFS 一致视图通过 SDK 启用
【发布时间】:2023-03-06 07:49:01
【问题描述】:

通常通过 emrfs-site.xml 启用 emrfs 一致性 http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emrfs-configure-consistent-view.html

有谁知道这些设置是否可以通过 SDK 访问?

【问题讨论】:

    标签: amazon-web-services aws-sdk emr


    【解决方案1】:

    要使用 Java SDK 启用 EMRFS,需要将“emrfs-site”配置添加到 RunJobFlowRequest,并且必须将 fs.s3.consistent 属性设置为 true强>。像这样:

    Map<String, String> emrfsProperties = new HashMap<>();
    emrfsProperties.put("fs.s3.consistent", "true");
    
    RunJobFlowRequest request = new RunJobFlowRequest()
            ....
            .withServiceRole(SERVICE_ROLE)
            .withJobFlowRole(JOB_FLOW_ROLE)
            .withConfigurations(
                    new Configuration().withClassification("yarn-site").withProperties(yarnProperties),
                    new Configuration().withClassification("emrfs-site").withProperties(emrfsProperties)
            )
            .withInstances(new JobFlowInstancesConfig()
                    .withEc2KeyName(EC2_KEYPAIR)
                    ....
    

    EMRFS 配置参数的完整列表可以在here找到

    【讨论】:

      【解决方案2】:

      是的,您在这里有完整的文档: http://docs.aws.amazon.com/ElasticMapReduce/latest/API/Welcome.html

      您需要先授权与 AWS 的连接,然后才能使用 API 根据需要配置应用程序。 也看这里: http://docs.aws.amazon.com/ElasticMapReduce/latest/API/CommonParameters.html http://docs.aws.amazon.com/ElasticMapReduce/latest/API/EmrConfigurations.html

      【讨论】:

        猜你喜欢
        • 2017-10-18
        • 2022-01-13
        • 1970-01-01
        • 1970-01-01
        • 2020-11-10
        • 2020-09-04
        • 2015-05-11
        • 2016-07-08
        • 1970-01-01
        相关资源
        最近更新 更多