s3distcp:无法从空字符串创建路径

0lvr5msh  于 2021-06-03  发布在  Hadoop
关注(0)|答案(2)|浏览(351)

从s3到hdfs运行s3distcp时:

sudo -u hdfs hadoop jar /usr/lib/hadoop/lib/s3distcp.jar --src s3n://workAAAA-KKKK-logs/production-logs/Log-XXXX-click/Log-XXXXX-click-2013-03-27_06-21-19_i-7XXb2x39_00037.gz  --dest hdfs:///test/

我得到以下例外。
我的路径语法有问题吗(s3n://;hdfs:///)?以前有人遇到过这个问题吗?

13/04/04 12:10:52 INFO s3distcp.S3DistCp: Using output path 'hdfs:/tmp/96a8e57b-4c68-406c-b4ca-bf212de12d93/output'
13/04/04 12:10:53 INFO s3distcp.FileInfoListing: Opening new file: hdfs:/tmp/96a8e57b-4c68-406c-b4ca-bf212de12d93/files/1
Exception in thread "main" java.lang.IllegalArgumentException: Can not create a Path from an empty string
        at org.apache.hadoop.fs.Path.checkPathArg(Path.java:91)
        at org.apache.hadoop.fs.Path.<init>(Path.java:99)
        at org.apache.hadoop.fs.Path.<init>(Path.java:58)
        at com.amazon.external.elasticmapreduce.s3distcp.FileInfoListing.getOutputFilePath(FileInfoListing.java:155)
        at com.amazon.external.elasticmapreduce.s3distcp.FileInfoListing.add(FileInfoListing.java:111)
        at com.amazon.external.elasticmapreduce.s3distcp.FileInfoListing.add(FileInfoListing.java:78)
        at com.amazon.external.elasticmapreduce.s3distcp.S3DistCp.createInputFileListS3(S3DistCp.java:122)
        at com.amazon.external.elasticmapreduce.s3distcp.S3DistCp.createInputFileList(S3DistCp.java:60)
        at com.amazon.external.elasticmapreduce.s3distcp.S3DistCp.run(S3DistCp.java:529)
        at com.amazon.external.elasticmapreduce.s3distcp.S3DistCp.run(S3DistCp.java:216)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
        at com.amazon.external.elasticmapreduce.s3distcp.Main.main(Main.java:12)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
5lhxktic

5lhxktic1#

当您试图写入一个即使存在也没有访问权限的路径时,也会发生此问题。
当您尝试在不存在的红移模式中写入时,也会出现这种情况。

ruarlubt

ruarlubt2#

有一种方法可以请求特定的文件,如果你需要的话。您可以使用--copyfrommanifest选项,该选项允许您向s3distcp提供包含所有文件路径(甚至在不同的文件夹上)的清单文件。

相关问题