`
wbj0110
  • 浏览: 1558277 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

Introduction to HDFS High Availability

阅读更多

Overview

This guide provides an overview of the HDFS High Availability (HA) feature and how to configure and manage an HA HDFS cluster.

This document assumes that the reader has a general understanding of components and node types in an HDFS cluster. For details, see the Apache HDFS Architecture Guide.

Background

In earlier releases, the NameNode was a single point of failure (SPOF) in an HDFS cluster. Each cluster had a single NameNode, and if that machine or process became unavailable, the cluster as a whole would be unavailable until the NameNode was either restarted or brought up on a separate machine. The Secondary NameNode did not provide failover capability.

This reduced the total availability of the HDFS cluster in two major ways:

  1. In the case of an unplanned event such as a machine crash, the cluster would be unavailable until an operator restarted the NameNode.
  2. Planned maintenance events such as software or hardware upgrades on the NameNode machine would result in periods of cluster downtime.

The HDFS HA feature addresses the above problems by providing the option of running two NameNodes in the same cluster, in an Active/Passive configuration. These are referred to as the Active NameNode and the Standby NameNode. Unlike the Secondary NameNode, the Standby NameNode is hot standby, allowing a fast failover to a new NameNode in the case that a machine crashes, or a graceful administrator-initiated failover for the purpose of planned maintenance. You cannot have more than two NameNodes.

Architecture

In a typical HA cluster, two separate machines are configured as NameNodes. At any point in time, one of the NameNodes is in an Active state, and the other is in a Standby state. The Active NameNode is responsible for all client operations in the cluster, while the Standby is simply acting as a slave, maintaining enough state to provide a fast failover if necessary.

Quorum-based Storage

Quorum-based Storage refers to the HA implementation that uses Quorum Journal Manager (QJM).
  Note:

Quorum-based Storage is the only implementation Cloudera supports in CDH 5.

In order for the Standby node to keep its state synchronized with the Active node in this implementation, both nodes communicate with a group of separate daemons called JournalNodes. When any namespace modification is performed by the Active node, it durably logs a record of the modification to a majority of these JournalNodes. The Standby node is capable of reading the edits from the JournalNodes, and is constantly watching them for changes to the edit log. As the Standby Node sees the edits, it applies them to its own namespace. In the event of a failover, the Standby will ensure that it has read all of the edits from the JournalNodes before promoting itself to the Active state. This ensures that the namespace state is fully synchronized before a failover occurs.

In order to provide a fast failover, it is also necessary that the Standby node has up-to-date information regarding the location of blocks in the cluster. In order to achieve this, the DataNodes are configured with the location of both NameNodes, and they send block location information and heartbeats to both.

It is vital for the correct operation of an HA cluster that only one of the NameNodes be active at a time. Otherwise, the namespace state would quickly diverge between the two, risking data loss or other incorrect results. In order to ensure this property and prevent the so-called "split-brain scenario," the JournalNodes will only ever allow a single NameNode to be a writer at a time. During a failover, the NameNode which is to become active will simply take over the role of writing to the JournalNodes, which will effectively prevent the other NameNode from continuing in the Active state, allowing the new Active NameNode to safely proceed with failover.

http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH5/latest/CDH5-High-Availability-Guide/cdh5hag_hdfs_ha_intro.html

分享到:
评论

相关推荐

    HDFS High Availability(HA)高可用配置.doc

    HDFS High Availability(HA)高可用配置.doc

    HDFS-High-Availability

    While high availability needs to be addressed across the stack it makes sense for the work to start with HDFS because most components in a Hadoop-based system are dependent on HDFS, and therefore ...

    hdfs源码.zip

    3.7.2 HDFS High Availability 276 3.7.3 名字节点的启动 301 3.7.4 名字节点的停止 306 第4章 Datanode(数据节点) 307 4.1 Datanode逻辑结构 307 4.1.1 HDFS 1.X架构 307 4.1.2 HDFS Federation 308 ...

    HDFS Comics HDFS 漫画

    HDFS是Hadoop分布式计算的存储基础。HDFS具有高容错性,可以部署在通用硬件设备上,适合数据密集型应用,并且提供对数据读写的高吞 吐量。HDFS能 够提供对数据的可扩展访问,通过简单地往集群里添加节点就可以解决...

    HadoopNameNode高可用(HighAvailability)实现解析

    在Hadoop1.0时代,Hadoop的两大核心组件HDFS NameNode和JobTracker都存在着单点问题,这其中以NameNode的单点问题尤为严重。因为 NameNode保存了整个HDFS的元数据信息,一旦NameNode挂掉,整个HDFS就无法访问,同时 ...

    HDFS管理工具HDFS Explorer下载地址、使用方法.docx

    windows平台下的HDFS文件浏览器,就像windows管理器一样管理你的hdfs文件系统。现在官网已经停止更新这款软件。具体配置如下: HDFS配置页面及端口http://master:50070 配置HDFS服务器 配置WebHDFS HDFS Explorer...

    HDFS scalability:the limits to growth

    一篇讲述apache hdfs扩展性限制的文章

    HDFS Design

    HDFS provides high throughput access to application data and is suitable for applications that have large data sets. HDFS relaxes a few POSIX requirements to enable streaming access to file system ...

    HDFS文件的查看

    hdfs文件的查看 hdfs fs -cat /文件名

    HDFS design

    HDFS provides high throughput access to application data and is suitable for applications that have large data sets. HDFS relaxes a few POSIX requirements to enable streaming access to file system ...

    HDFS实例基本操作

    在安装好HDFS的前提下,此项目包含HDFS的基本操作,上传,下载,创建文件夹等。

    MR处理HDFS日志样例

    MR处理HDFS日志样例

    HDFS配置文件hdfs-site

    HDFS测试环境配置文件,稳定运行无异常,分享给大家学习参考用;

    实验二:熟悉常用的HDFS操作

    A.2实验二:熟悉常用的HDFS操作 本实验对应第4章的内容。 A.2.1 实验目的 (1)理解 HDFS在Hadoop体系结构中的角色。(2)熟练使用HDFS操作常用的 Shell命令。(3)熟悉HDFS操作常用的Java API。 A.2.2 实验平台 (1)操作...

    HDFS体系架构汉化文档.pdf

    Hadoop分布式文件系统( HDFS )是一种旨在在商品硬件上运行的分布式文系统。它与现有的分布式文件系统许多相似之处。 但是,与其他分布式文件系统的区别很明显。 HDFS 具有高度的容错能力,旨在部署低成本硬件上。 ...

    HDFS文件操作命令与HDFS编程

    文档详细的讲述了Hadoop中HDFS文件操作命令和HDFS编程

    HDFS文件的上传

    hdfs 文件的上传,hdfs fs -put /文件名

    HDFS文件的下载

    hdfs文件的下载

    分布式存储系统——HDFS

    1. 分布式文件系统与HDFS 2. HDFS 的shell 操作 3. HDFS 体系结构与基本概念 4 HDFS 的web 接口 5. HDFS 的java 访问接口 6. HDFS 的RPC 机制 7. NameNode 的接口分析 8. DataNode 的接口分析 9. HDFS 的写数据过程...

Global site tag (gtag.js) - Google Analytics