jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Khoury <akho...@adobe.com>
Subject Re: How to get total nodes in Oak repo
Date Wed, 13 Aug 2014 14:36:32 GMT
Thanks Chetan, this really helped.

This was for a tar based deployment.  I want to count the the total nodes
including hidden ones under /oak:index branch and all.  So I wrote an
oak-run groovy console script that counts all nodes under the current
working node:
https://gist.github.com/andrewmkhoury/c5588a6a4b57e7e0e593


Please let me know if you see any issues with this.
-Andrew

On 8/8/14, 4:39 PM, "Andrew Khoury" <akhoury@adobe.com> wrote:

>Hi Chetan,
>How about for TarMK?  What is the quickest way to calculate total nodes?
>Thanks,
>Andrew
>
>On 8/7/14, 10:37 PM, "Chetan Mehrotra" <chetan.mehrotra@gmail.com> wrote:
>
>>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