首页 > 其他 > 详细

【原创】大叔经验分享(43)hdfs副本数量

时间:2019-03-25 11:50:17      阅读:186      评论:0      收藏:0      [点我收藏+]

当hdfs空间不足时,除了删除临时数据或垃圾数据之外,还可以适当调整部分大目录的副本数量,多管齐下;

1 查看

$ hdfs dfs -ls /user/hive/warehouse/temp.db/test_ext_o
-rwxr-xr-x 3 hadoop supergroup 44324200 2019-02-28 16:36 /user/hive/warehouse/temp.db/test_ext_o/000000_0

权限后边的3即为副本数量

2 修改

$ hadoop fs -setrep [-w] 2 /user/hive/warehouse/temp.db/test_ext_o/000000_0
or
$ hdfs dfs -setrep [-w] 2 /user/hive/warehouse/temp.db/test_ext_o/000000_0
WARNING: the waiting time may be long for DECREASING the number of replications.

修改副本数量为2,启动路径可以指定文件,也可以指定目录;
可以增加-w参数,会一直等待操作完成;

The -w flag requests that the command wait for the replication to complete. This can potentially take a very long time.

【原创】大叔经验分享(43)hdfs副本数量

原文:https://www.cnblogs.com/barneywill/p/10592695.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!