How can I copy a directory recursively from cluster1 to cluster2 in Hadoop HDFS? The outcome I would like is a directory structure mirrored with data.
Asked
Active
Viewed 995 times
1 Answers
1
Use the built in tool distcp :
bash$ hadoop distcp hdfs://nn1:8020/foo/bar \ hdfs://nn2:8020/bar/foo
See the documentation here : Distcp tool

Mohamed IMLI
- 38
- 1
- 8
-
1No, it will do the the copy of the directories as well as files récursively see this question : https://stackoverflow.com/questions/31862904/how-to-copy-data-from-one-hdfs-to-another-hdfs – Mohamed IMLI Nov 03 '19 at 03:49