集群间数据拷贝
scp实现两个远程主机之间的文件复制
scp -r hello.txt root@hadoop103:/hello.txt // 推 push
scp -r root@hadoop103:/hello.txt hello.txt // 拉 pull
scp -r root@hadoop103:/hello.txt root@hadoop104:/ //是通过本地主机中转实现两个远程主机的文件复制;如果在两个远程主机之间ssh没有配置的情况下可以使用该方式。
采用discp命令实现两个hadoop集群之间的递归数据复制
bin/hadoop distcp hdfs://haoop102:9000/hello.txt hdfs://hadoop103:9000/hello.txt