zoukankan      html  css  js  c++  java
  • zookeeper-data

    1. The ZooKeeper Data Model

    1.1 ZNodes

    Znodes maintain a stat structure:

    The Stat structure for each znode in ZooKeeper is made up of the following fields:

    • czxid

      The zxid of the change that caused this znode to be created.

    • mzxid

      The zxid of the change that last modified this znode.

    • ctime

      The time in milliseconds from epoch when this znode was created.

    • mtime

      The time in milliseconds from epoch when this znode was last modified.

    • version

      The number of changes to the data of this znode.

    • cversion

      The number of changes to the children of this znode.

    • aversion

      The number of changes to the ACL of this znode.

    • ephemeralOwner

      The session id of the owner of this znode if the znode is an ephemeral node. If it is not an ephemeral node, it will be zero.

    • dataLength

      The length of the data field of this znode.

    • numChildren

      The number of children of this znode.

    须知:

    ZooKeeper was not designed to be a general database or large object store. Instead, it manages coordination data. This data can come in the form of configuration, status information, rendezvous, etc. A common property of the various forms of coordination data is that they are relatively small: measured in kilobytes. The ZooKeeper client and the server implementations have sanity checks to ensure that znodes have less than 1M of data, but the data should be much less than that on average. Operating on relatively large data sizes will cause some operations to take much more time than others and will affect the latencies of some operations because of the extra time needed to move more data over the network and onto storage media. If large data storage is needed, the usually pattern of dealing with such data is to store it on a bulk storage system, such as NFS or HDFS, and store pointers to the storage locations in ZooKeeper.

  • 相关阅读:
    BZOJ 1597: [Usaco2008 Mar]土地购买
    BZOJ 1005: [HNOI2008]明明的烦恼
    BZOJ 1004: [HNOI2008]Cards
    Burnside引理和Polya定理
    BZOJ 1003: [ZJOI2006]物流运输
    BZOJ 1002: [FJOI2007]轮状病毒
    BZOJ 1001: [BeiJing2006]狼抓兔子
    网络流 最大流dinic算法解释
    51nod 1299 监狱逃离
    2017.11.26【清华集训2017】模拟
  • 原文地址:https://www.cnblogs.com/zhouj-happy/p/6277024.html
Copyright © 2011-2022 走看看