hadoop - HDFS平衡,如何平衡hdfs数据
问题描述
我们有HDP 版本 - 2.6.4。在 datanode 机器上,我们可以看到 hdfs 数据不平衡。在某些磁盘上,我们有不同的大小
sdb 11G
and
sdd 17G
/dev/sdd 20G 3.0G 17G 15% /grid/sdd
/dev/sdb 20G 11G 9.3G 53% /grid/sdb <-- Why disks are not balanced?
在谷歌搜索后,我发现了以下 CLI(来自https://community.hortonworks.com/questions/19694/help-with-exception-from-hdfs-balancer.html)
hdfs balancer -Ddfs.balancer.movedWinWidth=5400000 -Ddfs.balancer.moverThreads=1000 -Ddfs.balancer.dispatcherThreads=200 -Ddfs.datanode.balance.bandwidthPerSec=100000000 -Ddfs.balancer.max-size-to-move=10737418240 -threshold 20 1>/tmp/balancer-out.log 2>/tmp/balancer-debug.log
在我运行它之后,我们得到相同的 hdfs 大小
/dev/sdd 20G 3.0G 17G 15% /grid/sdd
/dev/sdb 20G 11G 9.3G 53% /grid/sdb
more /tmp/balancer-out.log Time Stamp Iteration# Bytes Already Moved Bytes Left To Move Bytes Being Moved The cluster is balanced. Exiting... Mar 7, 2019 5:02:34 PM 0 0 B 0 B 0 B Mar 7, 2019 5:02:34 PM Balancing took 1.453 seconds
所以实际上我们看不到 hdfs 中磁盘平衡的任何差异。
如何平衡 hdfs 数据,使所有磁盘使用相同的大小?
解决方案
我不是这方面的专家,我才刚刚开始研究它。我怀疑您应该使用hdfs diskbalancer,而不是平衡器。
推荐阅读
- c - C问题:程序自行终止
- javascript - 我需要从函数外部访问 JSON 数据
- javascript - 带有参数的 vue-router 无法在 netlify 上运行部署
- html - 如何包含带有 html5 视频标签的 .ass 字幕文件
- jupyter-notebook - 无法在浏览器中启动 Jupyter 实验室或 Jupyter 笔记本
- apache-spark - Livy REST Spark java.io.FileNotFoundException:
- scroll - 在 Flutter 中为对角滚动的背景图案设置动画
- typescript - ParentType 不可分配给类型 T(扩展 ParentType)
- sql - 找到和室友一样的薪水
- angular - NGRX:状态更改后视图不更新