当我们使用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?
发布评论
评论(3)
为了回答以下问题,
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,
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.
您可以在与 hbase 相同的节点上运行zookeeper,但出于性能原因,您可能希望在单独的节点上运行zookeeper。 hbase 文档 说,
您可以在此处查看 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 see some of the ways hbase uses zookeeper here.
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.