zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TyqITstudent <...@git.apache.org>
Subject [GitHub] zookeeper pull request #704: ZOOKEEPER-3167:add an API to get total count of...
Date Sun, 18 Nov 2018 12:42:07 GMT
GitHub user TyqITstudent opened a pull request:


    ZOOKEEPER-3167:add an API to get total count of recursive sub nodes of one node

    1. In production environment, there will be always a situation that there are a lot of
recursive sub nodes of one node. We need to count total number of it.
    2. Now, we can only use API getChildren which returns the List<String> of first
level of sub nodes. We need to iterate every sub node to get recursive sub nodes. It will
cost a lot of time.
    3. In zookeeper server side, it uses Hasp<String, DataNode> to store node. The key
of the map represents the path of the node. We can iterate the map get total number of all
levels of sub nodes of one node.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/TyqITstudent/zookeeper ZOOKEEPER-3167

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #704
commit 818100780c4c2a8fd6e90e7ecbc5e89b81d6dc5d
Author: tianyiqun <891707263@...>
Date:   2018-11-12T14:35:11Z

    add getAllChildrenNumber API of one node



View raw message