May 15, 2020
Estimated Post Reading Time ~

Revealing Hidden Oak Nodes/Properties

Did you know there are properties you can’t see in your Apache Sling / Adobe Experience Manager repository? Jackrabbit OAK includes the concept of hidden nodes and properties. Hidden nodes and properties are prefixed with a colon and are not visible to consuming applications.

Examples include nestedCugs and:topCugCnt which are used to store the state of Jackrabbit Closed User Groups.

If you are lucky, you will never have to deal with hidden properties, but if you do, you should know that the Oak Run JAR includes a couple of very helpful utilities for revealing these properties.
  • Oak Run Console – Interactive CLI console for traversing down through the Jackrabbit Oak repository
  • Oak Run Explore – Java GUI tool for exploring the current state of the Jackrabbit repository
Both of these tools have similar functions but operate quite similarly. In my experience, the console is quicker whereas the GUI is easier to use.
Getting Oak Run
The first step to getting Oak Run is to find the version required for your Apache Sling / AEM instance. You can find it by checking the version of the Oak Core bundle:

http://localhost:4502/system/console/bundles?filter=(Bundle-SymbolicName=org.apache.jackrabbit.oak-core)


From there, you can download the correct version of the Oak Run jar from Maven:
https://search.maven.org/search?q=g:org.apache.jackrabbit%20AND%20a:oak-run&core=gav

Using Oak Run Console / Explore
Once you have the Jar downloaded copy it into the installation directory and then run the commands as such:

AEM: java -jar oak-run-[version].jar [command] crx-quickstart/repository/segmentstore

Sling CMS / Apache Sling: java -jar oak-run-[version].jar [command] sling/repository/segmentstore

Running the commands you will get a screen like the following.
Oak Run Explore


A few nice things you’ll notice in the explore GUI:
Tree view of the Oak repository
ALL nodes and properties including the hidden ones
Repository size by node tree
Oak Run Console


The console allows you to navigate the Oak repository like a filesystem and has a number of nifty commands. You can find out more by entering :h or :help.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.