java - EMR 集群在步骤状态“正在运行/待定”中挂起
问题描述
我正在通过带有自定义 jar 步骤的 java SDK 启动 EMR 集群。集群启动成功,但在步骤处于挂起/运行状态的引导后,集群卡住了。我什至无法在机器上 ssh。
以下是我使用自定义 jar 步骤启动集群的代码 -
String dataTrasnferJar = s3://test/testApplication.jar;
if (dataTrasnferJar == null || dataTrasnferJar.isEmpty())
throw new InvalidS3ObjectException(
"EMR custom jar file path is null/empty. Please provide a valid jar file path");
HadoopJarStepConfig customJarConfig = new HadoopJarStepConfig().withJar(dataTrasnferJar);
StepConfig customJarStep = new StepConfig("Mongo_to_S3_Data_Transfer", customJarConfig)
.withActionOnFailure(ActionOnFailure.CONTINUE);
AmazonElasticMapReduce emr = AmazonElasticMapReduceClientBuilder.standard()
.withCredentials(awsCredentialsProvider)
.withRegion(region)
.build();
Application spark = new Application().withName("Spark");
String clusterName = "my-cluster-" + System.currentTimeMillis();
RunJobFlowRequest request = new RunJobFlowRequest()
.withName(clusterName)
.withReleaseLabel("emr-6.0.0")
.withApplications(spark)
.withVisibleToAllUsers(true)
.withSteps(customJarStep)
.withLogUri(loggingS3Bucket)
.withServiceRole("EMR_DefaultRole")
.withJobFlowRole("EMR_EC2_DefaultRole")
.withInstances(new JobFlowInstancesConfig()
.withEc2KeyName(key_pair)
.withInstanceCount(instanceCount)
.withEc2SubnetIds(subnetId)
.withAdditionalMasterSecurityGroups(securityGroup)
.withKeepJobFlowAliveWhenNoSteps(true)
.withMasterInstanceType(instanceType));
RunJobFlowResult result = emr.runJobFlow(request);
解决方案
EMR emr-6.0.0 版本仍在开发中。您可以对 emr-5.29.0 进行相同的尝试吗?
推荐阅读
- r - 比较和匹配两个数据帧并将值存储在第三个数据帧中
- python - Django REST 框架序列化程序返回格式为列表而不是 JSON
- filter - 从 R Shiny 中的选定输入中过滤
- sql - Oracle Sql 属性与命名空间
- java - 如何使用交互式查询存储和全局存储实现处理单个主题的 Kafka Streams 拓扑
- r - 带有 if 和 else 任务的 For 循环
- android - 打开权限管理器设置页面
- javascript - 如何在javascript中返回嵌套函数的值?
- amazon-redshift - 为数据仓库 ods 层中的每个表创建 1:1 视图
- angular - 如何在Angular 8中映射两个数组