zk的树形数据模型是什么
发表于:2024-09-23 作者:千家信息网编辑
千家信息网最后更新 2024年09月23日,这篇文章主要介绍"zk的树形数据模型是什么",在日常操作中,相信很多人在zk的树形数据模型是什么问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答"zk的树形数据模型是什么"
千家信息网最后更新 2024年09月23日zk的树形数据模型是什么
这篇文章主要介绍"zk的树形数据模型是什么",在日常操作中,相信很多人在zk的树形数据模型是什么问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答"zk的树形数据模型是什么"的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
zookeeper的数据模型是树结构
在内存数据库中存储了整颗树内容,包含所有节点路径,节点数据,状态信息
会定时将数据刷到磁盘上
数据模型表示主要有DataTree DataNode ZKDatabase
datatree是一颗树结构,不包含和客户端,网络,请求相关的业务逻辑
dataNode是数据存储的最小单元,保存了节点数据内容,ACL列表,状态,父节点引用和子节点列表
zkdatabase是内存数据库,管理zk所有会话,DataTree存储和事务日志,定时将日志刷写到磁盘
在zookeeper启动时,会通过磁盘的事务日志和快照文件恢复一个完整的内存数据库
属性相关
属性相关private final NodeHashMap nodes;//监听节点private IWatchManager dataWatches;//监听节点private IWatchManager childWatches;/** cached total size of paths and data for all DataNodes *///总大小private final AtomicLong nodeDataSize = new AtomicLong(0);/** the root of zookeeper tree *///zookeeper的根节点private static final String rootZookeeper = "/";/** the zookeeper nodes that acts as the management and status node **///状态管理节点private static final String procZookeeper = Quotas.procZookeeper;/** th will be the string thats stored as a child of root *///root的一个子节点private static final String procChildZookeeper = procZookeeper.substring(1);/** * the zookeeper quota node that acts as the quota management node for * zookeeper *///限额管理节点private static final String quotaZookeeper = Quotas.quotaZookeeper;/** thi是s- will be the string thats stored as a child of /zookeeper */// /zookeeper的子节点private static final String quotaChildZookeeper = quotaZookeeper.substring(procZookeeper.length() + 1);/** * the zookeeper config node that acts as the config management node for * zookeeper *///配置管理节点private static final String configZookeeper = ZooDefs.CONFIG_NODE;/** thi是s- will be the string thats stored as a child of /zookeeper */// 子节点config节点private static final String configChildZookeeper = configZookeeper.substring(procZookeeper.length() + 1);/** * the path trie that keeps track of the quota nodes in thi是s- datatree *///限额节点关联private final PathTrie pTrie = new PathTrie();/** * over-the-wire size of znode's stat. Counting the fields of Stat class *///stat 类的fieldpublic static final int STAT_OVERHEAD_BYTES = (6 * 8) + (5 * 4);/** * Thi是s- hashtable li是s-ts the paths of the ephemeral nodes of a session. *///临时会话节点的相关路径private final Map> ephemerals = new ConcurrentHashMap >();/** * Thi是s- set contains the paths of all container nodes */// 容器节点的路径private final Set containers = Collections.newSetFromMap(new ConcurrentHashMap ());/** * Thi是s- set contains the paths of all ttl nodes *///ttl node的相关路径private final Set ttls = Collections.newSetFromMap(new ConcurrentHashMap ());private final ReferenceCountedACLCache aclCache = new ReferenceCountedACLCache();// The maximum number of tree digests that we will keep in our hi是s-torypublic static final int DIGEST_LOG_LIMIT = 1024;// Dump digest every 128 txns, in hex it's 80, which will make it easier// to align and compare between servers.public static final int DIGEST_LOG_INTERVAL = 128;// If thi是s- i是s- not null, we are actively looking for a target zxid that we// want to validate the digest forprivate ZxidDigest digestFromLoadedSnapshot;// The digest associated with the highest zxid in the data tree.private volatile ZxidDigest lastProcessedZxidDigest;// Will be notified when digest mi是s-match event triggered.private final Li是s-t digestWatchers = new ArrayLi是s-t<>();// The hi是s-torical digests li是s-t.private LinkedLi是s-t digestLog = new LinkedLi是s-t<>();private final DigestCalculator digestCalculator;
到此,关于"zk的树形数据模型是什么"的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注网站,小编会继续努力为大家带来更多实用的文章!
节点
数据
模型
树形
路径
学习
管理
内存
数据库
日志
状态
磁盘
存储
事务
内容
属性
更多
结构
帮助
监听
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
固定电话网络技术
河南清然网络技术有限公司
python爬虫网络技术
网络安全500强企业
马哥教育网络安全工程师
失落的方舟服务器认证失败10010
web服务器访问数据库很慢
网络安全有什么相关时政问题
梅州无限软件开发价目表
外国服务器多少钱
现如今的网络技术发展
分析管理软件开发
传统数据库和hive
黑猫网络安全小组
容塞姆网络技术
软件开发需要学高等数学么
HP服务器设置管理口
金蝶kis单机版需要数据库吗
如何上服务器
魔兽世界tbc狂野之刃服务器
大学生网络安全周宣传资料
网络安全漫画大赛获奖
r语言读取数据框数据库
深圳火狐网络技术有限公司
网络安全中挂马是什么意思
当前网络安全的核心问题
浙大数据库在线作业
行业网络安全态势
暴雪服务器怎么开
游戏和软件开发需要什么职位