aws emr验证错误

wf82jlnq  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(377)

我在运行map reduce java应用程序时遇到问题我使用aws提供的教程代码简化了问题,该教程运行预定义步骤:

  1. public class Main {
  2. public static void main(String[] args) {
  3. AWSCredentials credentials = getCredentials();
  4. AmazonElasticMapReduceClient emr = new AmazonElasticMapReduceClient(
  5. credentials);
  6. StepFactory stepFactory = new StepFactory();
  7. StepConfig enabledebugging = new StepConfig()
  8. .withName("Enable debugging")
  9. .withActionOnFailure("TERMINATE_JOB_FLOW")
  10. .withHadoopJarStep(stepFactory.newEnableDebuggingStep());
  11. StepConfig installHive = new StepConfig().withName("Install Hive")
  12. .withActionOnFailure("TERMINATE_JOB_FLOW")
  13. .withHadoopJarStep(stepFactory.newInstallHiveStep());
  14. RunJobFlowRequest request = new RunJobFlowRequest()
  15. .withName("Hive Interactive")
  16. .withAmiVersion("3.3.1")
  17. .withSteps(enabledebugging, installHive)
  18. .withLogUri("s3://tweets-hadoop/")
  19. .withServiceRole("service_role")
  20. .withJobFlowRole("jobflow_role")
  21. .withInstances(
  22. new JobFlowInstancesConfig().withEc2KeyName("hadoop")
  23. .withInstanceCount(5)
  24. .withKeepJobFlowAliveWhenNoSteps(true)
  25. .withMasterInstanceType("m3.xlarge")
  26. .withSlaveInstanceType("m1.large"));
  27. RunJobFlowResult result = emr.runJobFlow(request);
  28. System.out.println(result);
  29. }
  30. private static AWSCredentials getCredentials() {
  31. AWSCredentials credentials = null;
  32. credentials = new BasicAWSCredentials("<KEY>","<VALUE>");
  33. return credentials;
  34. }

}
其中,'hadoop'是我在ec2控制台中创建的密钥对。
运行后,我看到作业试图在emr控制台中启动,1分钟后,它从“启动”更改为“终止时出错验证错误”
没有提供其他信息
有什么问题吗?
谢谢!

qnyhuwrf

qnyhuwrf1#

您可以在emr群集列表详细信息页(顶部)上查看错误的详细信息。因为这是一个验证错误,它还没有出现在日志中,所以唯一的方法是检查异常详细信息/cli响应/aws控制台。。。
我猜您使用的示例类型在emr中不受支持(它们在ec2中受支持,但在emr中不受支持)。然而,一旦你遵循给定的步骤,你将得到确切的问题。

相关问题