Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

(question)  How does an admin determine which of the files listed in the directory above map to Fedora nodes? In other words, what is the algorithm for generating these filenames?

(question) The pasted text in boxes below need detailed description. They are not fully "self-evident".

TODO Need to re-generate files since object name/text was changed;

Walkthrough

The following steps simulate a typical user session. An end result (i.e a layout of file and directories) is then shown.

...

  • The file names in the case of FileCacheStore are just signed integers, so the usual and maximum length of file names is 10 or 11. The file names (i.e. integers) are generated by calculating the Java hashcode of the node's UUID string (and shifting it by 22 fixed bit mask). For example, for root node, file -891938816 gets generated, containing the root node children. 

  • Each of the files contain serialized ModeShape nodes. Although the generated files are binary, the data can be read using a tool that understands both BSON and JBoss serialization, or by using ModeShape API itself (It does not seem possible to read these files using existing bson tools, like mongoDB bsondump). Using a tool such as X can help in reading the contents of the file. For example, for our root node file (-891938816) , a tool could show the root node data as following:

    Code Block
    languagejs
    { "properties" : { "http://www.jcp.org/jcr/1.0" : { "primaryType" : { "$name" : "mode:root" } , "uuid" : "87a0a8c7505d64/" } } ,
     "children" : [ { "key" : "87a0a8c317f1e7jcr:system" , "name" : "jcr:system" } , 
    { "key" : "87a0a8c7505d646988a17a-ad2f-48f6-aef5-e7d411e184d9" , "name" : "chandni" } ] ,
     "childrenInfo" : { "count" : 2 } }

    As an aside, X would show the full file-node mapping as: 

    Code Block
    -891938816 UUID:87a0a8c7505d64 mode:root
    1036310528 UUID:    greetings_en
    -112221211 UUID:    hello, world!         
  • The serialization is done by a JBoss serialization library, not JDK's native object serialization machinery. For this reason the generated serialized files look different from an ordinary JDK serialized file. (Please refer to section on node contents for details.)

...