我已经在AWS的EMR上运行作业,并将输出存储在EMR作业的HDFS中。然后我尝试通过distcp或s3distcp将结果复制到S3,但两者都失败,如下所述。 (注:原因我不只是直接送我的EMR作业的输出S3是由于(目前未解决)问题我在Where is my AWS EMR reducer output for my completed job (should be on S3, but nothing there)?使用distcp和s3distcp与输出到HDFS的EMR作业使用的问题
对于DistCp使用说明,我跑(以下this post's recommendation):
elastic-mapreduce --jobflow <MY-JOB-ID> --jar \
s3://elasticmapreduce/samples/distcp/distcp.jar \
--args -overwrite \
--args hdfs:///output/myJobOutput,s3n://output/myJobOutput \
--step-name "Distcp output to s3"
在错误日志(到/ mnt /无功/日志/的Hadoop /步/ 8),我得到:
With failures, global counters are inaccurate; consider running with -i
Copy failed: Status Code: 403, AWS Service: Amazon S3, AWS Request ID: <SOME-REQUEST-ID>, AWS Error Code: null, AWS Error Message: Forbidden, S3 Extended Request ID: <SOME-EXT-REQUEST-ID>
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:548)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:288)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:170)
...
对于s3distcp,我运行(以下the s3distcp documentation):
elastic-mapreduce --jobflow <MY-JOB-ID> --jar \
s3://us-east-1.elasticmapreduce/libs/s3distcp/1.0.4/s3distcp.jar \
--args '--src,/output/myJobOutput,--dest,s3n://output/myJobOutput'
在错误日志中(到/ mnt /无功/日志/的Hadoop /步/ 9),我得到:
java.lang.RuntimeException: Reducer task failed to copy 1 files: hdfs://10.116.203.7:9000/output/myJobOutput/part-00000 etc
at com.amazon.elasticmapreduce.s3distcp.CopyFilesReducer.close(Unknown Source)
at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:537)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:428)
at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059)
at org.apache.hadoop.mapred.Child.main(Child.java:249)
任何想法我做错了吗?
更新:有人响应在AWS论坛为post about a similar distcp error提到的IAM用户的用户权限,
,但我不知道这是什么意思
(编辑:我还没有创建任何IAM用户,所以它使用默认值);希望它有助于查明我的问题。
更新2:我注意到在NameNode的日志文件中这个错误..我要去寻找到默认EMR权限,看它是否是我的问题(当重新运行s3distcp):
2012-06-24 21:57:21,326 WARN org.apache.hadoop.security.ShellBasedUnixGroupsMapping (IPC Server handler 40 on 9000): got exception trying to get groups for user job_201206242009_0005
org.apache.hadoop.util.Shell$ExitCodeException: id: job_201206242009_0005: No such user
at org.apache.hadoop.util.Shell.runCommand(Shell.java:255)
at org.apache.hadoop.util.Shell.run(Shell.java:182)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:375)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:461)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:444)
at org.apache.hadoop.security.ShellBasedUnixGroupsMapping.getUnixGroups(ShellBasedUnixGroupsMapping.java:68)
at org.apache.hadoop.security.ShellBasedUnixGroupsMapping.getGroups(ShellBasedUnixGroupsMapping.java:45)
at org.apache.hadoop.security.Groups.getGroups(Groups.java:79)
at org.apache.hadoop.security.UserGroupInformation.getGroupNames(UserGroupInformation.java:966)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.<init>(FSPermissionChecker.java:50)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(FSNamesystem.java:5160)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkTraverse(FSNamesystem.java:5143)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getFileInfo(FSNamesystem.java:1992)
at org.apache.hadoop.hdfs.server.namenode.NameNode.getFileInfo(NameNode.java:837)
...
更新3:我联系AWS Support,他们没有看到问题,所以我现在正等待他们的工程团队回来。我会听到更多回复
哈!我想每个人查看你的消息假设“输出”是你的桶的名称:))) – denys