Hadoop 2.0 Yarn code: ResourcesManager code _ start of services in various modules of RM

Source: Internet
Author: User

1. Overview

The following describes how NodeManager starts and registers various services.

Mainly involved Java files

Package org. apache. hadoop. yarn. server. resourcemanager under hadoop-yarn-server-resourcemanager:

ResourcesManager. java

 

2. Code Analysis

When Hadoop is started. The main of ResourcesManager is executed.

 

1). main Function

  • Perform initialization, such as reading configuration information, and then create ResourcesManager
  • Run the init () function of ResourcesManager.
  • Execute the start () function of ResourcesManager.

 

2). init Function

  • Set configuration parameters
  • Create objects such as AsyncDispatcher, ContainerAllocationExpirer, ResourceTrackerService, ApplicationMasterService, ApplicationMasterLauncher, kerberoscheduler (which can be changed by default), and ClientRMService, and set these objects (or services) added to the ArrayList <Service> Object serviceList (different from NodeManager). This process is similar to the init () Execution Process in NodeManager.
  • Register all SchedulerEventDispatcher, RMAppManager, ApplicationEventDispatcher, and their corresponding EventsType to AsyncDispatcher.

 

3). start () function

  • Reads configuration information and performs security operation authentication.
  • Call the start () function of the parent class to start all services in serviceList.

 

 

Some started services are provided.

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.