`
wbj0110
  • 浏览: 1604812 次
  • 性别: 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高可用性(HA)配置详解》 在IT领域,高可用性(HA)是衡量系统稳定性和可靠性的重要指标,它确保系统能够持续、不间断地执行其核心功能。高可用性的目标并非完全消除故障,而是降低故障对业务的影响,通过...

    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 ...

    Pro Linux High Availability Clustering.pdf(Linux高可用集群)

    《Pro Linux High Availability Clustering》是一本专注于Linux操作系统下的高可用集群技术的专著。这本书深入探讨了在企业环境中如何构建稳定、可靠的系统,确保关键服务的不间断运行,从而提高业务连续性和数据...

    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能 够提供对数据的可扩展访问,通过简单地往集群里添加节点就可以解决...

    HDFS scalability:the limits to growth

    ### HDFS可扩展性:增长的极限 #### HDFS与Hadoop Hadoop Distributed File System (HDFS)作为Hadoop项目中的一个核心组件,是一种开放源代码系统,它被广泛应用于处理大规模数据集的场景中。HDFS的设计理念来源于...

    HadoopNameNode高可用(HighAvailability)实现解析

    因为NameNode保存了整个HDFS的元数据信息,一旦NameNode挂掉,整个HDFS就无法访问,同时Hadoop生态系统中依赖于HDFS的各个组件,包括MapReduce、Hive、Pig以及HBase等也都无法正常工作,并且重新启动NameNode和进行...

    Hadoop技术HDFS简介共10页.pdf.zip

    同时,HDFS的HDFS Federation和HDFS High Availability特性进一步增强了其可扩展性和可用性。 在实际应用中,HDFS被广泛用于大数据分析、日志处理、视频流媒体服务等领域。例如,Google的GFS(Google File System)...

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

    **HDFS管理工具HDFS Explorer** HDFS Explorer是一款专为Windows平台设计的HDFS文件管理系统,它使得用户能够像操作本地文件系统一样便捷地管理和浏览Hadoop分布式文件系统(HDFS)。尽管官方已经停止更新此软件,...

    HDFS原理介绍

    - **注意事项**:在Hadoop 2.x版本中,如果启用了HDFS High Availability (HA)模式,SecondaryNameNode的角色会被替换为其他组件,例如Zookeeper Quorum。 **3. DataNode** - **职责**:DataNode是HDFS的实际存储...

    HDFS实例基本操作

    Hadoop分布式文件系统(HDFS)是Apache Hadoop项目的核心组件之一,它为大数据处理提供了可靠的、可扩展的分布式存储解决方案。在这个“HDFS实例基本操作”中,我们将深入探讨如何在已经安装好的HDFS环境中执行基本...

    大数据HDFS文档

    - **高可用性**: 通过引入Secondary NameNode或使用HDFS High Availability(HA)配置来提高系统的可用性。 #### HDFS数据备份策略 - **数据块**: 文件被划分为固定大小的数据块,每个块默认大小为128MB或64MB。 ...

    HDFS文件系统基本文件命令、编程读写HDFS

    HDFS 文件系统基本文件命令、编程读写 HDFS HDFS(Hadoop Distributed File System)是一种分布式文件系统,用于存储和管理大规模数据。它是 Hadoop 云计算平台的核心组件之一,提供了高效、可靠、可扩展的数据存储...

    kafka-to-hdfs:将来自 Kafka 主题的消息通过管道传输到 HDFS

    kafka 到 hdfs 将来自主题的消息通过管道传输到 HDFS。 大纲 这比的简单得多,但它可以完成从 Kafka 到 HDFS 的简单加载。 这对于在一段时间内获取 Kafka 主题的实时样本非常有用,以便稍后在其上运行 MapReduce。 ...

    星环大数据平台HDFS

    HDFS还提供了高可用性(High Availability, HA)解决方案,以便于当主NameNode出现故障时,备用的Standby NameNode可以迅速接管,保证系统的稳定运行。Standby NameNode通过周期性地与Active NameNode同步编辑日志...

    hdfs源码分析整理

    hdfs源码分析整理 在分布式文件系统中,HDFS(Hadoop Distributed File System)扮演着核心角色,而HDFS的源码分析则是深入了解HDFS架构和实现机理的关键。本文将对HDFS源码进行详细的分析和整理,涵盖了HDFS的目录...

    hdfs高可用配置文件

    本文将深入探讨HDFS高可用(High Availability, HA)配置,以及如何配置相关文件以实现HA功能。 首先,HDFS HA涉及两个主要组件:NameNode和Secondary NameNode。NameNode是HDFS的元数据管理器,负责维护文件系统的...

    hdfs.zip_hdfs_hdfs java

    在这个例子中,`namenode-host`和`port`需要替换为实际的HDFS NameNode主机和端口,`path/to/local/file`是本地文件的路径,而`/hdfs/path/to/destination`是HDFS上的目标路径。 **2. 从HDFS下载文件** 下载HDFS上...

    hdfs的高可用搭建

    HDFS HA (High Availability) 解决方案旨在解决NameNode单点故障问题。HDFS HA通过设置两个NameNode实例(一个Active NameNode和一个Standby NameNode),当Active NameNode出现故障时,可以迅速切换到Standby ...

Global site tag (gtag.js) - Google Analytics