【发布时间】:2016-02-23 19:43:01
【问题描述】:
我在运行 map-reduce Java 应用程序时遇到问题 我使用 AWS 提供的运行预定义步骤的教程代码简化了我的问题:
public class Main {
public static void main(String[] args) {
AWSCredentials credentials = getCredentials();
AmazonElasticMapReduceClient emr = new AmazonElasticMapReduceClient(
credentials);
StepFactory stepFactory = new StepFactory();
StepConfig enabledebugging = new StepConfig()
.withName("Enable debugging")
.withActionOnFailure("TERMINATE_JOB_FLOW")
.withHadoopJarStep(stepFactory.newEnableDebuggingStep());
StepConfig installHive = new StepConfig().withName("Install Hive")
.withActionOnFailure("TERMINATE_JOB_FLOW")
.withHadoopJarStep(stepFactory.newInstallHiveStep());
RunJobFlowRequest request = new RunJobFlowRequest()
.withName("Hive Interactive")
.withAmiVersion("3.3.1")
.withSteps(enabledebugging, installHive)
.withLogUri("s3://tweets-hadoop/")
.withServiceRole("service_role")
.withJobFlowRole("jobflow_role")
.withInstances(
new JobFlowInstancesConfig().withEc2KeyName("hadoop")
.withInstanceCount(5)
.withKeepJobFlowAliveWhenNoSteps(true)
.withMasterInstanceType("m3.xlarge")
.withSlaveInstanceType("m1.large"));
RunJobFlowResult result = emr.runJobFlow(request);
System.out.println(result);
}
private static AWSCredentials getCredentials() {
AWSCredentials credentials = null;
credentials = new BasicAWSCredentials("<KEY>","<VALUE>");
return credentials;
}
}
其中 , 是活动密钥,“hadoop”是我在 EC2 控制台中创建的密钥对。
运行后,我看到作业试图在 EMR 控制台中启动,1 分钟后它从 'starting' 变为 'Terminated with errors 验证错误'
没有提供其他信息
任何想法出了什么问题?
谢谢!
【问题讨论】:
-
有关更多线索,请查看您已配置的 S3 上的 EMR 日志文件夹。第一步,请严格按照教程docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/… 中概述的步骤操作。
标签: hadoop amazon-web-services amazon-ec2 emr elastic-map-reduce