You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2015/02/04 10:58:35 UTC
[jira] [Resolved] (OAK-1990) Utility js methods to manage Oak data
in Mongo
[ https://issues.apache.org/jira/browse/OAK-1990?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chetan Mehrotra resolved OAK-1990.
----------------------------------
Resolution: Fixed
Fix Version/s: 1.1.6
Resolving this issue now as oak-mongo.js has some real useful methods now. Later changes to that can be done under dedicated issues
> 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
> Fix For: 1.1.6
>
> Attachments: oak-mongo.js
>
>
> 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
> > oak.countChildren('/oak:index/')
> 356787
> > oak.getChildStats('/oak:index')
> { "count" : 356788, "size" : 127743372, "simple" : "121.83 MB" }
> > oak.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.3.4#6332)