hadoop集群balance工具詳解

2021-12-30 12:58:08 字數 930 閱讀 5828

hadoop集群balance工具詳解,**上的hadoop集群執行過程中,hadoop 的balance工具通常用於平衡hadoop集群中各datanode中的檔案塊分布,以避免出現部分datanode磁碟佔用率高的問題和部分datanode占用cpu使用率較高。

1) hadoop balance引數的用法:

start:

bin/start-balancer.sh [-threshold ]bin/ start-balancer.sh

start the balancer with a default threshold of 10%bin/ start-balancer.sh -threshold 5

start the balancer with a threshold of 5%stop:

bin/ stop-balancer.sh2)影響hadoop balance工具的幾個引數:

-threshold 預設設定:10,引數取值範圍:0-100,引數含義:判斷集群是否平衡的目標引數,每乙個 datanode 儲存使用率和集群總儲存使用率的差值都應該小於這個閥值 ,理論上,該引數設定的越小,整個集群就越平衡,但是**上環境中,hadoop集群在進行balance時,還在併發的進行資料的寫入和刪除,所以有可能無法到達設定的平衡引數值。

dfs.balance.bandwidthpersec 預設設定:1048576(1 m/s),引數含義:設定balance工具在執行中所能占用的頻寬,設定的過大可能會造成mapred執行緩慢

3)hadoop balance工具其他特點:

balance工具在執行過程中,迭代的將檔案塊從高使用率的datanode移動到低使用率的datanode上,每乙個迭代過程中移動的資料量不超過下面兩個值的較小者:10g或者指定閥值*容量,且每次迭代不超過20分鐘。每次迭代結束後,balance工具將更新該datanode的檔案塊分布情況。

Hadoop(二)Hadoop集群搭建

準備好三颱centos系統,配置如下 主機名centos1 centos2 centos3 ipcentos1的ip centos2的ip centos3的ip centos7修改主機名命令 hostnamectl set hostname 配置三個centos的ip對映,修改 etc hosts,...

Hadoop集群配置

hadoop的配置檔案分為兩類 1.唯讀型別的預設檔案 src core core default.xml src hdfs hfds default.xml src mapred mapred default.xml conf mapred queues.xml 2.定位設定 conf core ...

操作Hadoop集群

操作hadoop集群 所有必要的配置完成後,將檔案分發到所有機器上的hadoop conf dir目錄。這應該是所有機器上相同的目錄。一般來說,建議hdfs和yarn作為單獨的使用者執行。在大多數安裝中,hdfs程序作為 hdfs 執行。yarn通常使用 紗線 帳戶。hadoop啟動 要啟動hado...