欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

hdfs使用手冊balancer(數(shù)據(jù)平衡)命令詳解-創(chuàng)新互聯(lián)

2019/1/21 星期一

成都創(chuàng)新互聯(lián)致力于互聯(lián)網(wǎng)品牌建設(shè)與網(wǎng)絡(luò)營銷,包括成都做網(wǎng)站、成都網(wǎng)站設(shè)計、SEO優(yōu)化、網(wǎng)絡(luò)推廣、整站優(yōu)化營銷策劃推廣、電子商務(wù)、移動互聯(lián)網(wǎng)營銷等。成都創(chuàng)新互聯(lián)為不同類型的客戶提供良好的互聯(lián)網(wǎng)應(yīng)用定制及解決方案,成都創(chuàng)新互聯(lián)核心團隊10余年專注互聯(lián)網(wǎng)開發(fā),積累了豐富的網(wǎng)站經(jīng)驗,為廣大企業(yè)客戶提供一站式企業(yè)網(wǎng)站建設(shè)服務(wù),在網(wǎng)站建設(shè)行業(yè)內(nèi)樹立了良好口碑。

2.3.1. balancer
運行一個集群平衡工具。管理員可以通過按Ctrl+C鍵停止再平衡過程。
數(shù)據(jù)平衡的需求
HDFS數(shù)據(jù)不平衡的原因
1.某個DataNode機器內(nèi)硬盤存儲達到飽和值。
2.集群內(nèi)新增、刪除節(jié)點。
數(shù)據(jù)不平衡的影響
1.Map任務(wù)可能會被分配給沒有存儲數(shù)據(jù)的機器,結(jié)果是不能實現(xiàn)本地計算,最終會導(dǎo)致網(wǎng)絡(luò)
帶寬的消耗。
2.當一些數(shù)據(jù)節(jié)點數(shù)據(jù)完全滿載時,新的數(shù)據(jù)塊只會被存放在有空余數(shù)據(jù)的節(jié)點機器上,造成了并行讀取的可能性。
數(shù)據(jù)平衡過程的要求
1.數(shù)據(jù)平衡不會導(dǎo)致數(shù)據(jù)塊減少、數(shù)據(jù)塊備份丟失。
2.管理員可以中止數(shù)據(jù)平衡進程。
3.每次數(shù)據(jù)塊移動的大小應(yīng)該是可控的,這樣可以放置阻塞網(wǎng)絡(luò)。
4.namenode不會因為數(shù)據(jù)平衡服務(wù)而導(dǎo)致過于繁忙。
數(shù)據(jù)自動平衡原理
由于使用了平衡算法,導(dǎo)致數(shù)據(jù)平衡是一個迭代的、周而復(fù)始的過程。每一次迭代的最終目的
是讓高負載的機器能夠降低數(shù)據(jù)負載,所以數(shù)據(jù)平衡會大程度上地使用網(wǎng)絡(luò)帶寬。

數(shù)據(jù)平衡流程交互圖
hdfs使用手冊balancer(數(shù)據(jù)平衡)命令詳解

步驟分析如下:

1、數(shù)據(jù)均衡服務(wù)(Rebalancing Server)首先要求 NameNode 生成 DataNode 數(shù)據(jù)分布分析報告,獲取每個DataNode磁盤使用情況
2、Rebalancing Server匯總需要移動的數(shù)據(jù)分布情況,計算具體數(shù)據(jù)塊遷移路線圖。數(shù)據(jù)塊遷移路線圖,確保網(wǎng)絡(luò)內(nèi)最短路徑
3、開始數(shù)據(jù)塊遷移任務(wù),Proxy Source Data Node復(fù)制一塊需要移動數(shù)據(jù)塊
4、將復(fù)制的數(shù)據(jù)塊復(fù)制到目標DataNode上
5、刪除原始數(shù)據(jù)塊
6、目標DataNode向Proxy Source Data Node確認該數(shù)據(jù)塊遷移完成
7、Proxy Source Data Node向Rebalancing Server確認本次數(shù)據(jù)塊遷移完成。然后繼續(xù)執(zhí)行這個過程,直至集群達到數(shù)據(jù)均衡標準

實際操作
1.切換到hdfs用戶

[root@hadoop-master ~]# su - hdfs
2.查看當前的數(shù)據(jù)分布情況
[hdfs@hadoop-master ~]$ hdfs dfsadmin -report > /tmp/bq
[hdfs@hadoop-master ~]$ cat /tmp/bq 
Configured Capacity: 273287419086 (254.52 GB)
Present Capacity: 209643254756 (195.25 GB)
DFS Remaining: 199579415524 (185.87 GB)
DFS Used: 10063839232 (9.37 GB)
DFS Used%: 4.80%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0

配置容量:273287419086(254.52 GB)
現(xiàn)有容量:209643254756(195.25 GB)
DFS剩余:199579415524(185.87 GB)
使用的DFS:10063839232(9.37 GB)
使用DFS%:4.80%
在復(fù)制塊下:0
具有損壞副本的塊:0
缺少塊:0
缺少塊(復(fù)制因子1):0
-------------------------------------------------
Live datanodes (3):  實時數(shù)據(jù)節(jié)點(3):

Name: 192.168.0.117:50010 (hadoop-node01)
Hostname: hadoop-node01
Rack: /default
Decommission Status : Normal
Configured Capacity: 91095806362 (84.84 GB)
DFS Used: 3354603520 (3.12 GB)
Non DFS Used: 12246245786 (11.41 GB)
DFS Remaining: 69809631564 (65.02 GB)
DFS Used%: 3.68%
DFS Remaining%: 76.63%
Configured Cache Capacity: 4294967296 (4 GB)
Cache Used: 0 (0 B)
Cache Remaining: 4294967296 (4 GB)
Cache Used%: 0.00%
Cache Remaining%: 100.00%
Xceivers: 10
Last contact: Mon Jan 21 10:45:24 CST 2019

名稱:192.168.0.117:50010(hadoop-node01)
主機名:hadoop-node01
機架:/默認
退役狀態(tài):正常
配置容量:91095806362(84.84 GB)
使用的DFS:3354603520(3.12 GB)
非DFS使用:12246245786(11.41 GB)
剩余DFS:69809631564(65.02 GB)
使用DFS%:3.68%
DFS剩余%:76.63%
配置的緩存容量:4294967296(4 GB)
使用的緩存:0(0 B)
剩余高速緩存:4294967296(4 GB)
使用的緩存%:0.00%
剩余高速緩存%:100.00%
Xceivers:10
最后聯(lián)系人:Mon Jan 21 10:45:24 CST 2019

Name: 192.168.0.118:50010 (hadoop-master)
Hostname: hadoop-master
Rack: /default
Decommission Status : Normal
Configured Capacity: 91095806362 (84.84 GB)
DFS Used: 3354632192 (3.12 GB)
Non DFS Used: 29517959578 (27.49 GB)
DFS Remaining: 52537889100 (48.93 GB)
DFS Used%: 3.68%
DFS Remaining%: 57.67%
Configured Cache Capacity: 4294967296 (4 GB)
Cache Used: 0 (0 B)
Cache Remaining: 4294967296 (4 GB)
Cache Used%: 0.00%
Cache Remaining%: 100.00%
Xceivers: 10
Last contact: Mon Jan 21 10:45:24 CST 2019

Name: 192.168.0.121:50010 (hadoop-node02)
Hostname: hadoop-node02
Rack: /default
Decommission Status : Normal
Configured Capacity: 91095806362 (84.84 GB)
DFS Used: 3354603520 (3.12 GB)
Non DFS Used: 4823982490 (4.49 GB)
DFS Remaining: 77231894860 (71.93 GB)
DFS Used%: 3.68%
DFS Remaining%: 84.78%
Configured Cache Capacity: 4294967296 (4 GB)
Cache Used: 0 (0 B)
Cache Remaining: 4294967296 (4 GB)
Cache Used%: 0.00%
Cache Remaining%: 100.00%
Xceivers: 10
Last contact: Mon Jan 21 10:45:24 CST 2019

3.使用命令平衡數(shù)據(jù)
[hdfs@hadoop-master ~]$ hdfs balancer
19/01/21 10:49:19 INFO balancer.Balancer: namenodes  = [hdfs://vg-cdh-test]
19/01/21 10:49:19 INFO balancer.Balancer: parameters = Balancer.Parameters [BalancingPolicy.Node, threshold = 10.0, max idle iteration = 5, number of nodes to be excluded = 0, number of nodes to be included = 0, run during upgrade = false]
Time Stamp               Iteration#  Bytes Already Moved  Bytes Left To Move  Bytes Being Moved
19/01/21 10:49:21 INFO net.NetworkTopology: Adding a new node: /default/192.168.0.117:50010
19/01/21 10:49:21 INFO net.NetworkTopology: Adding a new node: /default/192.168.0.118:50010
19/01/21 10:49:21 INFO net.NetworkTopology: Adding a new node: /default/192.168.0.121:50010
19/01/21 10:49:21 INFO balancer.Balancer: 0 over-utilized: []
19/01/21 10:49:21 INFO balancer.Balancer: 0 underutilized: []
The cluster is balanced. Exiting...
2019-1-21 10:49:21                0                  0 B                 0 B               -1 B
2019-1-21 10:49:21       Balancing took 2.738 seconds
4.查看數(shù)據(jù)平衡后的數(shù)據(jù)分布情況
[hdfs@hadoop-master ~]$ hdfs dfsadmin -report > /tmp/bh
[hdfs@hadoop-master ~]$ cat /tmp/bh
Configured Capacity: 273287419086 (254.52 GB)
Present Capacity: 209660106924 (195.26 GB)
DFS Remaining: 199596266468 (185.89 GB)
DFS Used: 10063840456 (9.37 GB)
DFS Used%: 4.80%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0

-------------------------------------------------
Live datanodes (3):

Name: 192.168.0.117:50010 (hadoop-node01)
Hostname: hadoop-node01
Rack: /default
Decommission Status : Normal
Configured Capacity: 91095806362 (84.84 GB)
DFS Used: 3354603928 (3.12 GB)
Non DFS Used: 12246663170 (11.41 GB)
DFS Remaining: 69809213772 (65.01 GB)
DFS Used%: 3.68%
DFS Remaining%: 76.63%
Configured Cache Capacity: 4294967296 (4 GB)
Cache Used: 0 (0 B)
Cache Remaining: 4294967296 (4 GB)
Cache Used%: 0.00%
Cache Remaining%: 100.00%
Xceivers: 10
Last contact: Mon Jan 21 10:50:10 CST 2019

Name: 192.168.0.118:50010 (hadoop-master)
Hostname: hadoop-master
Rack: /default
Decommission Status : Normal
Configured Capacity: 91095806362 (84.84 GB)
DFS Used: 3354632600 (3.12 GB)
Non DFS Used: 29501419522 (27.48 GB)
DFS Remaining: 52554428748 (48.95 GB)
DFS Used%: 3.68%
DFS Remaining%: 57.69%
Configured Cache Capacity: 4294967296 (4 GB)
Cache Used: 0 (0 B)
Cache Remaining: 4294967296 (4 GB)
Cache Used%: 0.00%
Cache Remaining%: 100.00%
Xceivers: 10
Last contact: Mon Jan 21 10:50:10 CST 2019

Name: 192.168.0.121:50010 (hadoop-node02)
Hostname: hadoop-node02
Rack: /default
Decommission Status : Normal
Configured Capacity: 91095806362 (84.84 GB)
DFS Used: 3354603928 (3.12 GB)
Non DFS Used: 4823252994 (4.49 GB)
DFS Remaining: 77232623948 (71.93 GB)
DFS Used%: 3.68%
DFS Remaining%: 84.78%
Configured Cache Capacity: 4294967296 (4 GB)
Cache Used: 0 (0 B)
Cache Remaining: 4294967296 (4 GB)
Cache Used%: 0.00%
Cache Remaining%: 100.00%
Xceivers: 10
Last contact: Mon Jan 21 10:50:10 CST 2019
————————————————————————————————————————————————————————————————————————————————
5.對比數(shù)據(jù)平衡前后的報告信息
[hdfs@hadoop-master ~]$ diff /tmp/bq /tmp/bh
2,4c2,4
< Present Capacity: 209643254756 (195.25 GB)
< DFS Remaining: 199579415524 (185.87 GB)
< DFS Used: 10063839232 (9.37 GB)
---
> Present Capacity: 209660106924 (195.26 GB)
> DFS Remaining: 199596266468 (185.89 GB)
> DFS Used: 10063840456 (9.37 GB)
19,21c19,21
< DFS Used: 3354603520 (3.12 GB)
< Non DFS Used: 12246245786 (11.41 GB)
< DFS Remaining: 69809631564 (65.02 GB)
---
> DFS Used: 3354603928 (3.12 GB)
> Non DFS Used: 12246663170 (11.41 GB)
> DFS Remaining: 69809213772 (65.01 GB)
30c30
< Last contact: Mon Jan 21 10:45:24 CST 2019
---
> Last contact: Mon Jan 21 10:50:10 CST 2019
38,40c38,40
< DFS Used: 3354632192 (3.12 GB)
< Non DFS Used: 29517959578 (27.49 GB)
< DFS Remaining: 52537889100 (48.93 GB)
---
> DFS Used: 3354632600 (3.12 GB)
> Non DFS Used: 29501419522 (27.48 GB)
> DFS Remaining: 52554428748 (48.95 GB)
42c42
< DFS Remaining%: 57.67%
---
> DFS Remaining%: 57.69%
49c49
< Last contact: Mon Jan 21 10:45:24 CST 2019
---
> Last contact: Mon Jan 21 10:50:10 CST 2019
57,59c57,59
< DFS Used: 3354603520 (3.12 GB)
< Non DFS Used: 4823982490 (4.49 GB)
< DFS Remaining: 77231894860 (71.93 GB)
---
> DFS Used: 3354603928 (3.12 GB)
> Non DFS Used: 4823252994 (4.49 GB)
> DFS Remaining: 77232623948 (71.93 GB)
68c68
< Last contact: Mon Jan 21 10:45:24 CST 2019
---
> Last contact: Mon Jan 21 10:50:10 CST 2019
在生產(chǎn)上實際的操作如下:
hdfs dfsadmin -fs hdfs://uhadoop-mzwc2w-master2:8020 -setBalancerBandwidth 3145728000
[hadoop@uhadoop-mzwc2w-master1 ~]$ hdfs dfsadmin -fs hdfs://uhadoop-mzwc2w-master2:8020 -setBalancerBandwidth 3145728000
Balancer bandwidth is set to 3145728000
[hadoop@uhadoop-mzwc2w-master1 ~]$ hdfs dfsadmin -fs hdfs://uhadoop-mzwc2w-master1:8020 -setBalancerBandwidth 3145728000
Balancer bandwidth is set to 3145728000
//一定要2個節(jié)點namenode節(jié)點 master1 master2 都要執(zhí)行 

在生產(chǎn)上2019/7/22 星期一 我在master1 和master2 都執(zhí)行balancer 
[hadoop@uhadoop-mzwc2w-master1 majihui0718]$ nohup hdfs balancer > balancer.log & //生產(chǎn)上這樣處理
[hadoop@uhadoop-mzwc2w-master2 majihui0722]$ pwd
/home/hadoop/majihui0722
[hadoop@uhadoop-mzwc2w-master2 majihui0722]$ ll
total 596
-rw-r--r-- 1 hadoop wheel 609794 Jul 22 14:11 balancer.log

我們是1000M的網(wǎng),給300M的帶寬用于datanode的數(shù)據(jù)balance

參考鏈接
https://www.cnblogs.com/qingyunzong/p/8535995.html
參考鏈接
HDFS balance策略詳解 https://www.jianshu.com/p/f7c1cd476601

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。

網(wǎng)頁名稱:hdfs使用手冊balancer(數(shù)據(jù)平衡)命令詳解-創(chuàng)新互聯(lián)
本文來源:http://aaarwkj.com/article30/iecpo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計、響應(yīng)式網(wǎng)站、全網(wǎng)營銷推廣網(wǎng)站導(dǎo)航、小程序開發(fā)、網(wǎng)站排名

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)公司
刘亦菲毛片一区二区三区| 91香蕉国产在线观看| 成人性生活视频免费中文版| 亚洲日本熟妇在线视频| av黄色天堂在线观看| 激情四射五月天亚洲婷婷| 亚洲欧美激情啪啪啪| 中文字幕日韩欧美一区在线| 懂色一区二区三区精品视频| 精品成人18亚洲av播放| 国产熟女肥臀精品国产馆乱| 在线观看高清欧美国产视频| 午夜剧场福利在线观看| 密臀av一区二区三区| 岛国大片一区二区三区| 91亚洲精品国产一区| 日韩免费毛片在线观看| 亚洲一区二区日韩人妻| 欧美日韩一区二区三区四区高清| 日本 影院 一区 二区| 超碰97免费在线观看| 亚洲欧美日韩精品区| 欧美精品激情在线不卡| 久久91超碰青草在哪里看| 一区二区日韩视频九一蜜桃| 日本一区二区免费视频| 日本精品视频免费网| 91日韩国产中文字幕| 人妻的秘密一区二区三区 | 婷婷人妻中文字幕在线| av中文字幕熟妇人妻少妇| 成人性生交大片免费看多人| 伊在人天堂亚洲香蕉精品区| 欧美国产精品一区二区免费| 四虎影院成人精品久久| 免费在线一区二区av| 三欲一区二区三区中文字幕| 亚洲精品一区二区三区中文字幕| 男女午夜激情四射视频| 亚洲欧洲av男人的天堂| 激情小说婷婷亚洲综合|