Old Release

This documentation covers an old version of Fedora. Looking for another version? See all documentation.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

Walkthrough

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

The user uploads content:

mvn jetty:run -Dfcrepo.ispn.repo.CacheDirPath=/tmp/FedoraRepo -Dmodeshape.xx
curl -v -XPUT --upload-file X.txt http://localhost:8080/rest/X-1/ds0/fcr:content
curl -v -XPUT --upload-file X.jpg http://localhost:8080/rest/X-2/ds0/fcr:content

The directory layout would like this:

ls /tmp/FedoraRepo
---

Looking at the object node and the corresponding datastream:

87a0a8c7505d64/7org.infinispan.schematic.internal.SchematicEntryLiteral

6org.infinispan.marshall.jboss.JBossExternalizerAdapterq externalizer$org.infinispan.marshall.ExternalizerDorg.infinispan.schematic.internal.SchematicEntryLiteral$Externalizer7org.infinispan.schematic.internal.SchematicExternalizer8org.infinispan.schematic.internal.document.BasicDocument; ?org.infinispan.schematic.internal.document.DocumentExternalizer

;23metadata?id87a0a8c7505d64/contentTypeapplication/jsoncontent>propertiesghttp://www.jcp.org/jcr/1.0FprimaryType$name

mode:rootuuid

87a0a8c7505d64/children0<key87a0a8c317f1e7jcr:systemnamejcr:system1Skey3

87a0a8c7505d64

53f49a07-8e14-41a1-bab3-abc59d86846enamechandni

childrenInfocount55

287a0a8c7505d64

8e6504dd-1fb8-4011-8d38-4fcd2e46c0f77org.infinispan.schematic.internal.SchematicEntryLiteral

6org.infinispan.marshall.jboss.JBossExternalizerAdapterq externalizer$org.infinispan.marshall.ExternalizerDorg.infinispan.schematic.internal.SchematicEntryLiteral$Externalizer7org.infinispan.schematic.internal.SchematicExternalizer8org.infinispan.schematic.internal.document.BasicDocument; ?org.infinispan.schematic.internal.document.DocumentExternalizer;23metadatabid387a0a8c7505d64

8e6504dd-1fb8-4011-8d38-4fcd2e46c0f7

contentTypeapplication/jsoncontentkey

3

87a0a8c7505d64

8e6504dd-1fb8-4011-8d38-4fcd2e46c0f7

parent387a0a8c7505d64

 

46c11a1e-b2d9-496c-a950-5bd8cf7f2096

propertieshttp://www.jcp.org/jcr/1.0+primaryType$name nt:resourcedatachandni o meri chandni

 

lastModified.$date2013-12-05T18:52:00.714-05:00

mixinTypesL0D$name4{http://fedora.info/definitions/v4/rest-api#}binarylastModifiedBy bypassAdminmimeTypeapplication/octet-streamhttp://fedora.info/definitions/v4/rest-api#NdigestA$uri2urn:sha1:1c63b638cab226a394ea27819c18397dd96687fchttp://www.loc.gov/premis/rdf/v1#hasSize55

 

 

Configuration Options

File system Backends

LevelDB

Specifying fcrepo.ispn.repo.CacheDirPath=/tmp/FedoraRepo would result in a directory with LevelDB artifacts, such as files 000003.log.

Currently, the default configuration outputs Fedora data to LevelDB (a fast filesystem based key-value store). When Fedora 4 is started, ModeShape (actually Infinispan and LevelDB in the background) will create several directories on the filesystem. Currently, the directories created are:

  1. fcrepo.ispn.binary.CacheDirPath (binary data)
  2. fcrepo.ispn.CacheDirPath (metadata)
  3. fcrepo.ispn.repo.CacheDirPath (repository)
  4. fcrepo.modeshape.index.location

The layout of files in directories 1-3 is determined by LevelDB. Some of the important files are:

  1. File .log holds entries for recent transactions. The relevant API for representing these entries is modeshape-schematics (see, e.g.,  org.infinispan.schematic.SchematicEntry)
  2. File .sst stores these entries when the .log file reaches a size threshold. A new log file is generated.
  3. File MANIFEST.x records info about .sst files (among other things). 
  4. File CURRENT specifies the current MANIFEST file.

Most of these files are binary and can be read by a LevelDB Java library.

FileCacheStore
Specifying fcrepo.ispn.repo.CacheDirPath=/tmp/FedoraRepo would result in creating hundreds of binary files in that directory (e.g. 11333332.. , -2334002.. etc).

Using the Infinispan 6.x deprecated FileCacheStore (specified via file/infinispan.xml, currently our ModeShape is on 5.x) results in creation of hundreds of binary files (compared to LevelDB). A hashing algorithm is used to map keys to buckets. The value files contain serialized ModeShape objects. The key files can be read using org.infinispan.schematic.internal.document.BsonReader. (It does not seem possible to read these files using existing bson tools, like mongoDB bsondump, but further inspection is needed.)


  • No labels