[ 
https://issues.apache.org/jira/browse/OAK-7832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16650789#comment-16650789
 ] 

Alexander Klimetschek edited comment on OAK-7832 at 10/15/18 9:04 PM:
----------------------------------------------------------------------

[~chetanm] Could you maybe take a look at the patch?

Some notes:
 * for the {{pn}} command I copied the toString code from NodeState et al into 
the new NodeStateHelper.java inside oak-run
 * for the {{export}} command I had to touch the JsonSerializer of 
oak-store-spi which I see is also used in other cases (possibly at runtime, not 
just oak-run utility), so I added a new flag "checkExceptions" which is off by 
default to trigger the new behavior. By default the class will behave as before 
and throw any exception (like SNFE).
 * A related improvement for the {{export}} would be to create one json file 
per page/asset/folder /jcr:content etc., especially if one is exporting larger 
trees. A single nodestate.json is hard to "browse" as a human. That's probably 
something for another issue I guess.


was (Author: alexander.klimetschek):
[~chetanm] Could you maybe take a look at the patch?

Some notes:
 * for the {{pn}} command I copied the toString code from NodeState et al into 
the new NodeStateHelper.java inside oak-run
 * for the {{export}} command I had to touch the JsonSerializer of 
oak-store-spi which I see is also used in other cases (possibly at runtime, not 
just oak-run utility), so I added a new flag "checkExceptions" which is off by 
default to trigger the new behavior. By default the class will behave as before 
and throw any exception (like SNFE).

> oak-run console export should handle exceptions such as missing segments
> ------------------------------------------------------------------------
>
>                 Key: OAK-7832
>                 URL: https://issues.apache.org/jira/browse/OAK-7832
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: run, store-spi
>            Reporter: Alexander Klimetschek
>            Priority: Major
>         Attachments: OAK-7832.patch, oak-run-1.8.9-SNAPSHOT.jar
>
>
> Problem: When trying to look at data using "pn" or running "export" oak-run 
> console currently will choke and abort the traversal on exceptions such as 
> SegmentNotFoundException.
> Expected: It would be nice if it would be best-effort, log the issue or embed 
> in the exported json, and just continue. This also ensures all missing 
> segments for a subtree are listed with one command (if it fails right now you 
> just see the first missing segment).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to