简体   繁体   English

EMR集群在AWS控制台UI上不可见

[英]EMR Cluster no visible on AWS Console UI

I created a Cluster using the code : 我使用代码创建了一个Cluster:

> StepFactory stepFactory = new StepFactory();

            StepConfig enableDebugging = new StepConfig().withName("Enable Debugging")
                    .withActionOnFailure("TERMINATE_JOB_FLOW").withHadoopJarStep(stepFactory.newEnableDebuggingStep());


            Application spark = new Application().withName("Spark");

            RunJobFlowRequest createClusterParameters = new RunJobFlowRequest().withName("CreateDatamart")
                                            .withReleaseLabel("emr-5.5.0")
                                            .withSteps(enableDebugging)
                                            .withApplications(spark)
                                            .withLogUri("s3://logs/")
                                            .withServiceRole("EMR_DefaultRole")
                                            .withJobFlowRole("EMR_EC2_DefaultRole")
                                            .withInstances(new JobFlowInstancesConfig()
                                                    .withEc2KeyName("keypair")
                                                    .withInstanceCount(3)
                                                    .withKeepJobFlowAliveWhenNoSteps(false)
                                                    .withMasterInstanceType("m3.xlarge")
                                                    .withSlaveInstanceType("m3.xlarge"));

            RunJobFlowResult createCluster = emr.runJobFlow(createClusterParameters);

The cluster gets created. 群集已创建。 The steps attached to it are also running. 附加的步骤也在运行。 But the cluster is not visible in AWS EMR UI. 但是,在AWS EMR UI中看不到集群。 I can see the details under the Events Tab in EMR. 我可以在EMR的Events选项卡下看到详细信息。 Since it is coming under the Events tab, there is not point that it might be created in some other region. 由于它位于“事件”选项卡下,因此无法在其他某个区域中创建它。 (Although i have checked that too) In the EC2 console i can see the containers created for the EMR. (虽然我也检查过)在EC2控制台中,我可以看到为EMR创建的容器。

In the other-case if i create a cluster directly from UI it is visible. 在另一种情况下,如果我直接从UI创建一个集群,它是可见的。

Is there some error with the code? 代码有问题吗?

If you are adding IAM user visibility to a new cluster, call RunJobFlow and set VisibleToAllUsers to true, otherwise IAM users cannot view the cluster. 如果要将IAM用户可见性添加到新群集,请调用RunJobFlow并将VisibleToAllUsers设置为true,否则IAM用户无法查看群集。

So you'll just need to add the following line before creating your cluster: 因此,您只需在创建群集之前添加以下行:

createClusterParameters.setVisibleToAllUsers(true);

Note: Is it similar if you are creating an AWS Lambda with the Python SDK : 注意:如果您使用Python SDK创建AWS Lambda,它是否类似:

response1 = emr.run_job_flow(
    Name=CLUSTER_NAME, # more properties [...]
    VisibleToAllUsers=True
)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM