hadoop 集群间数据拷贝

1)scp 实现两个远程主机之间的文件复制
scp -r hello.txt hadoop@node3:~/hello.txt // 推 push

scp -r hadoop@node3:~/hello.txt hello.txt // 拉 pull

scp -r hadoop@node3:~/hello.txt hadoop@node2:~/ //是通过本地主机中转实现两个远程主机的文件复制;如果在两个远程主机之间 ssh 没有配置的情况下可以使用该方式。
2)采用 discp 命令实现两个 hadoop 集群之间的递归数据复制
bin/hadoop distcp hdfs://node1:9000/user/hadoop/hello.txt 

hdfs://node2:9000/user/hadoop/hello.txt

猜你喜欢

转载自blog.csdn.net/qq_36885128/article/details/88075210
今日推荐