在AWS EMR上运行Hadoop的ngram的时候,出现下面错误:
查询【1】中的log可以发现是”EMR_DefaultRole is invalid.”,这个东西没有创建,那么可以使用【2】【3】中的办法解决,如果还不能解决,那就把IAM账户添加Administer的权限。
之后就可以使用:
aws emr create-default-roles
创建默认角色。
对于EMR的了解:【4】【5】【6】【9】
注意time zone,显示的任务只显示你之前设定的时区。
看【7】【8】可以了解一些AWS的CLI的用法。
看【10】,在Ubuntu或者是OS上安装AWS的CLI。
看【11】了解AWS的注册。
需要使用AWS的CLI进行操作,就需要进行配置。看【12】了解更多。
【14】
遇到这种问题,就是你生成的java运行程序的版本和AWS上的版本不一致。比如你用java8生成的程序不能跑在AWS EMR默认的java7的平台上。
你可以把java程序改成java7的版本,但是依然会有问题,所以可以改成:
1) cd $PROJ3_ROOT2) ant clean3) ant4) Reload 18645-proj3-0.1-latest.jar to aws bucket, if you already uploaded the jar file compiled with java 1.8 before. 5) run the NgramCount program on EMR cluster参考链接: 【1】aws 看结果:https://console.aws.amazon.com/elasticmapreduce/ aws bucket:https://console.aws.amazon.com/s3/ 【2】role设置:https://aws.amazon.com/cn/premiumsupport/knowledge-center/emr-default-role-invalid/ 【3】default role:http://docs.amazonaws.cn/en_us/cli/latest/reference/emr/create-default-roles.html http://stackoverflow.com/questions/27953582/emr-service-role-is-invalid-when-creating-emr-cluster 【4】role的理解:http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-iam-roles-creatingroles.html 【5】MER的理解:http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-iam-roles-launch-jobflow.html 【6】IAM和MER的理解:http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-iam-roles-defaultroles.html 【7】AWS的命令行操作:http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html 【8】AWS的使用说明:https://aws.amazon.com/cn/cli/ 【9】AWS MER的主页:https://aws.amazon.com/cn/emr/ 【10】AWS的服务:http://docs.aws.amazon.com/cli/latest/reference/ 【11】AWS的注册:http://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started_how-users-sign-in.html 【12】AWS的CLI配置:http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-quickconfiguration 【13】AWS EMR的英文链接:http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-what-is-emr.html 【14】AWS的instance:https://aws.amazon.com/cn/ec2/instance-types/
