动物园管理员Znode

发布于 2024-12-18 09:24:57 字数 235 浏览 4 评论 0 原文

当我们使用zookeeper来协调一组Hbase节点时,那么zookeeper 可以放置在与 Hbase 节点相同的节点上还是必须放置在单独的集群上? 另外一件事我无法清楚理解的是 Zookeeper znodes 是何时创建的以及什么 Zookeeper znode 的目的是什么? Zookeeper官方网站说这些是zookeeper文件系统的一部分,那么到底是什么 Zookeeper znode是用来存储的?是配置属性、应用数据还是到底是什么内容?

When we use zookeeper for coordination of a set of Hbase nodes , then zookeeper
can be housed on the same nodes as Hbase nodes or it MUST be housed on a seperate cluster?
Also one thing I am not able to understand clearly is when are Zookeeper znodes created and what
is the purpose of a zookeeper znode?
The Zookeeper official site says these are part of the zookeeper filesystem, so what exactly
is the zookeeper znode used to store?Is it configuration properties, application data or exactly what content?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

舟遥客 2024-12-25 09:24:57

为了回答以下问题,

我无法清楚地理解 Zookeeper znodes 何时出现
创建的 Zookeeper znode 的目的是什么?那么zookeeper znode到底是用来存储什么的?是配置属性、应用程序数据还是到底是什么内容?

Zookeeper ZNodes是Zookeeper状态的一部分,是Zookeeper的数据节点。它是一个文件夹,也存储数据。您可以在这些 znode 上存储少量数据。所有 znode 都存储数据,并且除临时 znode 之外的所有 znode 都可以有子节点。 Zookeeper 客户端可以通过 ZooKeeper API 操作 znode 和数据。阅读 Zookeeper 教程并客户端 API 示例文章了解更多

Zookeeper 对 znode 路径使用标准 UNIX 表示法。例如,znode 路径 /A/B/C 表示 znode C 的路径,其中 C 以 B 作为其父级,B 以 A 作为其父级。

ZNode 分为三种类型:

常规:客户端通过显式创建和删除常规 znode 来操作它们。

临时:客户端创建此类 znode,并且它们要么显式删除它们,要么让系统在创建它们的会话终止时自动删除它们。

顺序:这些 Znode 在创建时会在其名称后添加一个唯一的数字(序列)。

To answer the following,

I am not able to understand clearly is when are Zookeeper znodes
created and what is the purpose of a zookeeper znode? so what exactly is the zookeeper znode used to store?Is it configuration properties, application data or exactly what content?

Zookeeper ZNodes are part of Zookeeper state and is the data node of Zookeeper. It is a folder as well as stores data. You can store small amount of data on these znode. All znodes store data, and all znodes except for ephemeral znodes, can have children. Zookeeper clients can manipulate the znode and data through the ZooKeeper API. Read Zookeeper tutorial and client API examples article to know more

Zookeeper uses standard UNIX notation for znode paths. For example,the znode path /A/B/C to denote the path to znode C, where C has B as its parent and B has A as its parent.

There are three types of ZNodes:

Regular: Clients manipulate regular znodes by creating and deleting them explicitly.

Ephemeral: Clients create such znodes, and they either delete them explicitly, or let the system remove them automatically when the session that creates them terminates.

Sequential: These Znodes when created, gets a unique number (sequence) suffixed to its name.

国际总奸 2024-12-25 09:24:57

您可以在与 hbase 相同的节点上运行zookeeper,但出于性能原因,您可能希望在单独的节点上运行zookeeper。 hbase 文档 说,

您可以运行仅包含 1 个节点的 ZooKeeper 整体,但在
生产环境中,建议您运行 3、5 个 ZooKeeper 集合
或 7 台机器;一个乐团的成员越多,包容性就越大
ensemble 是主机故障。另外,运行奇数台机器。
如果成员人数为偶数,则不能达到法定人数。
为每个 ZooKeeper 服务器提供大约 1GB 的 RAM,如果可能的话,提供自己的 RAM
专用磁盘(专用磁盘是您可以做的最好的事情
确保一个高性能的 ZooKeeper 整体)。对于非常重的负载
集群,在不同的机器上运行 ZooKeeper 服务器
RegionServers(数据节点和任务跟踪器)。

您可以在此处查看 hbase 使用 Zookeeper 的一些方式。

You can run zookeeper on the same nodes as hbase, but for performance reasons you may want to run zookeeper on separate nodes. The hbase docs say,

You can run a ZooKeeper ensemble that comprises 1 node only but in
production it is recommended that you run a ZooKeeper ensemble of 3, 5
or 7 machines; the more members an ensemble has, the more tolerant the
ensemble is of host failures. Also, run an odd number of machines.
There can be no quorum if the number of members is an even number.
Give each ZooKeeper server around 1GB of RAM, and if possible, its own
dedicated disk (A dedicated disk is the best thing you can do to
ensure a performant ZooKeeper ensemble). For very heavily loaded
clusters, run ZooKeeper servers on separate machines from
RegionServers (DataNodes and TaskTrackers).

You can see some of the ways hbase uses zookeeper here.

墨离汐 2024-12-25 09:24:57

Hbase 主服务器创建zookeeper znode /hbase 。然后,这将用于 hbase 守护进程进行协调。甚至活动 Hbase master 的名称也存储在这里。如果 hbase master 挂掉,备份 hbase master 会覆盖 znode 的内容,以便客户端和区域服务器知道新的 master。除此之外,区域信息也保存在 Zookeeper znode 中。

The Hbase master server creates the zookeeper znode /hbase . This is then used for hbase daemons to coordinate. Even the name of the active Hbase master is stored here. If the hbase master dies, the backup hbase master overwrites the contents of the znode so clients and region servers know about the new master. Apart from this, region info is maintained in zookeeper znodes as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文