본문 바로가기

Hadoop Ecosystem

Data Locality, The heart of MapReduce

The heart of MapReduce is "Data Locality"


맵리듀스는 계산 노드에 데이터를 함께 배치한다. 따라서 데이터가 로컬에 있기 때문에 데이터 액세스가 빠를 수 밖에 없다. 이 특성은 맵리듀스의 핵심이고 좋은 성능을 낼 수 있는 이유이다. 네트워크 대역폭이 데이터 센터 환경에서 가장 중요한 자원이다. 네트워크 부하를 최소화할 수 있는 것이다. 계산하는 노드에서 필요한 데이터를 네트워크를 통해서 가져와야 하는 부담을 줄인 것이다. 


맵리듀스 구현은 네트워크 대역폭을 보존하기 위해 네트워크위상 [topology : 장소, 공간 배치에 관한 학문 또는 정보]을 명시적으로 모델링한다. 


맵리듀스는 구현 과정에서 실패한 맵 또는 리듀스 태스크를 검출하여 'machines that are healthy' 로 실패한 태스크를 재스케쥴링하기 때문에 프로그래머가 장애 처리에 대해 고민할 필요가 없다. 이는 맵리듀스가 태스크간에 상호 의존성이 없는 'shared nothing architecture'j 이기 때문에 가능한 것이다 .




MapReduce tries to colocate the data with the compute node, so data access is fast since it is local.

 This feature, known as data locality, is at the heart of MapReduce and is the reason for its good performance. Recognizing that network bandwidth is the most precious resource in a data center environment (it is easy to saturate network links by copying data around), MapReduce implementations go to great lengths to preserve it by explicitly modelling network topology.