一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

服務(wù)器之家:專注于服務(wù)器技術(shù)及軟件下載分享
分類導(dǎo)航

PHP教程|ASP.NET教程|Java教程|ASP教程|編程技術(shù)|正則表達(dá)式|C/C++|IOS|C#|Swift|Android|VB|R語(yǔ)言|JavaScript|易語(yǔ)言|vb.net|

服務(wù)器之家 - 編程語(yǔ)言 - Java教程 - Hadoop上Data Locality的詳解

Hadoop上Data Locality的詳解

2021-01-25 11:29csguo007 Java教程

這篇文章主要介紹了 Hadoop上Data Locality的詳解的相關(guān)資料,希望通過(guò)本文能幫助到大家,讓大家理解掌握這部分內(nèi)容,需要的朋友可以參考下

HadoopData Locality的詳解

Hadoop上的Data Locality是指數(shù)據(jù)與Mapper任務(wù)運(yùn)行時(shí)數(shù)據(jù)的距離接近程度(Data Locality in Hadoop refers to the“proximity” of the data with respect to the Mapper tasks working on the data.)

1. why data locality is imporant?

當(dāng)數(shù)據(jù)集存儲(chǔ)在HDFS中時(shí),它被劃分為塊并存儲(chǔ)在Hadoop集群中的DataNode上。當(dāng)在數(shù)據(jù)集執(zhí)行MapReduce作業(yè)時(shí),各個(gè)Mappers將處理這些塊(輸進(jìn)行入分片處理)。如果Mapper不能從它執(zhí)行的節(jié)點(diǎn)上獲取數(shù)據(jù),數(shù)據(jù)需要通過(guò)網(wǎng)絡(luò)從具有這些數(shù)據(jù)的DataNode拷貝到執(zhí)行Mapper任務(wù)的節(jié)點(diǎn)上(the data needs to be copied over the network from the DataNode which has the data to the DataNode which is executing the Mapper task)。假設(shè)一個(gè)MapReduce作業(yè)具有超過(guò)1000個(gè)Mapper,在同一時(shí)間每一個(gè)Mapper都試著去從集群上另一個(gè)DataNode節(jié)點(diǎn)上拷貝數(shù)據(jù),這將導(dǎo)致嚴(yán)重的網(wǎng)絡(luò)阻塞,因?yàn)樗械腗apper都嘗試在同一時(shí)間拷貝數(shù)據(jù)(這不是一種理想的方法)。因此,將計(jì)算任務(wù)移動(dòng)到更接近數(shù)據(jù)的節(jié)點(diǎn)上是一種更有效與廉價(jià)的方法,相比于將數(shù)據(jù)移動(dòng)到更接近計(jì)算任務(wù)的節(jié)點(diǎn)上(it is always effective and cheap to move the computation closer to the data than to move the data closer to the computation)。

2. How is data proximity defined?

當(dāng)JobTracker(MRv1)或ApplicationMaster(MRv2)接收到運(yùn)行作業(yè)的請(qǐng)求時(shí),它查看集群中的哪些節(jié)點(diǎn)有足夠的資源來(lái)執(zhí)行該作業(yè)的Mappers和Reducers。同時(shí)需要根據(jù)Mapper運(yùn)行數(shù)據(jù)所處位置來(lái)考慮決定每個(gè)Mapper執(zhí)行的節(jié)點(diǎn)(serious consideration is made to decide on which nodes the individual Mappers will be executed based on where the data for the Mapper is located)。

Hadoop上Data Locality的詳解

3. Data Local

當(dāng)數(shù)據(jù)所處的節(jié)點(diǎn)與Mapper執(zhí)行的節(jié)點(diǎn)是同一節(jié)點(diǎn),我們稱之為Data Local。在這種情況下,數(shù)據(jù)的接近度更接近計(jì)算( In this case the proximity of the data is closer to the computation.)。JobTracker(MRv1)或ApplicationMaster(MRv2)首選具有Mapper所需要數(shù)據(jù)的節(jié)點(diǎn)來(lái)執(zhí)行Mapper。

4. Rack Local

雖然Data Local是理想的選擇,但由于受限于集群上的資源,并不總是在與數(shù)據(jù)同一節(jié)點(diǎn)上執(zhí)行Mapper(Although Data Local is the ideal choice, it is not always possible to execute the Mapper on the same node as the data due to resource constraints on a busy cluster)。在這種情況下,優(yōu)選地選擇在那些與數(shù)據(jù)節(jié)點(diǎn)在同一機(jī)架上的不同節(jié)點(diǎn)上運(yùn)行Mapper( In such instances it is preferred to run the Mapper on a different node but on the same rack as the node which has the data.)。在這種情況下,數(shù)據(jù)將在節(jié)點(diǎn)之間進(jìn)行移動(dòng),從具有數(shù)據(jù)的節(jié)點(diǎn)移動(dòng)到在同一機(jī)架上執(zhí)行Mapper的節(jié)點(diǎn),這種情況我們稱之為Rack Local。

5. Different Rack

在繁忙的群集中,有時(shí)Rack Local也不可能。在這種情況下,選擇不同機(jī)架上的節(jié)點(diǎn)來(lái)執(zhí)行Mapper,并且將數(shù)據(jù)從具有數(shù)據(jù)的節(jié)點(diǎn)復(fù)制到在不同機(jī)架上執(zhí)行Mapper的節(jié)點(diǎn)。這是最不可取的情況。

如有疑問(wèn)請(qǐng)留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!

原文鏈接:http://blog.csdn.net/zhyooo123/article/details/77868170

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 久久99亚洲热最新地址获取 | 性做久久久久久久 | 亚洲午夜精品久久久久 | 91九色露脸| 日韩无遮挡大尺度啪啪影片 | 国产欧美综合一区二区 | 欧美精品久久久久久久影视 | 无毛黄片 | 福利视频一区青娱 | 黑人巨荃大战乌克兰美女 | 黄a在线观看 | 狠狠色伊人亚洲综合网站色 | 国产好痛疼轻点好爽的视频 | 日韩欧美在线观看综合网另类 | 人人干国产 | 国产精品合集一区二区 | 午夜理论片日本中文在线 | 睡男神的这件小事小说在线阅读 | 精品国产品香蕉在线观看 | 久久不卡免费视频 | 国产不卡视频一区二区在线观看 | 国产精品免费精品自在线观看 | 99re5在线精品视频热线 | 青草香蕉精品视频在线观看 | 精灵之森高清在线 | 日韩网新片免费 | 免费午夜剧场 | 射玉足| 办公室大战秘书呻吟 | 国产真实一区二区三区 | 韩国伦理hd | 久久精品国产视频澳门 | 日本妻子迷妹网 | 久久国产乱子伦免费精品 | 精品无人区麻豆乱码1区2 | 韩国免费特一级毛片 | 小辣椒精品福利视频导航 | yellow高清免费| 污到湿的爽文免费阅读 | 亚洲精品欧洲久久婷婷99 | 久久精品麻豆国产天美传媒果冻 |