jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Mehrotra <chetan.mehro...@gmail.com>
Subject Re: How to get total nodes in Oak repo
Date Fri, 08 Aug 2014 05:37:47 GMT
At JCR level traversal is the only option. For Mongo based deployment
you can get a rough estimate via ds.nodes.stats() command.

- count - This property provides an estimate of number of nodes
- It also includes the nodes which store the index data. Note that
these index are Oak indexes and are different from Mongo indexes
- It also includes nodes which are marked deleted but yet not garbage collected

$ mongo <server>:<port>/<db>
$ db.nodes.stats()
$ {
        "ns" : "aem-author.nodes",
        "count" : 593688,
        "size" : 453287536,
        "avgObjSize" : 763,
        "storageSize" : 629633024,
        "numExtents" : 16,
        "nindexes" : 5,
        "lastExtentSize" : 168742912,
        "paddingFactor" : 1,
        "systemFlags" : 0,
        "userFlags" : 1,
        "totalIndexSize" : 102437104,
        "indexSizes" : {
                "_id_" : 86902704,
                "_modified_-1" : 15027488,
                "_bin_1" : 449680,
                "_deletedOnce_1" : 24528,
                "_sdType_1" : 32704
        },
        "ok" : 1
}
Chetan Mehrotra


On Fri, Aug 8, 2014 at 1:15 AM, Andrew Khoury <akhoury@adobe.com> wrote:
> Hi,
> What is the quickest and most efficient way to get the total number of nodes in an Oak
repository?  Is there a built in way or do I need to do a full traversal or query?
> Thanks,
> Andrew Khoury

Mime
View raw message