我正在尝试对存储在amazon s3中的文件运行一些map reduce工作。我看到http://wiki.apache.org/hadoop/AmazonS3并跟着它进行整合。这是我的代码,它设置了map reduce job的输入目录
FileInputFormat.setInputPaths(job, "s3n://myAccessKey:mySecretKey@myS3Bucket/dir1/dir2/*.txt");
当我运行mapreduce作业时,我得到了这个异常
Exception in thread "main" java.lang.IllegalArgumentException:
Wrong FS: s3n://myAccessKey:mySecretKey@myS3Bucket/dir1/dir2/*.txt,
expected: s3n://myAccessKey:mySecretKey@myS3Bucket
at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:381)
at org.apache.hadoop.fs.FileSystem.makeQualified(FileSystem.java:294)
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.setInputPaths(FileInputFormat.java:352)
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.setInputPaths(FileInputFormat.java:321)
at com.appdynamics.blitz.hadoop.migration.DataMigrationManager.convertAndLoadData(DataMigrationManager.java:340)
at com.appdynamics.blitz.hadoop.migration.DataMigrationManager.migrateData(DataMigrationManager.java:300)
at com.appdynamics.blitz.hadoop.migration.DataMigrationManager.migrate(DataMigrationManager.java:166)
at com.appdynamics.blitz.command.DataMigrationCommand.run(DataMigrationCommand.java:53)
at com.appdynamics.blitz.command.DataMigrationCommand.run(DataMigrationCommand.java:21)
at com.yammer.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:58)
at com.yammer.dropwizard.cli.Cli.run(Cli.java:53)
at com.yammer.dropwizard.Service.run(Service.java:61)
at com.appdynamics.blitz.service.BlitzService.main(BlitzService.java:84)
我无法找到资源来帮助我。任何指针都将深受赞赏。
答案 0 :(得分:0)
你只需继续玩
错误的FS:s3n:// myAccessKey:mySecretKey@myS3Bucket/dir1/dir2/*.txt
您给Hadoop的路径不正确,只有在可以访问正确的文件之后才能正常工作。
答案 1 :(得分:0)
所以我发现了问题。这是由这个错误造成的 https://issues.apache.org/jira/browse/HADOOP-3733
即使我更换了" /" by"%2F"它一直给出同样的问题。我重新生成了钥匙并把它放在了没有" /"在密钥中它修复了问题。