Hadoop: data copy between clusters

Data copy between clusters

1) scp implements file copy between two remote hosts

scp -r hello.txt root@hadoop103:/user/atguigu/hello.txt		// 推 push
scp -r root@hadoop103:/user/atguigu/hello.txt  hello.txt		// 拉 pull
scp -r root@hadoop103:/user/atguigu/hello.txt root@hadoop104:/user/atguigu   //是通过本地主机中转实现两个远程主机的文件复制;如果在两个远程主机之间ssh没有配置的情况下可以使用该方式。

2) Use the distcp command to implement recursive data replication between two Hadoop clusters

[atguigu@hadoop102 hadoop-3.1.3]$ bin/hadoop distcp hdfs://hadoop102:8020/user/atguigu/hello.txt hdfs://hadoop105:8020/user/atguigu/hello.txt

Guess you like

Origin blog.csdn.net/weixin_45427648/article/details/131820130