YARN Apache Hadoop 的下一代MapReduce

來源:互聯網
上載者:User

標籤:hadoop   yarn   

之前自己做的hadoop項目是基於0.20.2版本的,查了一下資料,知道了自己以前學的是原map/reduce模型。

官方說明:
    1.1.X - current stable version, 1.1 release
    1.2.X - current beta version, 1.2 release
    2.X.X - current alpha version
    0.23.X - simmilar to 2.X.X but missing NN HA.
    0.22.X - does not include security
    0.20.203.X - old legacy stable version
    0.20.X - old legacy version
說明:
0.20/0.22/1.1/CDH3 系列,原map/reduce模型,穩定版
0.23/2.X/CDH4系列,Yarn模型,新版

再一次開啟hadoop官網,準備嘗試翻譯一下介紹YARN這個章節的內容,學習知識的同時提高外語能力。


 YARN  Apache Hadoop 的下一代MapReduce

 

在hadoop-0.23版本中, MapReduce已經做了一次全面的修改,這也正是我們現在所說的 MapReduce 2.0 (MRv2) 或者是 YARN.

MRv2的基本思想是將JobTracker的兩個主要的功能,一個是資源管理,一個是作業的調度和監控,分成各自獨立的後台進程。這個思想說的是擁有一個全域的資源管理員( ResourceManager (RM)),還有一個是每個應用程式都擁有的應用主控器(ApplicationMaster (AM))。一個應用程式可以是一個傳統的Map-Reduce作業集合中一個單獨的作業或者也可以是一個有向非循環圖的作業集合。

資源管理員(ResourceManager),每個節點的從屬模組(per-node slave)和節點管理器( NodeManager (NM))形成了這個資料計算架構。資源管理員在整個系統中的所有應用程式中對資源具有最高的決定控制權。

每一個應用程式的應用主控器(ApplicationMaster)實際上是一個架構特定的類庫,負責處理來自於資源管理員的資源並且協同節點管理器(NodeManager)去執行和監控作業。




資源管理員有兩個主要的組件: 調度器(Scheduler), 應用集合管理器(ApplicationsManager)

調度器負責把資源分派給各種正在啟動並執行應用程式,這些應用程式服從著容量,隊列等相似的約束。調度器執行過程中不會監控和追蹤應用程式的狀態,從這一點上來看,它僅僅是一個單純的調度器。同時,它也不保證一定會重啟由於應用錯誤或者是硬體故障引起的失敗的任務。調度器根據應用程式的資源的需求執行它的調度功能。其實它根據的是一個叫做資源容器(Container)的抽象概念,這個容器包含了例如記憶體,cpu,磁碟,網路等元素。在第一個版本中,只支援記憶體。

調度器擁有一個支援可插拔策略的外掛程式程式,它負責分割存在於所有的各種隊列,應用程式等等的叢集資源。當前的Map-Reduce 調度器例如容量調度器(CapacityScheduler)和公平調度器(FairScheduler)是一些外掛程式程式的典型例子。

容量調度器支援分級隊列(hierarchical queues),目的是去允許叢集資源的更多可預測的共用。

應用集合管理器負責接收作業提交,協商確定第一個容器,用於執行應用程式中特定的應用主控器以及為由於某種原因而失敗的應用主控器容器的重啟提供服務。

節點管理器是每一台電腦的架構代理,它負責各種容器,監控他們的資源使用方式(cpu,記憶體,磁碟,網路等),並且把相同的資訊傳遞給資源管理員或者是調度器。

每一個應用程式的應用主控器負責協商確定合適的來自於調度器的資源容器,並且為進程追蹤和監控他們的狀態。

下一代MapReduce MRV2 和之前的穩定版本hadoop-1.x保持良好的API 相容性。這樣一來,就是說所有的Map-Reduce 作業不需要改變,只要重新編譯一下就可以在MRv2上完美運行了。


官網原文,如有翻譯不妥處,請多多指教,謝謝!

Apache Hadoop NextGen MapReduce (YARN)

MapReduce has undergone a complete overhaul in hadoop-0.23 and we now have, what we call, MapReduce 2.0 (MRv2) or YARN.

The fundamental idea of MRv2 is to split up the two major functionalities of the JobTracker, resource management and job scheduling/monitoring, into separate daemons. The idea is to have a global ResourceManager (RM) and per-application ApplicationMaster (AM). An application is either a single job in the classical sense of Map-Reduce jobs or a DAG of jobs.

The ResourceManager and per-node slave, the NodeManager (NM), form the data-computation framework. The ResourceManager is the ultimate authority that arbitrates resources among all the applications in the system.

The per-application ApplicationMaster is, in effect, a framework specific library and is tasked with negotiating resources from the ResourceManager and working with the NodeManager(s) to execute and monitor the tasks.

The ResourceManager has two main components: Scheduler and ApplicationsManager.

The Scheduler is responsible for allocating resources to the various running applications subject to familiar constraints of capacities, queues etc. The Scheduler is pure scheduler in the sense that it performs no monitoring or tracking of status for the application. Also, it offers no guarantees about restarting failed tasks either due to application failure or hardware failures. The Scheduler performs its scheduling function based the resource requirements of the applications; it does so based on the abstract notion of a resource Container which incorporates elements such as memory, cpu, disk, network etc. In the first version, only memory is supported.

The Scheduler has a pluggable policy plug-in, which is responsible for partitioning the cluster resources among the various queues, applications etc. The current Map-Reduce schedulers such as the CapacityScheduler and the FairScheduler would be some examples of the plug-in.

The CapacityScheduler supports hierarchical queues to allow for more predictable sharing of cluster resources

The ApplicationsManager is responsible for accepting job-submissions, negotiating the first container for executing the application specific ApplicationMaster and provides the service for restarting the ApplicationMaster container on failure.

The NodeManager is the per-machine framework agent who is responsible for containers, monitoring their resource usage (cpu, memory, disk, network) and reporting the same to the ResourceManager/Scheduler.

The per-application ApplicationMaster has the responsibility of negotiating appropriate resource containers from the Scheduler, tracking their status and monitoring for progress.

MRV2 maintains API compatibility with previous stable release (hadoop-1.x). This means that all Map-Reduce jobs should still run unchanged on top of MRv2 with just a recompile.



YARN Apache Hadoop 的下一代MapReduce

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.