1) the Stat structure of znode
在zookeeper的数据模型中,每个数据节点称为znode. 每个znode维护一个Stat structure.这个Stat structure 由下面几个属性构成:
·czxid
每一次对zookeeper znode做的更新都会对应唯一transactionID,这个id称为zxid.由于zxid是递增的,所以它实际上表示对zookeeper更新的一种顺序。例如zxid1 小于 zxid2 那么zxid1对应的操作在zxid2对应的操作之前发生。
Czxid表示znode创建时对应的zxid.
·mzxid
最近一次对znode更新所对应的zxid.
·ctime
Zookeeper不使用realtime和clocktime ,除了用时间戳来标示znode创建和修改的时间。Ctime是创建znode的时间戳。
·mtime
对Znode修改的时间戳。
·version
每一次对znode更新都会引起版本号的增加。Version标示与该znode关联的数据更新的版本号。
·cversion
该节点的子节点更新的版本号。
·aversion
ACL(Access Control List)访问控制列表更新的版本号。
·ephemeralOwner
如果该节点的类型是ephemeral,那么该节点的ephemeralOwner就是创建该节点的client的session id。如果该节点不是ephemeral的,那么该节点的ephemeralOwner就是0.
·dataLength
与该节点关联的数据的长度。
·numChildren
该节点的子节点数目。
2) The type of znode
在zookeeper中创建znode的类型有两种,ephemeral和persistent.
·ephemeral
该类型的节点与session是同生命周期的。Session创建该节点之后,该节点就是活着的,当session结束之后zookeeper就会清理掉该节点。所以该类型的节点不能有子节点。
·persistent
该类型的节点不和session绑定,显示的创建,显示的删除。否则该节点一直存在。
·sequence
节点,sequence节点既可以是ephemeral的,也可以是persistent的。在创建节点时,zookeeper会在路径的后面添加递增的序列号。该序列号最大为2147483647(4bytes—signed int).-->这是zookeeper实现分布式锁的关键。
相关推荐
In the subsequent section the structure of the decoupled closed-loop system with respect to observability is considered. This type of problem has been regarded for linear systems with constant ...
在2012年发表在《Science》期刊上的文章"The Geometric Structure of the Brain Fiber Pathways"中,研究者们探讨了大脑中纤维路径的组织和布局,这些路径构成了神经元之间的物理连接,是信息传递的“桥梁”。...
Mumford - The structure of the moduli spaces of curves and abelian varieties (Actes Congr. Int. Math. 1970)
《The Modular Structure of Complex Systems》一文由David Lorge Parnas、Paul C. Clements和David M. Weiss撰写,于1985年发表在IEEE Transactions on Software Engineering上。该文章深入探讨了如何通过模块化...
What information is necessary when specifying the structure of a table? (a) the name of the table and the amount of storage space to be allocated to the table (b) the name of the table, the ...
网络科学的入门书籍,主要是网络的拓扑结构及其演变的过程理论分析
"Explore the structure of tables (and views)"这一主题主要关注如何查看和理解数据库中的表和视图的结构。这涉及到数据库设计、SQL查询以及数据库应用程序的开发。以下是一些相关知识点的详细说明: 1. **数据库...
The Structure of Carbon Suboxide, C3O2, in the Solid State The Structure of Carbon Suboxide, C3O2, in the Solid State Arkady Ellern, Thomas Drews and Konrad Seppelt* Berlin, Institut fuÈ r Chemie...
The Lancaster Corpus of Mandarin Chinese (LCMC) is ... The XML structure of the corpus was validated using the parser built in Xaira. Part-of-speech tagging of all aspect markers was manually checked.
When the relationships between the structure, properties, and processing of materials are fully understood and exploited, materials become enabling—they are transformed from stuff, the raw materials ...
稀土元素对二氧化硅负载型磷钼酸结构和催化氧化脱硫性能的影响研究,邱江华,王光辉,本文采用溶胶-凝胶法分别制备了La3+、Ce3+ 和Pr3+改性的SiO2负载型磷钼酸作为催化剂,并对催化剂进行了傅里叶红外光谱、X射线...
In the research of social networks, the structure holes usually refers to the vertices in the network at the key positions of information diffusion. The detection of such vertices is of great ...
Structure And Interpretation Of Computer Programs 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,...
It provides a complete, systematic analysis of the operating system source code, as well as a direct and complete understanding of the real operating system run-time structure. The author includes ...
Electronic Conditions of Diatomic (BN) Anions in the Structure of CaNiBN Artikel Electronic Conditions of Diatomic (BN) Anions in the Structure of CaNiBN Björn Blaschkowski, H.-Jürgen Meyer* T...