Chetan Mehrotra created OAK-1990:
------------------------------------
Summary: Utility js methods to manage Oak data in Mongo
Key: OAK-1990
URL: https://issues.apache.org/jira/browse/OAK-1990
Project: Jackrabbit Oak
Issue Type: New Feature
Components: mongomk
Reporter: Chetan Mehrotra
Assignee: Chetan Mehrotra
To simplify making sense of data created by Oak in Mongo it would be helpful to
have a collection of utility js methods. This method can then be used within
Mongo shell
As a start I have put up some methods in [1]. These can be used as shown below
{noformat}
$ wget
https://gist.githubusercontent.com/chetanmeh/836ca8fffc4c410daed2/raw/oak-mongo.js
$ mongo localhost/oak --shell oak-mongo.js
MongoDB shell version: 2.6.3
connecting to: localhost/oak
type "help" for help
> countChildren('/oak:index/')
356787
> getChildStats('/oak:index')
{ "count" : 356788, "size" : 127743372, "simple" : "121.83 MB" }
> getChildStats('/')
{ "count" : 593191, "size" : 302005011, "simple" : "288.01 MB" }
>
{noformat}
[1] https://gist.github.com/chetanmeh/836ca8fffc4c410daed2
--
This message was sent by Atlassian JIRA
(v6.2#6252)