Java 从S3读取EMR问题的Nutch

Java 从S3读取EMR问题的Nutch,java,hadoop,amazon-web-services,nutch,Java,Hadoop,Amazon Web Services,Nutch,您好,我正在尝试在亚马逊的EMR上运行1.2。 为此,我从S3中指定了一个输入目录。我得到以下错误: Fetcher: java.lang.IllegalArgumentException: This file system object (hdfs://ip-11-202-55-144.ec2.internal:9000) does not support access to the request path 's3n://crawlResults2/segments

您好,我正在尝试在亚马逊的EMR上运行1.2。
为此,我从S3中指定了一个输入目录。我得到以下错误:

Fetcher: java.lang.IllegalArgumentException: This file system object (hdfs://ip-11-202-55-144.ec2.internal:9000) does not support access to the request path 's3n://crawlResults2/segments/20110823155002/crawl_fetch' You possibly called FileSystem.get(conf) when you should have called FileSystem.get(uri, conf) to obtain a file system supporting your path. 获取程序:java.lang.IllegalArgumentException: 此文件系统对象(hdfs://ip-11-202-55-144.ec2.internal:9000) 不支持访问请求路径 's3n://crawlResults2/segments/20110823155002/crawl\u fetch' 您可能在应该调用时调用了FileSystem.get(conf) get(uri,conf)以获取支持您的路径的文件系统。 我理解
FileSystem.get(uri,conf)
FileSystem.get(conf)
之间的区别。如果我自己写这篇文章,我会
FileSystem.get(uri,conf)
但是我试图使用现有的Nutch代码

我问了这个问题,有人告诉我需要修改
hadoop site.xml
以包含以下属性:
fs.default.name
fs.s3.awsAccessKeyId
fs.s3.awsSecretAccessKey
。我在
core site.xml
中更新了这些属性(
hadoop site.xml
不存在),但这没有什么区别。有人有其他想法吗? 谢谢您的帮助。

请尝试在中指定

hadoop-site.xml


fs.default.name
org.apache.hadoop.fs.s3.s3文件系统
这将向Nutch提到默认情况下应该使用S3

性质

fs.s3.awsAccessKeyId 及 fs.s3.awsSecretAccessKey


只有在S3对象处于身份验证下时(在S3中,所有用户都可以访问对象,或仅通过身份验证)才需要规范。

从未使用过Nutch,但可能会检查您尝试获取的资源是否公开可用(仅用于测试不会有损于此),也可以尝试替换(再次用于测试)s3n://->s3://。我想它应该与s3n和指定的creds一起工作,但更多的测试不会有什么坏处
<property>
  <name>fs.default.name</name>
  <value>org.apache.hadoop.fs.s3.S3FileSystem</value>
</property>