1

我有一个与之前提出的类似问题相关的问题。我无法将数据从 HDFS 复制到 IBM Cloud 中的 S3 存储桶。

我使用命令:hadoop distcp hdfs://namenode:9000/user/root/data/ s3a://hdfs-backup/

我在/etc/hadoop/core-site.xml文件中添加了额外的属性:

<property>
  <name>fs.s3a.access.key</name>
  <value>XXX</value>
</property>

<property>
  <name>fs.s3a.secret.key</name>
  <value>XXX</value>
</property>

<property>
  <name>fs.s3a.endpoint</name>
  <value>s3.eu-de.cloud-object-storage.appdomain.cloud</value>
</property>

<property>
  <name>fs.s3a.multipart.size</name>
  <value>104857600</value>
</property>

我收到以下错误消息:

root@e05ffff9bac9:/etc/hadoop# hadoop distcp hdfs://namenode:9000/user/root/data/ s3a://hdfs-backup/
2021-04-29 13:29:36,723 ERROR tools.DistCp: Invalid arguments:
java.lang.IllegalArgumentException
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1314)
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1237)
        at org.apache.hadoop.fs.s3a.S3AFileSystem.initialize(S3AFileSystem.java:280)
        at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3303)
        at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:124)
        at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3352)
        at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3320)
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:479)
        at org.apache.hadoop.fs.Path.getFileSystem(Path.java:365)
        at org.apache.hadoop.tools.DistCp.setTargetPathExists(DistCp.java:240)
        at org.apache.hadoop.tools.DistCp.run(DistCp.java:143)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
        at org.apache.hadoop.tools.DistCp.main(DistCp.java:441)
Invalid arguments: null

使用 AWS CLI 连接到 S3 存储桶工作正常。提前感谢您的帮助!

4

0 回答 0