---
title: "Discussion on \"如何在两个hdfs集群之间拷贝数据\" | Hashnode"
description: "Discussion on \"如何在两个hdfs集群之间拷贝数据\". 在不同的两个HDFS集群中拷贝数据，我们可以使用distcp命令，集群之间拷贝数据的正确姿势是：\nhadoop distcp hdfs://master1:9999/foo/bar hdfs://master2:9999/bar/foo\n\n上面的意思是将集群master1上的文件foo/bar拷贝到master2集群上的bar/foo目录下\nhadoop distcp hdfs://master1:9999/foo/a hdfs://master1:9999/foo/b hdfs://maste..."
url: "https://hashnode.com/posts/hdfs/669cb38198275718eb1562d4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [如何在两个hdfs集群之间拷贝数据](https://xiaohan.hashnode.dev/hdfs?utm_source=hashnode&utm_medium=feed)

在不同的两个HDFS集群中拷贝数据，我们可以使用distcp命令，集群之间拷贝数据的正确姿势是： hadoop distcp hdfs://master1:9999/foo/bar hdfs://master2:9999/bar/foo 上面的意思是将集群master1上的文件foo/bar拷贝到master2集群上的bar/foo目录下 hadoop distcp hdfs://master1:9999/foo/a hdfs://master1:9999/foo/b hdfs://maste...

Jul 21, 2024 · 1 min read · xiaohan.hashnode.dev  
Read the article

-   [#hdfs](https://hashnode.com/tag/hdfs)

## Written by

[xiaohan](https://hashnode.com/@xiaohan)

@xiaohan

  
[View profile](https://hashnode.com/@xiaohan)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
