我试图设置一个琐碎的电子病历工作,以执行大量文本文件的单词计数,存储在s3://__mybucket__/input/中。我无法正确地添加两个所需的流步骤中的第一个步骤(第一个步骤是映射输入到wordSplitter.py,使用IdentityReducer还原到临时存储;第二步是使用/bin/wc/映射这个二级存储的内容,然后再使用IdentityReducer来减少)。
这是第一步的(失败)描述:
Status:FAILED
Reason:S3 Service Error.
Log File:s3://aws-logs-209733341386-us-east-1/elasticmapreduce/j-2XC5AT2ZP48FJ/steps/s-1SML7U7CXRDT5/stderr.gz
Details:Exception in thread "main" com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.s3.model.AmazonS3Exception: Bad Request (Service: Amazon S3; Status Code: 400; Error Code: 400 Bad Request; Request ID: 7799087FCAE73457), S3 Extended Request ID: nQYTtW93TXvi1G8U4LLj73V1xyruzre+uSt4KN1zwuIQpwDwa+J8IujOeQMpV5vRHmbuKZLasgs=
JAR location: command-runner.jar
Main class: None
Arguments: hadoop-streaming -files s3://elasticmapreduce/samples/wordcount/wordSplitter.py -mapper wordSplitter.py -reducer org.apache.hadoop.mapred.lib.IdentityReducer -input s3://__mybucket__/input/ -output s3://__mybucket__/output/
Action on failure: Continue这是发送给hadoop集群的命令:
JAR location : command-runner.jar
Main class : None
Arguments : hadoop-streaming -mapper s3a://elasticmapreduce/samples/wordcount/wordSplitter.py -reducer aggregate -input s3a://__my_bucket__/input/ -output s3a://__my_bucket__/output/发布于 2016-12-21 20:06:54
我认为这里的解决办法可能很容易。
不要使用s3://,而是使用s3a://作为工作访问桶的方案。请参阅这里,s3://方案是不推荐的,并且要求问题中的桶是您的Hadoop数据的独占对象。引用上述doc链接:
这个文件系统要求您为文件系统专门使用一个桶-您不应该使用包含文件的现有桶,也不应该将其他文件写到同一个桶中。该文件系统存储的文件可以大于5GB,但它们不能与其他S3工具互操作。
https://stackoverflow.com/questions/41201750
复制相似问题