Home Database Mysql Tutorial CDH中的JobTracker HA方案介绍

CDH中的JobTracker HA方案介绍

Jun 07, 2016 pm 04:29 PM
introduce author plan

作者: Dong | 新浪微博: 西成懂 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明 网址:http://dongxicheng.org/mapreduce/cdh4-jobtracker-ha/ 大家都知道,Hadoop JobTracker存在单点故障,且一直没有完善的开源解决方案。在Hadoop中

大家都知道,Hadoop JobTracker存在单点故障,且一直没有完善的开源解决方案。在Hadoop中,由于JobTracker出现的故障的概率远远小于NameNode,因此JobTracker HA通常不用来解决JobTracker容错,而是JobTracker在线升级问题。

Cloudera在最近推出的4.2.0版本中,提供了一套比较完善的JobTracker HA解决方案。本文将介绍这一方案。

在正式介绍CDH解决方案之前,先简要介绍JobTracker HA的基本工作流程,可概括为以下几步:

(1) Active JobTracker通过日志记录作业运行信息;

(2) 发现Active JobTracker故障,切换到某一个Stanby JobTracker上;

(3) Stanby JobTracker通过日志恢复作业运行时信息;

(4) ?以上切换过程对JobTracker的客户端(JobClient,TaskTracker和Web HTTP)透明。

对于当前几乎所有Hadoop版本,(1)和(3)已经解决,而(2)(4)则尚未解决。

Cloudera的JobTracker HA解决方案如下图所示,主要由以下几个模块组成:

(1)??? JobTrackerHADaemon

运行在JobTracker端,用于控制JobTracker的启动与停止。

(2)??? JobTrackerHAServiceProtocol

运行在JobTracker端,实际上是一个RPC Server,接收并处理来自MRHAAdmin(管理员)的JobTracker处理请求,比如将JobTracker转为Active状态或者Standy状态等。

(3)??? MRHAAdmin

为管理员提供的工具包,管理员可通过其中的一些函数控制各个JobTracker的状态。

(4)??? JobTrackerProxies

对原有RPC客户端的再次封装,使各个客户端在Active JobTracker出现故障时能够透明地将RPC请求发送至新的Active JobTracker上。

(5)??? JobTrackerHAHttpRedirector

对来自Web端的HTTP请求进行重定向。当Active JobTracker出现故障时,将所有来自Active JobTracker的访问请求重新定向到新的Active JobTracker上。

当管理员想要对JobTracker进行升级切换时,只需采用一些命令先将当前Active JobTracker置为Stanby,将另外某个Stanby JobTracker置为Active,接着Hadoop内部逻辑如下:

以上只是介绍了人工触发切换模式下的JobTracker HA架构,接下来给出使用Zookeeper进行自动切换的JobTracker HA架构图:

整个架构几乎没有改变,只是由Zookeeper发现Active JobTracker出现故障后,通过一定的选举算法选出一个新的Active JobTraker,并启动该JobTracker。

CDH的JobTracker HA解决方案有一个明显不足是作业恢复粒度过大。我们知道,JobTracker HA有三个级别的作业恢复粒度,分别是:1)作业(JobTracker重启后自动重新提交之前正在运行的作业,但是所有任务,包括重启前已经运行完成的、正在运行的和尚未运行的任务,必须重新运行)、运行完成的任务(JobTracker重启后恢复各个作业已经运行完成的任务,但是之前正在运行和尚未运行的任务需要重新调度执行)和所有任务(JobTracker重启后恢复所有作业之前一模一样的状态,即所有运行完成的和正在运行的任务均保持之前状态,只需重新调度尚未运行的任务),这三个级别实现难度依次增高,但收益依次增大。对于CDH 4.2.0而言,它仅实现了作业级别的恢复粒度,属于一种最简单且收益最小的实现方式。

参考资料:

(1) CDH JobTracker HA介绍和安装方案:

https://ccp.cloudera.com/display/CDH4DOC/Configuring+High+Availability+for+the+JobTracker+(MRv1)

(2) CDH 4.2.0源代码下载:http://archive.cloudera.com/cdh4/cdh/4/

注意,CDH 4发行版中同时带有MRv1和MRv2(YARN),而只有MRv1中有JobTracker HA实现,但它依赖的库的源代码在MRv2中(MRv1中仅有jar包)。

(3) CDH 4.2.0 MRv2(YARN)源代码下载:

http://archive.cloudera.com/cdh4/cdh/4/hadoop-2.0.0-cdh4.2.0.tar.gz

(4) CDH 4.2.0 MRv1源代码下载:

http://archive.cloudera.com/cdh4/cdh/4/mr1-2.0.0-mr1-cdh4.2.0.tar.gz

原创文章,转载请注明: 转载自董的博客

本文链接地址: http://dongxicheng.org/mapreduce/cdh4-jobtracker-ha/

作者:Dong,作者介绍:http://dongxicheng.org/about/


Copyright © 2013
This feed is for personal, non-commercial use only.
The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:
)
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Detailed introduction to what wapi is Detailed introduction to what wapi is Jan 07, 2024 pm 09:14 PM

Users may have seen the term wapi when using the Internet, but for some people they definitely don’t know what wapi is. The following is a detailed introduction to help those who don’t know to understand. What is wapi: Answer: wapi is the infrastructure for wireless LAN authentication and confidentiality. This is like functions such as infrared and Bluetooth, which are generally covered near places such as office buildings. Basically they are owned by a small department, so the scope of this function is only a few kilometers. Related introduction to wapi: 1. Wapi is a transmission protocol in wireless LAN. 2. This technology can avoid the problems of narrow-band communication and enable better communication. 3. Only one code is needed to transmit the signal

Detailed explanation of whether win11 can run PUBG game Detailed explanation of whether win11 can run PUBG game Jan 06, 2024 pm 07:17 PM

Pubg, also known as PlayerUnknown's Battlegrounds, is a very classic shooting battle royale game that has attracted a lot of players since its popularity in 2016. After the recent launch of win11 system, many players want to play it on win11. Let's follow the editor to see if win11 can play pubg. Can win11 play pubg? Answer: Win11 can play pubg. 1. At the beginning of win11, because win11 needed to enable tpm, many players were banned from pubg. 2. However, based on player feedback, Blue Hole has solved this problem, and now you can play pubg normally in win11. 3. If you meet a pub

Towards Verifiable AI: Five Challenges of Formal Methods Towards Verifiable AI: Five Challenges of Formal Methods Apr 09, 2023 pm 02:01 PM

Artificial intelligence is a computing system that attempts to imitate human intelligence, including some human functions that are intuitively related to intelligence, such as learning, problem solving, and rational thinking and action. Broadly interpreted, the term AI covers many closely related fields such as machine learning. Systems that make heavy use of AI are having significant social impacts in areas such as healthcare, transportation, finance, social networks, e-commerce, and education. This growing social impact has also brought with it a series of risks and concerns, including errors in artificial intelligence software, cyberattacks and artificial intelligence system security. Therefore, the issue of verification of AI systems, and the broader topic of trustworthy AI, has begun to attract attention from the research community. “Verifiable AI” has been confirmed

Introduction to Python functions: Introduction and examples of exec function Introduction to Python functions: Introduction and examples of exec function Nov 03, 2023 pm 02:09 PM

Introduction to Python functions: Introduction and examples of exec function Introduction: In Python, exec is a built-in function that is used to execute Python code stored in a string or file. The exec function provides a way to dynamically execute code, allowing the program to generate, modify, and execute code as needed during runtime. This article will introduce how to use the exec function and give some practical code examples. How to use the exec function: The basic syntax of the exec function is as follows: exec

Detailed introduction to whether i5 processor can install win11 Detailed introduction to whether i5 processor can install win11 Dec 27, 2023 pm 05:03 PM

i5 is a series of processors owned by Intel. It has various versions of the 11th generation i5, and each generation has different performance. Therefore, whether the i5 processor can install win11 depends on which generation of the processor it is. Let’s follow the editor to learn about it separately. Can i5 processor be installed with win11: Answer: i5 processor can be installed with win11. 1. The eighth-generation and subsequent i51, eighth-generation and subsequent i5 processors can meet Microsoft’s minimum configuration requirements. 2. Therefore, we only need to enter the Microsoft website and download a "Win11 Installation Assistant" 3. After the download is completed, run the installation assistant and follow the prompts to install Win11. 2. i51 before the eighth generation and after the eighth generation

Introducing the latest Win 11 sound tuning method Introducing the latest Win 11 sound tuning method Jan 08, 2024 pm 06:41 PM

After updating to the latest win11, many users find that the sound of their system has changed slightly, but they don’t know how to adjust it. So today, this site brings you an introduction to the latest win11 sound adjustment method for your computer. It is not difficult to operate. And the choices are diverse, come and download and try them out. How to adjust the sound of the latest computer system Windows 11 1. First, right-click the sound icon in the lower right corner of the desktop and select "Playback Settings". 2. Then enter settings and click "Speaker" in the playback bar. 3. Then click "Properties" on the lower right. 4. Click the "Enhance" option bar in the properties. 5. At this time, if the √ in front of "Disable all sound effects" is checked, cancel it. 6. After that, you can select the sound effects below to set and click

Introduction to edge shortcut keys Introduction to edge shortcut keys Jul 12, 2023 pm 05:57 PM

In today's fast life, in order to improve work efficiency, shortcut keys are an essential work requirement. A shortcut key is a key or key combination that provides an alternative way to perform an action normally performed using a mouse. So what are the edge shortcut keys? What are the functions of edge shortcut keys? The editor below has compiled an introduction to edge shortcut keys. Friends who are interested should come and take a look! Ctrl+D: Add the current page to favorites or reading list Ctrl+E: Perform a search query in the address bar Ctrl+F: Find on the page Ctrl+H: Open the history panel Ctrl+G: Open the reading list panel Ctrl +I: Open the favorites list panel (the test does not seem to work) Ctrl+J: Open

Detailed information on the location of the printer driver on your computer Detailed information on the location of the printer driver on your computer Jan 08, 2024 pm 03:29 PM

Many users have printer drivers installed on their computers but don't know how to find them. Therefore, today I bring you a detailed introduction to the location of the printer driver in the computer. For those who don’t know yet, let’s take a look at where to find the printer driver. When rewriting content without changing the original meaning, you need to The language is rewritten to Chinese, and the original sentence does not need to appear. First, it is recommended to use third-party software to search. 2. Find "Toolbox" in the upper right corner. 3. Find and click "Device Manager" below. Rewritten sentence: 3. Find and click "Device Manager" at the bottom 4. Then open "Print Queue" and find your printer device. This time it is your printer name and model. 5. Right-click the printer device and you can update or uninstall it.

See all articles