从 S3 到 HDFS 的 Distcp

发布于 2025-01-14 15:35:13 字数 758 浏览 2 评论 0原文

我正在尝试使用 distcp 工具将数据从 S3 复制到 HDFS。问题是,S3 集群使用 VPC 端点,我不知道如何正确配置 distcp。我已经尝试了几种配置,但没有一个起作用。目前我使用以下命令:

hadoop distcp 
-Dfs.s3a.access.key=[KEY]
-Dfs.s3a.secret.key=[SECRET]
-Dfs.s3a.region=eu-west-1 
-Dfs.s3a.bucket.[BUCKET NAME].endpoint=https://bucket.vpce-[vpce id].s3.eu-west-1.vpce.amazonaws.com
s3a://[BUCKET NAME]/[FILE] 
hdfs://[DESTINATION]/[FILE]

但我收到此错误:

22/03/16 09:14:39 ERROR tools.DistCp: Exception encountered org.apache.hadoop.fs.s3a.AWSBadRequestException: doesBucketExistV2 on [BUCKET NAME]: com.amazonaws.services.s3.model.AmazonS3Exception: The authorization header is malformed; the region 'vpce' is wrong; expecting 'eu-west-1'

任何想法如何使用 VPC 端点配置 Distcp?

提前致谢

Im trying to copy data from S3 to HDFS using distcp tool. Problem with that is, that S3 cluster uses VPC endpoint and I dont know how to properly configure distcp. I have trtied several configurations but none has worked. Currently Im using following command:

hadoop distcp 
-Dfs.s3a.access.key=[KEY]
-Dfs.s3a.secret.key=[SECRET]
-Dfs.s3a.region=eu-west-1 
-Dfs.s3a.bucket.[BUCKET NAME].endpoint=https://bucket.vpce-[vpce id].s3.eu-west-1.vpce.amazonaws.com
s3a://[BUCKET NAME]/[FILE] 
hdfs://[DESTINATION]/[FILE]

But im getint this error:

22/03/16 09:14:39 ERROR tools.DistCp: Exception encountered org.apache.hadoop.fs.s3a.AWSBadRequestException: doesBucketExistV2 on [BUCKET NAME]: com.amazonaws.services.s3.model.AmazonS3Exception: The authorization header is malformed; the region 'vpce' is wrong; expecting 'eu-west-1'

Any ideas how Distcp should be configured with VPC endpoints?

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陌伤ぢ 2025-01-21 15:35:13
  1. 为此,您需要 hadoop 3.3.1,然后它应该可以工作。理想情况下使用 3.3.2,现在可以
  2. 获取 cloudstore jar 并使用其 storediag< /code> 在接近 distcp 之前调试此命令。
  1. you need hadoop 3.3.1 for this, then it should work. ideally use 3.3.2, which is now out
  2. grab the cloudstore jar and use its storediag command to debug this before going near distcp.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文