首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >集群间数据拷贝

集群间数据拷贝

作者头像
用户4128047
发布于 2025-12-23 16:08:05
发布于 2025-12-23 16:08:05
1890
举报

1.scp 实现两个远程主机之间的文件复制

代码语言:javascript
复制
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/hadoop

//是通过本地主机中转实现两个远程主机的文件复制;如果在两个远程主机之间 ssh 没有配置的情况下可以使用该方式。 2.采用 distcp 命令实现两个 Hadoop 集群之间的递归数据复制

代码语言:javascript
复制
[hadoop@hadoop102 hadoop-2.7.2]$ bin/hadoop distcp
hdfs://haoop102:9000/user/atguigu/hello.txt 
hdfs://hadoop103:9000/user/atguigu/hello.txt
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2025-12-23,如有侵权请联系 cloudcommunity@tencent.com 删除
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档