jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1781091 - in /jackrabbit/site/live/oak/docs: nodestore/documentmk.html nodestore/segment/overview.html nodestore/segment/tar.html nodestore/segment/tarmk-classes.html nodestore/segment/tarmk-classes.png query/query-engine.html
Date Tue, 31 Jan 2017 14:42:35 GMT
Author: thomasm
Date: Tue Jan 31 14:42:35 2017
New Revision: 1781091

URL: http://svn.apache.org/viewvc?rev=1781091&view=rev
Log:
OAK-936: Site checkin for project Oak Documentation-1.8-SNAPSHOT

Added:
    jackrabbit/site/live/oak/docs/nodestore/segment/tarmk-classes.html
    jackrabbit/site/live/oak/docs/nodestore/segment/tarmk-classes.png   (with props)
Modified:
    jackrabbit/site/live/oak/docs/nodestore/documentmk.html
    jackrabbit/site/live/oak/docs/nodestore/segment/overview.html
    jackrabbit/site/live/oak/docs/nodestore/segment/tar.html
    jackrabbit/site/live/oak/docs/query/query-engine.html

Modified: jackrabbit/site/live/oak/docs/nodestore/documentmk.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/nodestore/documentmk.html?rev=1781091&r1=1781090&r2=1781091&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/nodestore/documentmk.html (original)
+++ jackrabbit/site/live/oak/docs/nodestore/documentmk.html Tue Jan 31 14:42:35 2017
@@ -217,7 +217,7 @@
                 
                     
                   <li id="publishDate">Last Published: 2017-01-31</li>
-                  <li class="divider">|</li> <li id="projectVersion">Version:
1.6-SNAPSHOT</li>
+                  <li class="divider">|</li> <li id="projectVersion">Version:
1.8-SNAPSHOT</li>
                       
                 
                     
@@ -632,6 +632,9 @@ nodes
 <li>The cluster node id where this revision was created: <tt>-1</tt></li>
 </ul></div>
 <div class="section">
+<h2>Clock requirements<a name="Clock_requirements"></a></h2>
+<p>Revisions are used by the DocumentMK to identify the sequence of changes done on
items in the repository. This is also done across cluster nodes for revisions with different
cluster node ids. This requires the system clocks on the machines running Oak and the backend
system to approximately in sync. It is recommended to run an NTP daemon or some similar service
to keep the clock synchronized. Oak allows clock differences up to 2 seconds between the machine
where Oak is running and the machine where the backend store (MongoDB or RDBMS) is running.
Oak may refuse to start if it detects a larger clock difference. Clock differences between
the machines running in an Oak cluster will result in delayed propagation of changes between
cluster nodes and warnings in the log files.</p></div>
+<div class="section">
 <h2>Branches<a name="Branches"></a></h2>
 <p>DocumentMK implementations support branches, which allows a client to stage multiple
commits and make them visible with a single merge call. In DocumentMK a branch commit looks
very similar to a regular commit, but instead of setting the value of an entry in <tt>_revisions</tt>
to <tt>c</tt> (committed), it marks it with the base revision of the branch commit.
In contrast to regular commits where the commit root is the common ancestor of all nodes modified
in a commit, the commit root of a branch commit is always the root node. This is because a
branch will likely have multiple commits and a commit root must already be known when the
first commit happens on a branch. To make sure the following branch commits can use the same
commit root, DocumentMK simply picks the root node, which always works in this case.</p>
 <p>A root node may look like this:</p>

Modified: jackrabbit/site/live/oak/docs/nodestore/segment/overview.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/nodestore/segment/overview.html?rev=1781091&r1=1781090&r2=1781091&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/nodestore/segment/overview.html (original)
+++ jackrabbit/site/live/oak/docs/nodestore/segment/overview.html Tue Jan 31 14:42:35 2017
@@ -217,7 +217,7 @@
                 
                     
                   <li id="publishDate">Last Published: 2017-01-31</li>
-                  <li class="divider">|</li> <li id="projectVersion">Version:
1.6-SNAPSHOT</li>
+                  <li class="divider">|</li> <li id="projectVersion">Version:
1.8-SNAPSHOT</li>
                       
                 
                     
@@ -949,7 +949,8 @@ java -jar oak-run.jar tarmkdiff [--outpu
 <h2><a name="design"></a> Design<a name="Design"></a></h2>
 <p>The Segment Node Store serializes repository data and stores it in a set of TAR
files. These files are the most coarse-grained containers for the repository data. You can
learn more about the general structure of TAR files by reading <a href="tar.html">this
page</a>.</p>
 <p>Every TAR file contains segments, finer-grained containers of repository data. Unsurprisingly,
segments inspired the name of this Node Store implementation. Repository data is serialized
to one or more records, and these records are saved into the segments. You can learn about
the internal organization of segments and the different ways to serialize records by reading
<a href="records.html">this page</a>.</p>
-<p>This website also contains an overview of the legacy implementation of the Segment
Store and of the design decisions that brought to this implementation. The page is old and
describes a deprecated implementation, but can still be accessed <a href="../segmentmk.html">here</a>.</p>
+<p>See <a href="tarmk-classes.html">this page</a> for a high level design
overview of the TarMK.</p>
+<p>This page contains an overview of the legacy implementation of the Segment Store
and of the design decisions that brought to this implementation. The page is old and describes
a deprecated implementation, but can still be accessed <a href="../segmentmk.html">here</a>.</p>
 <div class="section">
 <h3><a name="format-changes"></a> Format changes<a name="Format_changes"></a></h3>
 <p>The Oak Segment Tar module introduces a number of changes in the data format compared
to the legacy Oak Segment. The changes are described in greater detail <a href="changes.html">here</a>.
Pointers to actual Jira issues can also be found on that page.</p></div></div>

Modified: jackrabbit/site/live/oak/docs/nodestore/segment/tar.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/nodestore/segment/tar.html?rev=1781091&r1=1781090&r2=1781091&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/nodestore/segment/tar.html (original)
+++ jackrabbit/site/live/oak/docs/nodestore/segment/tar.html Tue Jan 31 14:42:35 2017
@@ -217,7 +217,7 @@
                 
                     
                   <li id="publishDate">Last Published: 2017-01-31</li>
-                  <li class="divider">|</li> <li id="projectVersion">Version:
1.6-SNAPSHOT</li>
+                  <li class="divider">|</li> <li id="projectVersion">Version:
1.8-SNAPSHOT</li>
                       
                 
                     
@@ -580,7 +580,7 @@
 <p>binary references: this file has a name ending in <tt>.brf</tt> and
represents a  catalog of blobs (i.e. value records) referenced by segments in this TAR file.
 This catalog is indexed by the generation of the segments it contains.</p></li>
   
 <li>
-<p>graph: this file has a name ending in <tt>.gph</tt> and contains a representation
of a  graph. The graph is represented as an adjacency list of UUIDs.</p></li>
+<p>graph: this file has a name ending in <tt>.gph</tt> and contains the
segment graph  of all the segments in this tar file. The graph is represented as an adjacency
 list of UUIDs.</p></li>
   
 <li>
 <p>index: this file has a name ending in <tt>.idx</tt> and contains a sorted
list of  every segment contained in the TAR file.</p></li>

Added: jackrabbit/site/live/oak/docs/nodestore/segment/tarmk-classes.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/nodestore/segment/tarmk-classes.html?rev=1781091&view=auto
==============================================================================
--- jackrabbit/site/live/oak/docs/nodestore/segment/tarmk-classes.html (added)
+++ jackrabbit/site/live/oak/docs/nodestore/segment/tarmk-classes.html Tue Jan 31 14:42:35
2017
@@ -0,0 +1,553 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2017-01-31
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20170131" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Jackrabbit Oak - Design of the TarMK</title>
+    <link rel="stylesheet" href="../../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../../css/site.css" />
+    <link rel="stylesheet" href="../../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+    
+            </head>
+        <body class="topBarEnabled">
+          
+    
+    
+            
+    
+    
+    <a href="http://github.com/apache/jackrabbit-oak">
+      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
+        alt="Fork me on GitHub">
+    </a>
+  
+                
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+                <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+                
+                                                                                <a class="brand"
href="../../"  title="Oak logo">
+
+                                
+                                                                                        
                           <img src="../../oak_logo.png" alt="Oak logo" />
+                
+                </a>
+                    
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Overview <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../index.html"  title="Jackrabbit Oak">Jackrabbit
Oak</a>
+</li>
+                  
+                      <li>      <a href="../../license.html"  title="License">License</a>
+</li>
+                  
+                      <li>      <a href="../../downloads.html"  title="Downloads">Downloads</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Concepts and Architecture
<b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../architecture/overview.html"  title="Overview">Overview</a>
+</li>
+                  
+                      <li>      <a href="../../architecture/nodestate.html"  title="The
Node State Model">The Node State Model</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Main APIs <b
class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.day.com/specs/jcr/2.0/index.html"
 title="JCR API">JCR API</a>
+</li>
+                  
+                      <li>      <a href="../../oak_api/overview.html"  title="Oak
API">Oak API</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Features and Plugins
<b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../features/atomic-counter.html"  title="Atomic
Counter">Atomic Counter</a>
+</li>
+                  
+                      <li>      <a href="../../plugins/blobstore.html"  title="Blob
Storage">Blob Storage</a>
+</li>
+                  
+                      <li>      <a href="../../clustering.html"  title="Clustering">Clustering</a>
+</li>
+                  
+                      <li>      <a href="../../nodestore/documentmk.html"  title="DocumentNodeStore">DocumentNodeStore</a>
+</li>
+                  
+                      <li>      <a href="../../nodestore/overview.html"  title="Node
Storage">Node Storage</a>
+</li>
+                  
+                      <li>      <a href="../../nodestore/persistent-cache.html"
 title="Persistent Cache">Persistent Cache</a>
+</li>
+                  
+                      <li>      <a href="../../query/query.html"  title="Query">Query</a>
+</li>
+                  
+                      <li>      <a href="../../security/overview.html"  title="Security">Security</a>
+</li>
+                  
+                      <li>      <a href="../../nodestore/segment/overview.html"
 title="Segment Node Store">Segment Node Store</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Using Oak <b
class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../use_getting_started.html"  title="Getting
Started">Getting Started</a>
+</li>
+                  
+                      <li>      <a href="../../construct.html"  title="Repository
Construction">Repository Construction</a>
+</li>
+                  
+                      <li>      <a href="../../osgi_config.html"  title="Configuring
Oak">Configuring Oak</a>
+</li>
+                  
+                      <li>      <a href="../../command_line.html"  title="Command
Line Tools">Command Line Tools</a>
+</li>
+                  
+                      <li>      <a href="../../migration.html"  title="Migration">Migration</a>
+</li>
+                  
+                      <li>      <a href="../../differences.html"  title="Differences
to Jackrabbit 2">Differences to Jackrabbit 2</a>
+</li>
+                  
+                      <li>      <a href="../../known_issues.html"  title="Known
Issues">Known Issues</a>
+</li>
+                  
+                      <li>      <a href="../../dos_and_donts.html"  title="Dos and
Don'ts">Dos and Don'ts</a>
+</li>
+                  
+                      <li>      <a href="../../coldstandby/coldstandby.html"  title="Cold
Standby">Cold Standby</a>
+</li>
+                  
+                      <li>      <a href="../../FAQ.html"  title="FAQ">FAQ</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Developing Oak <b
class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../../dev_getting_started.html"  title="Getting
Started">Getting Started</a>
+</li>
+                  
+                      <li>      <a href="../../participating.html"  title="Participating">Participating</a>
+</li>
+                  
+                      <li>      <a href="../../developing-with-git.html"  title="Developing
with Git">Developing with Git</a>
+</li>
+                  
+                      <li>      <a href="../../diagnostic-builds.html"  title="Cutting
diagnostic builds">Cutting diagnostic builds</a>
+</li>
+                  
+                      <li>      <a href="../../attribution.html"  title="Attribution">Attribution</a>
+</li>
+                  
+                      <li>      <a href="../../release-schedule.html"  title="Release
Schedule">Release Schedule</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Links <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://jackrabbit.apache.org/oak"  title="Apache
Jackrabbit Oak">Apache Jackrabbit Oak</a>
+</li>
+                  
+                      <li>      <a href="http://jackrabbit.apache.org/"  title="Apache
Jackrabbit">Apache Jackrabbit</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+          
+          
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                <div id="bannerLeft">
+                <h2>Oak Documentation</h2>
+                </div>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2017-01-31</li>
+                  <li class="divider">|</li> <li id="projectVersion">Version:
1.8-SNAPSHOT</li>
+                      
+                
+                    
+      
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Overview</li>
+                                
+      <li>
+    
+                          <a href="../../index.html" title="Jackrabbit Oak">
+          <i class="none"></i>
+        Jackrabbit Oak</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../license.html" title="License">
+          <i class="none"></i>
+        License</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../downloads.html" title="Downloads">
+          <i class="none"></i>
+        Downloads</a>
+            </li>
+                              <li class="nav-header">Concepts and Architecture</li>
+                                
+      <li>
+    
+                          <a href="../../architecture/overview.html" title="Overview">
+          <i class="none"></i>
+        Overview</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../architecture/nodestate.html" title="The Node
State Model">
+          <i class="none"></i>
+        The Node State Model</a>
+            </li>
+                              <li class="nav-header">Main APIs</li>
+                                
+      <li>
+    
+                          <a href="http://www.day.com/specs/jcr/2.0/index.html" class="externalLink"
title="JCR API">
+          <i class="none"></i>
+        JCR API</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../oak_api/overview.html" title="Oak API">
+          <i class="none"></i>
+        Oak API</a>
+            </li>
+                              <li class="nav-header">Features and Plugins</li>
+                                
+      <li>
+    
+                          <a href="../../features/atomic-counter.html" title="Atomic Counter">
+          <i class="none"></i>
+        Atomic Counter</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../plugins/blobstore.html" title="Blob Storage">
+          <i class="none"></i>
+        Blob Storage</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../clustering.html" title="Clustering">
+          <i class="none"></i>
+        Clustering</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../nodestore/documentmk.html" title="DocumentNodeStore">
+          <i class="none"></i>
+        DocumentNodeStore</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../nodestore/overview.html" title="Node Storage">
+          <i class="none"></i>
+        Node Storage</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../nodestore/persistent-cache.html" title="Persistent
Cache">
+          <i class="none"></i>
+        Persistent Cache</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../query/query.html" title="Query">
+          <i class="none"></i>
+        Query</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../security/overview.html" title="Security">
+          <i class="none"></i>
+        Security</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../nodestore/segment/overview.html" title="Segment
Node Store">
+          <i class="none"></i>
+        Segment Node Store</a>
+            </li>
+                              <li class="nav-header">Using Oak</li>
+                                
+      <li>
+    
+                          <a href="../../use_getting_started.html" title="Getting Started">
+          <i class="none"></i>
+        Getting Started</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../construct.html" title="Repository Construction">
+          <i class="none"></i>
+        Repository Construction</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../osgi_config.html" title="Configuring Oak">
+          <i class="none"></i>
+        Configuring Oak</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../command_line.html" title="Command Line Tools">
+          <i class="none"></i>
+        Command Line Tools</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../migration.html" title="Migration">
+          <i class="none"></i>
+        Migration</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../differences.html" title="Differences to Jackrabbit
2">
+          <i class="none"></i>
+        Differences to Jackrabbit 2</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../known_issues.html" title="Known Issues">
+          <i class="none"></i>
+        Known Issues</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../dos_and_donts.html" title="Dos and Don'ts">
+          <i class="none"></i>
+        Dos and Don'ts</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../coldstandby/coldstandby.html" title="Cold Standby">
+          <i class="none"></i>
+        Cold Standby</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../FAQ.html" title="FAQ">
+          <i class="none"></i>
+        FAQ</a>
+            </li>
+                              <li class="nav-header">Developing Oak</li>
+                                
+      <li>
+    
+                          <a href="../../dev_getting_started.html" title="Getting Started">
+          <i class="none"></i>
+        Getting Started</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../participating.html" title="Participating">
+          <i class="none"></i>
+        Participating</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../developing-with-git.html" title="Developing with
Git">
+          <i class="none"></i>
+        Developing with Git</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../diagnostic-builds.html" title="Cutting diagnostic
builds">
+          <i class="none"></i>
+        Cutting diagnostic builds</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../attribution.html" title="Attribution">
+          <i class="none"></i>
+        Attribution</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../../release-schedule.html" title="Release Schedule">
+          <i class="none"></i>
+        Release Schedule</a>
+            </li>
+                              <li class="nav-header">Links</li>
+                                
+      <li>
+    
+                          <a href="http://jackrabbit.apache.org/oak" class="externalLink"
title="Apache Jackrabbit Oak">
+          <i class="none"></i>
+        Apache Jackrabbit Oak</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="http://jackrabbit.apache.org/" class="externalLink"
title="Apache Jackrabbit">
+          <i class="none"></i>
+        Apache Jackrabbit</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                   
+    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
+
+    
+    <div class="g-plusone" data-href="http://jackrabbit.apache.org/oak/docs/" data-size="tall"
></div>
+
+                   <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/" title="Built by Maven"
class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" src="../../images/logos/maven-feather.png"
/>
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. --><h1>Design of the TarMK</h1>
+<p>This section gives a high level overview of the TarMK design, its most important
classes, their purpose and relationship. More in depth information is available from the Javadoc
of the individual classes. </p>
+<div class="section">
+<h2>Overview<a name="Overview"></a></h2>
+<p><img src="tarmk-classes.png" alt="Overview of a TAR file" /></p>
+<p>The <tt>SegmentNodeStore</tt> is the TarMK&#x2019;s implementation
of the <a href="../overview.html">NodeStore API</a>. It uses a <tt>Revisions</tt>
instance for accessing and setting the current head state, a <tt>SegmentReader</tt>
for reading records from segments, a <tt>SegmentWriter</tt> for writing records
to segments and a <tt>BlobStore</tt> for reading and writing binaries. </p>
+<p>The <tt>SegmentStore</tt> serves as a persistence backend for the <tt>SegmentNodeStore</tt>.
It is responsible for providing concrete implementations of <tt>Revisions</tt>,
<tt>SegmentReader</tt> and <tt>BlobStore</tt> to the former. </p>
+<p>The <tt>FileStore</tt> is the implementation the <tt>SegmentStore</tt>
that persists segments in tar files. The <tt>MemoryStore</tt> (not shown above)
is an alternative implementation, which stores the segments in memory only. It is used for
testing. </p></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2012-2017
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+        
+        
+          
+    
+    
+                
+    <div id="ohloh" class="pull-right">
+      <script type="text/javascript" src="http://www.ohloh.net/p/jackrabbit-oak/widgets/project_thin_badge.js"></script>
+    </div>
+        </div>
+    </footer>
+  </body>
+</html>
\ No newline at end of file

Added: jackrabbit/site/live/oak/docs/nodestore/segment/tarmk-classes.png
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/nodestore/segment/tarmk-classes.png?rev=1781091&view=auto
==============================================================================
Binary file - no diff available.

Propchange: jackrabbit/site/live/oak/docs/nodestore/segment/tarmk-classes.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: jackrabbit/site/live/oak/docs/query/query-engine.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/query/query-engine.html?rev=1781091&r1=1781090&r2=1781091&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/query/query-engine.html (original)
+++ jackrabbit/site/live/oak/docs/query/query-engine.html Tue Jan 31 14:42:35 2017
@@ -217,7 +217,7 @@
                 
                     
                   <li id="publishDate">Last Published: 2017-01-31</li>
-                  <li class="divider">|</li> <li id="projectVersion">Version:
1.6-SNAPSHOT</li>
+                  <li class="divider">|</li> <li id="projectVersion">Version:
1.8-SNAPSHOT</li>
                       
                 
                     
@@ -521,6 +521,37 @@
 <p>Oak does not index as much content by default as does Jackrabbit 2. You need to
create custom indexes when necessary, much like in traditional RDBMSs. If there is no index
for a specific query, then the repository will be traversed. That is, the query will still
work but probably be very slow.</p>
 <p>Query Indices are defined under the <tt>oak:index</tt> node.</p>
 <div class="section">
+<h3>Query Processing<a name="Query_Processing"></a></h3>
+<p>Internally, the query engine uses a cost based query optimizer that asks all the
available query indexes for the estimated cost to process the query. It then uses the index
with the lowest cost.</p>
+<p>By default, the following indexes are available:</p>
+
+<ul>
+  
+<li>A property index for each indexed property.</li>
+  
+<li>A full-text index which is based on Apache Lucene / Solr.</li>
+  
+<li>A node type index (which is based on an property index for the properties  jcr:primaryType
and jcr:mixins).</li>
+  
+<li>A traversal index that iterates over a subtree.</li>
+</ul>
+<p>If no index can efficiently process the filter condition, the nodes in the repository
are traversed at the given subtree.</p>
+<p>Usually, data is read from the index and repository while traversing over the query
result. There are exceptions however, where all data is read in memory when the query is executed.
The most common case is when using an <tt>order by</tt> clause and the index can
not provide a sorted result. There are other cases where paths of the results read so far
are kept in memory, in order to not return duplicate results. This is the case when using
<tt>or</tt> conditions such that two indexes are used (internally a <tt>union</tt>
query is executed).</p>
+<p>If you enable debug logging for the module <tt>org.apache.jackrabbit.oak.query</tt>,
you may see this:</p>
+
+<div class="source">
+<pre>cost for nodeType is 1638354.0
+cost for property is 2.0
+cost for traverse is 3451100.0
+</pre></div>
+<p>This means the cost for the nodetype index <i>would</i> be about 1638354.0,
the cost for the property index <i>would</i> be about 2, and the cost for traversal
<i>would</i> be about 3451100.0. An index that can&#x2019;t deal with a certain
condition will return the cost &#x201c;Infinity&#x201d;. It doesn&#x2019;t say
traversal is actually used, it just lists the expected costs. The query engine will then pick
the index with the lowest expected cost, which is (in the case above) &#x201c;property&#x201d;.</p>
+<p>The expected cost for traversal is, with Oak 1.0.x, really just a guess looking
at the length of the path. With Oak 1.2 and newer, the &#x201c;counter&#x201d; index
is used (see mainly OAK-1907). There is an known issue with this, if you add and remove a
lot of nodes in a loop, you could end up with a too-low cost, see OAK-4065.</p>
+<div class="section">
+<h4>Cost Calculation<a name="Cost_Calculation"></a></h4>
+<p>Each query index is expected to estimate the worst-case cost to query with the given
filter. The returned value is between 1 (very fast; lookup of a unique node) and the estimated
number of entries to traverse, if the cursor would be fully read, and if there could in theory
be one network round-trip or disk read operation per node (this method may return a lower
number if the data is known to be fully in memory).</p>
+<p>The returned value is supposed to be an estimate and doesn&#x2019;t have to
be very accurate. Please note this method is called on each index whenever a query is run,
so the method should be reasonably fast (not read any data itself, or at least not read too
much data).</p>
+<p>If an index implementation can not query the data, it has to return <tt>Infinity</tt>
(<tt>Double.POSITIVE_INFINITY</tt>).</p></div></div>
+<div class="section">
 <h3>Compatibility<a name="Compatibility"></a></h3>
 <div class="section">
 <h4>Result Size<a name="Result_Size"></a></h4>
@@ -686,7 +717,8 @@ if (it.hasNext()) {
 <p>The <tt>suggestions</tt> String would be have the following pattern
<tt>\[\{(term\=)[\w|\W]+(\,weight\=)\d+\}(\,\{(term\=)[\w|\W]+(\,weight\=)\d+\})*\]</tt>,
e.g.:</p>
 
 <div class="source">
-<pre>[{term=in 2015 a red fox is still a fox,weight=1.5}, {term=in 2015 my fox is red,
like mike's fox and john's fox,weight=0.7}]
+<pre>[{term=in 2015 a red fox is still a fox,weight=1.5}, {term=in 2015 my fox is red,

+like mike's fox and john's fox,weight=0.7}]
 </pre></div>
 <p><tt>@since Oak 1.3.11, 1.2.14</tt> each suggestion would be returned
per row.</p>
 
@@ -737,32 +769,6 @@ org.apache.jackrabbit.oak.query.QueryEng
 <p><i>Each transformed SQL2 query contains the original XPath query as a comment.</i></p>
 <p>When converting from XPath to SQL-2, <tt>or</tt> conditions are automatically
converted to <tt>union</tt> queries, so that indexes can be used for conditions
of the form <tt>a = 'x' or b = 'y'</tt>.</p></div>
 <div class="section">
-<h3>Query Processing<a name="Query_Processing"></a></h3>
-<p>Internally, the query engine uses a cost based query optimizer that asks all the
available query indexes for the estimated cost to process the query. It then uses the index
with the lowest cost.</p>
-<p>By default, the following indexes are available:</p>
-
-<ul>
-  
-<li>A property index for each indexed property.</li>
-  
-<li>A full-text index which is based on Apache Lucene / Solr.</li>
-  
-<li>A node type index (which is based on an property index for the properties  jcr:primaryType
and jcr:mixins).</li>
-  
-<li>A traversal index that iterates over a subtree.</li>
-</ul>
-<p>If no index can efficiently process the filter condition, the nodes in the repository
are traversed at the given subtree.</p>
-<p>Usually, data is read from the index and repository while traversing over the query
result. There are exceptions however, where all data is read in memory when the query is executed.
The most common case is when using an <tt>order by</tt> clause and the index can
not provide a sorted result. There are other cases where paths of the results read so far
are kept in memory, in order to not return duplicate results. This is the case when using
<tt>or</tt> conditions such that two indexes are used (internally a <tt>union</tt>
query is executed).</p>
-<p>If you enable debug logging for the module <tt>org.apache.jackrabbit.oak.query</tt>,
you may see this:</p>
-
-<div class="source">
-<pre>cost for nodeType is 1638354.0
-cost for property is 2.0
-cost for traverse is 3451100.0
-</pre></div>
-<p>This means the cost for the nodetype index <i>would</i> be about 1638354.0,
the cost for the property index <i>would</i> be about 2, and the cost for traversal
<i>would</i> be about 3451100.0. It doesn&#x2019;t say traversal is actually
used, it just lists the expected costs. The query engine will then pick the index with the
lowest expected cost, which is (in the case above) &#x201c;property&#x201d;.</p>
-<p>The expected cost for traversal is, with Oak 1.0.x, really just a guess looking
at the length of the path. With Oak 1.2 and newer, the &#x201c;counter&#x201d; index
is used (see mainly OAK-1907). There is an known issue with this, if you add and remove a
lot of nodes in a loop, you could end up with a too-low cost, see OAK-4065.</p></div>
-<div class="section">
 <h3>The Node Type Index<a name="The_Node_Type_Index"></a></h3>
 <p>The <tt>NodeTypeIndex</tt> implements a <tt>QueryIndex</tt>
using <tt>PropertyIndexLookup</tt>s on <tt>jcr:primaryType</tt> <tt>jcr:mixinTypes</tt>
to evaluate a node type restriction on the filter. The cost for this index is the sum of the
costs of the <tt>PropertyIndexLookup</tt> for queries on <tt>jcr:primaryType</tt>
and <tt>jcr:mixinTypes</tt>.</p></div>
 <div class="section">
@@ -774,11 +780,6 @@ cost for traverse is 3451100.0
 <p>For help on migrating to a Lucece index please refer to: <a href="ordered-index-migrate.html">Migrate
ordered index</a></p>
 <p>For historical information around the index please refer to: <a href="ordered-index.html">Ordered
Index</a>.</p></div>
 <div class="section">
-<h3>Cost Calculation<a name="Cost_Calculation"></a></h3>
-<p>Each query index is expected to estimate the worst-case cost to query with the given
filter. The returned value is between 1 (very fast; lookup of a unique node) and the estimated
number of entries to traverse, if the cursor would be fully read, and if there could in theory
be one network round-trip or disk read operation per node (this method may return a lower
number if the data is known to be fully in memory).</p>
-<p>The returned value is supposed to be an estimate and doesn&#x2019;t have to
be very accurate. Please note this method is called on each index whenever a query is run,
so the method should be reasonably fast (not read any data itself, or at least not read too
much data).</p>
-<p>If an index implementation can not query the data, it has to return <tt>Double.POSITIVE_INFINITY</tt>.</p></div>
-<div class="section">
 <h3>Index storage and manual inspection<a name="Index_storage_and_manual_inspection"></a></h3>
 <p>Sometimes there is a need to inspect the index content for debugging (or pure curiosity).
The index content is generally stored as content under the index definition as hidden nodes
(this doesn&#x2019;t apply to the solr index). In order to be able to browse down into
an index content you need a low level repository tool that allows NodeStore level access.
There are currently 2 options: the oak-console (command line tool, works will all existing
NodeStore implementations) and the oak-explorer (gui based on java swing, works only with
the SegmentNodeStore), both available as run modes of the <a class="externalLink" href="https://github.com/apache/jackrabbit-oak/blob/trunk/oak-run/README.md">oak-run</a>
module</p>
 <p>The structure of the index is specific to each implementation and is subject to
change. What is worth mentioning is that all the <i>*PropertyIndex</i> flavors
store the content as unstructured nodes (clear readable text), the <i>Lucene</i>
index is stored as binaries, so one would need to export the entire Lucene directory to the
local file system and browse it using a dedicated tool.</p></div>



Mime
View raw message