hbase-site.xml 中的zookeeper quorum 设置究竟是什么? [英] What exactly is the zookeeper quorum setting in hbase-site.xml?

查看:31
本文介绍了hbase-site.xml 中的zookeeper quorum 设置究竟是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hbase-site.xml 中的zookeeper quorum 设置究竟是什么?

解决方案

hbase-default.xml, 这里是设置:

<块引用>

ZooKeeper Quorum 中以逗号分隔的服务器列表.例如,host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".默认情况下,对于本地和伪分布式操作模式,这设置为 localhost.对于完全分布式设置,这应该设置为 ZooKeeper 仲裁服务器的完整列表.如果在 hbase-env.sh 中设置了 HBASE_MANAGES_ZK,这是我们将在其上启动/停止 ZooKeeper 的服务器列表.

这实际上做什么已由 Edward J. Yoon 此处.为了清楚起见,我进行了

<块引用>

Apache Zookeeper 是分布式应用程序的协调服务,例如 Google 的 Chubby.很多项目使用zookeeper,我们(Apache Hama)也使用zookeeper做Bulk Synchronous Parallel计算框架的屏障同步.

今天,我调查了更多关于 Zookeeper 项目的 paxos 和动态仲裁功能,以更好地命名类 org.apache.hama.zookeeper.QuorumPeer.因为文档不够(http://hadoop.apache.org/zookeeper/docs/r3.0.0/api/index.html ),我不明白法定人数"的意思,因为这个词对我来说有点奇怪.但是,org.apache.hama.zookeeper.QuorumPeer"是正名!!xD

那么,什么是法定人数,为什么我们需要法定人数?

根据维基百科,法定人数是指进行该团体业务所需的审议机构的最低成员人数.通常,这是预计到场的大多数人,尽管许多机构的法定人数可能较低或较高.

如您所知,容错机制是分布式系统的重要功能之一.Quorum 算法用于防止出现裂脑情况.当发生裂脑情况时,根据 Quorum 算法,zookeeper 会确定主分区".和二级分区".然后,主组中的服务器接收并处理用户的请求,次组中的服务器变为只读.

这个系统什么时候能从裂脑状态中恢复过来?当它们再次合并到一个分区时.在内部,zookeeper 使用原子广播协议而不是 Paxos.

您还应该阅读原始版本,以防我误译了他试图呈现的概念.

我对 Apache Zookeeper 中仲裁机制的理解是它明确定义了跨多个预- 定义的主机.如果不满足这个法定人数,不同意的分区将被拆分为次分区,直到 Zookeeper 可以将它们重新集成到主分区.

这为 Hadoop 的最终一致性模型增加了更多粒度.与此同时,HBase 目前正在进一步将 Zookeeper 与其代码集成.>

What exactly is the zookeeper quorum setting in hbase-site.xml?

解决方案

As described in hbase-default.xml, here's the setting:

Comma separated list of servers in the ZooKeeper Quorum. For example, "host1.mydomain.com,host2.mydomain.com,host3.mydomain.com". By default this is set to localhost for local and pseudo-distributed modes of operation. For a fully-distributed setup, this should be set to a full list of ZooKeeper quorum servers. If HBASE_MANAGES_ZK is set in hbase-env.sh this is the list of servers which we will start/stop ZooKeeper on.

What this actually does has been answered by Edward J. Yoon here. With editing on my part, for clarity:

The Apache Zookeeper is a coordination service for distributed applications, like Google's Chubby. Many projects uses zookeeper, and we (Apache Hama) also use zookeeper for barrier synchronization of Bulk Synchronous Parallel computing framework.

Today, I surveyed more about the paxos and dynamic quorum features of the Zookeeper project, to better name the class org.apache.hama.zookeeper.QuorumPeer. Because of documentation is not enough ( http://hadoop.apache.org/zookeeper/docs/r3.0.0/api/index.html ), I didn't understand the meaning of "quorum", as this term was somewhat odd to me. But, "org.apache.hama.zookeeper.QuorumPeer" is the proper name!! xD

So, what is the Quorum and why do we need a Quorum?

According to Wikipedia, Quorum is the minimum number of members of a deliberative body necessary to conduct the business of that group. Ordinarily, this is a majority of the people expected to be there, although many bodies may have a lower or higher quorum.

As you know, a Fault-Tolerant mechanism is one of the important functions of distributed system. The Quorum algorithm is used to prevent a split-brain condition. When split-brain condition occurs, according to the Quorum algorithm, zookeeper determines the "Primary Partition" and "Secondary Partition". Then, the servers in primary group receive and process user's request, and the servers in secondary group become read-only.

When does this system recover from a split-brain condition? When they're merged to one partition again. Internally, zookeeper uses atomic broadcast protocol instead of Paxos.

You should also read the original version, in case I mistranslated the concepts he was trying to present.

My understanding of the quorum mechanism in Apache Zookeeper is it explicitly defines a replication quorum across several pre-defined hosts. If this quorum is not met, the partitions that disagree are split off to a secondary partition until Zookeeper can reintegrate them with the primary partition.

This adds more granularity to Hadoop's eventual consistency model. HBase, meanwhile, is currently in the process of further integrating Zookeeper with its code.

这篇关于hbase-site.xml 中的zookeeper quorum 设置究竟是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆