You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by gi...@apache.org on 2022/08/17 13:48:43 UTC
[directory-site] branch asf-site updated: Updated site from master (7b1ec1a7fa1b1ac54fb4af3342f5dd142e186832)
This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/directory-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new b8dd312c Updated site from master (7b1ec1a7fa1b1ac54fb4af3342f5dd142e186832)
b8dd312c is described below
commit b8dd312c4b97a94b7f464e43089998cd96807bc1
Author: jenkins <bu...@apache.org>
AuthorDate: Wed Aug 17 13:48:39 2022 +0000
Updated site from master (7b1ec1a7fa1b1ac54fb4af3342f5dd142e186832)
---
content/apacheds/developer-guide.html | 8 +-
content/apacheds/download/download-sources.html | 2 +-
content/apacheds/index.xml | 2 +-
content/index.xml | 13 +-
content/mavibot/index.xml | 11 +
.../mavibot/user-guide-v1/1-initialization.html | 319 +++++++++++++++++++++
content/sitemap.xml | 13 +-
7 files changed, 357 insertions(+), 11 deletions(-)
diff --git a/content/apacheds/developer-guide.html b/content/apacheds/developer-guide.html
index fa456719..c8e1889e 100644
--- a/content/apacheds/developer-guide.html
+++ b/content/apacheds/developer-guide.html
@@ -235,7 +235,7 @@ gpg --fingerprint
gpg --keyserver subkeys.pgp.net --send-keys <your key<span style="">'</span>s id from last command>
</code></pre></div><DIV class="info" markdown="1">
Make sure to have created the .pgpkey in your <em>p.a.o/~</em> directory and to have added your public key to the <b>KEYS</b> file.
-See also http://people.apache.org/~henkp/repo/faq.html#4
+See also https://people.apache.org/~henkp/repo/faq.html#4
</DIV>
<h3 id="releasing-apacheds-1">Releasing ApacheDS</h3>
<p>Now that your environment has been setup, we will show you how to build and release the ApacheDS subproject. Keep an eye out for warnings and note sections that show version specific differences in this process.</p>
@@ -246,7 +246,7 @@ See also http://people.apache.org/~henkp/repo/faq.html#4
<h5 id="update-serviceapachedssh-and-serviceapachedsbat">Update service/apacheds.sh and service/apacheds.bat</h5>
<p>Edit the <em>apacheds.sh/bat</em> files in the service project directory to update the revision numbers used in that file to reference non-SNAPSHOT releases.</p>
<h4 id="release-process">Release process</h4>
-<p>Since we are using Nexus for releases the release process is as follows (see also <a href="http://www.apache.org/dev/publishing-maven-artifacts.html#staging-maven">Publishing maven artifacts</a>.</p>
+<p>Since we are using Nexus for releases the release process is as follows (see also <a href="https://www.apache.org/dev/publishing-maven-artifacts.html#staging-maven">Publishing maven artifacts</a>.</p>
<h5 id="test-the-project">Test the Project</h5>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ mvn release:prepare -DdryRun<span style="color:#666">=</span><span style="color:#a2f">true</span>
</code></pre></div><p>Replace the version by the new version. Be careful, and remove the ‘apacheds-parent-’ which is proposed for the new tag. We should just use the version number.</p>
@@ -256,7 +256,7 @@ See also http://people.apache.org/~henkp/repo/faq.html#4
<h5 id="prepare-the-release">Prepare the Release</h5>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ mvn release:clean
$ mvn release:prepare
-</code></pre></div><p>This creates a tag <a href="http://svn.apache.org/viewvc/directory/apacheds/tags/">here</a></p>
+</code></pre></div><p>This creates a tag <a href="https://svn.apache.org/viewvc/directory/apacheds/tags/">here</a></p>
<h5 id="stage-the-release">Stage the Release</h5>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ mvn release:perform -Darguments<span style="color:#666">=</span><span style="color:#b44">"-DskipTests"</span>
</code></pre></div><p>This deploys the release to a staging repository. Go to <a href="https://repository.apache.org/index.html#stagingRepositories">Staging Repositories</a> and close the staging repository.</p>
@@ -415,7 +415,7 @@ $ svn co https://dist.apache.org/repos/dist/release/directory/apacheds/dist ~/ap
...
<span style="color:#080;font-style:italic"># exit</span>
$
-</code></pre></div><p>The packages should now be available on <a href="http://www.us.apache.org/dist/directory/apacheds/dist/">http://www.us.apache.org/dist/directory/apacheds/dist/</a><version></p>
+</code></pre></div><p>The packages should now be available on <a href="https://www.apache.org/dist/directory/apacheds/dist/">https://www.apache.org/dist/directory/apacheds/dist/</a><version></p>
<h5 id="deploy-the-javadocs-and-xref">Deploy the Javadocs and XRef</h5>
<p>We now can deploy the generated Javadoc and cross-reference pages. They are generated in the following directory :</p>
<pre><code>target/checkout/target/site
diff --git a/content/apacheds/download/download-sources.html b/content/apacheds/download/download-sources.html
index 9164d29c..a74d5fcb 100644
--- a/content/apacheds/download/download-sources.html
+++ b/content/apacheds/download/download-sources.html
@@ -151,7 +151,7 @@
</a>
</td>
<td align="right">
- [<a href="https://downloads.apache.org/directory/apacheds/dist/2.0.0.AM26/apacheds-parent-2.0.0.AM26-source-release.zip.asc">ASC</a>-<a href="https://downloads.apache.org/directory/apacheds/dist/2.0.0.AM26/apacheds-parent-2.0.0.AM26-source-release.zip.sha256">SHA256</a>-<a href="https://downloads.apache.org/directory/apacheds/dist/2.0.0.AM26/apacheds-parent-2.0.0.AM26-source-release.zip.sha512">SHA512</a>]
+ [<a href="https://downloads.apache.org/directory/apacheds/dist/2.0.0.AM26/apacheds-parent-2.0.0.AM26-source-release.zip.asc">ASC</a>-<a href="https://downloads.apache.org/directory/apacheds/dist/2.0.0.AM26/apacheds-parent-2.0.0.AM26-source-release.zip.sha512">SHA512</a>]
</td>
</tr>
</table>
diff --git a/content/apacheds/index.xml b/content/apacheds/index.xml
index d1dcdf78..8d2b0614 100644
--- a/content/apacheds/index.xml
+++ b/content/apacheds/index.xml
@@ -1432,7 +1432,7 @@ Versioning Scheme The version number of ApacheDS has the following form:
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://directory.apache.org/apacheds/download/download-sources.html</guid>
- <description>Download for Sources [if-any logo] [end] We suggest the following mirror site for your download: &nbsp; [preferred]/&#91;...&#93;/apacheds-parent-2.0.0.AM26-source-release.zip [ASC-SHA256-SHA512] &nbsp;
+ <description>Download for Sources [if-any logo] [end] We suggest the following mirror site for your download: &nbsp; [preferred]/&#91;...&#93;/apacheds-parent-2.0.0.AM26-source-release.zip [ASC-SHA512] &nbsp;
Other mirrors: [if-any http] [for http][http][end] [end] [if-any ftp] [for ftp][ftp][end] [end] [if-any backup] [for backup][backup] (backup)[end] [end] We encourage you to verify the integrity of the downloaded file using: the ASC file (OpenPGP compatible signature) with the KEYS file (code signing keys used to sign the product) the SHA256 or SHA512 files (checksum).</description>
</item>
diff --git a/content/index.xml b/content/index.xml
index 342a2c9f..efc655e5 100644
--- a/content/index.xml
+++ b/content/index.xml
@@ -122,6 +122,17 @@ $ cd kerby-dist/kdc-dist $ sh bin/kdcinit.</description>
Hopefully there&rsquo;s enough here to get you started &ndash; quickly. If you feel like improving this document or have questions / suggestions, please post to the Apache Directory LDAP API mailing list.</description>
</item>
+ <item>
+ <title>1 - Introduction</title>
+ <link>https://directory.apache.org/mavibot/user-guide-v1/1-initialization.html</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://directory.apache.org/mavibot/user-guide-v1/1-initialization.html</guid>
+ <description>Mavibot initialization The very first step when using Mavibot is to initialize it. That means creating the database that will contain all the data (we use only one file for that).
+This is done with a simple call, with one or 3 parameters:
+RecordManager recordManager1 = new RecordManager( &#34;MyData.db&#34; ); // or RecordManager recordManager2 = new RecordManager( &#34;MyData.db&#34;, 512, 1024 ); The first method just require that you name the file that will contain the data (&ldquo;MyData.</description>
+ </item>
+
<item>
<title>1 - Introduction</title>
<link>https://directory.apache.org/mavibot/user-guide/1-introduction.html</link>
@@ -3506,7 +3517,7 @@ Introduction Studio is an Eclipse&amp;tm; RCP application, which can also be
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://directory.apache.org/apacheds/download/download-sources.html</guid>
- <description>Download for Sources [if-any logo] [end] We suggest the following mirror site for your download: &nbsp; [preferred]/&#91;...&#93;/apacheds-parent-2.0.0.AM26-source-release.zip [ASC-SHA256-SHA512] &nbsp;
+ <description>Download for Sources [if-any logo] [end] We suggest the following mirror site for your download: &nbsp; [preferred]/&#91;...&#93;/apacheds-parent-2.0.0.AM26-source-release.zip [ASC-SHA512] &nbsp;
Other mirrors: [if-any http] [for http][http][end] [end] [if-any ftp] [for ftp][ftp][end] [end] [if-any backup] [for backup][backup] (backup)[end] [end] We encourage you to verify the integrity of the downloaded file using: the ASC file (OpenPGP compatible signature) with the KEYS file (code signing keys used to sign the product) the SHA256 or SHA512 files (checksum).</description>
</item>
diff --git a/content/mavibot/index.xml b/content/mavibot/index.xml
index a76640bb..7d0a4b96 100644
--- a/content/mavibot/index.xml
+++ b/content/mavibot/index.xml
@@ -19,6 +19,17 @@
<description>title: 5 - Mavibot B-tree information navUp: ../user-guide.html navUpText: User Guide navNext: 6-btree-configuration.html navNextText: 6 - Mavibot B-tree configuration navPrev: 4-btree-operations.html navPrevText: 4 - Mavibot B-tree operations 5 - Mavibot B-tree information TODO</description>
</item>
+ <item>
+ <title>1 - Introduction</title>
+ <link>https://directory.apache.org/mavibot/user-guide-v1/1-initialization.html</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://directory.apache.org/mavibot/user-guide-v1/1-initialization.html</guid>
+ <description>Mavibot initialization The very first step when using Mavibot is to initialize it. That means creating the database that will contain all the data (we use only one file for that).
+This is done with a simple call, with one or 3 parameters:
+RecordManager recordManager1 = new RecordManager( &#34;MyData.db&#34; ); // or RecordManager recordManager2 = new RecordManager( &#34;MyData.db&#34;, 512, 1024 ); The first method just require that you name the file that will contain the data (&ldquo;MyData.</description>
+ </item>
+
<item>
<title>1 - Introduction</title>
<link>https://directory.apache.org/mavibot/user-guide/1-introduction.html</link>
diff --git a/content/mavibot/user-guide-v1/1-initialization.html b/content/mavibot/user-guide-v1/1-initialization.html
new file mode 100644
index 00000000..911d5d80
--- /dev/null
+++ b/content/mavibot/user-guide-v1/1-initialization.html
@@ -0,0 +1,319 @@
+<!DOCTYPE html>
+
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>1 - Introduction — Apache Directory</title>
+
+ <link href="/css/common.css" rel="stylesheet" type="text/css"/>
+ <link href="/css/turquoise.css" rel="stylesheet" type="text/css"/>
+
+ <link rel="shortcut icon" href="/images/server-icon_16x16.png" />
+</head>
+
+<body>
+<div id="container">
+ <div id="header">
+ <div id="subProjectsNavBar">
+ <a href="/">
+
+ Main
+
+ </a>
+ |
+ <a href="/apacheds/">
+
+ ApacheDS
+
+ </a>
+ |
+ <a href="/studio/">
+
+ Studio
+
+ </a>
+ |
+ <a href="/api/">
+
+ LDAP API
+
+ </a>
+ |
+ <a href="/mavibot/">
+
+ <strong>Mavibot</strong>
+
+ </a>
+ |
+ <a href="/scimple/">
+
+ SCIMple
+
+ </a>
+ |
+ <a href="/fortress/">
+
+ Fortress
+
+ </a>
+ |
+ <a href="/kerby/">
+
+ Kerby
+
+ </a>
+ </div>
+</div>
+
+
+ <div id="content">
+ <div id="leftColumn">
+ <div id="navigation">
+
+ <h5>Mavibot 1.0</h5>
+ <ul>
+ <li><a href="/mavibot/">Home</a></li>
+ <li><a href="/mavibot/news.html">News</a></li>
+ </ul>
+
+ <h5>Downloads</h5>
+ <ul>
+ <li><a href="/mavibot/downloads.html">Version 1.0.0-M8</a> <img src="/images/new_badge.gif" alt="" style="margin-bottom:-3px;" border="0"></li>
+ <li><a href="/mavibot/download-old-versions.html">Older versions</a></li>
+ </ul>
+
+ <h5>Getting Started</h5>
+ <ul>
+ <li><a href="/mavibot/vision.html">Vision</a></li>
+ </ul>
+
+ <h5>Documentation</h5>
+ <ul>
+ <li><a href="/mavibot/five-minutes-tutorial.html">Five minutes tutorial</a></li>
+ <li><a href="/mavibot/user-guide.html">User Guide</a></li>
+ <li><a href="/mavibot/gen-docs/latest/apidocs/">JavaDocs</a></li>
+ <li><a href="/mavibot/gen-docs/latest/xref/">Cross-Reference</a></li>
+
+ <li><a href="/mavibot/developer-guide.html">Developer Guide</a></li>
+ </ul>
+
+ <h5>Support</h5>
+<ul>
+ <li><a href="/mailing-lists-and-irc.html">Mailing Lists & IRC</a></li>
+ <li><a href="/sources.html">Sources</a></li>
+ <li><a href="/issue-tracking.html">Issue Tracking</a></li>
+ <li><a href="/commercial-support.html">Commercial Support</a></li>
+</ul>
+
+<h5>Community</h5>
+<ul>
+ <li><a href="/contribute.html">How to Contribute</a></li>
+ <li><a href="/team.html">Team</a></li>
+ <li><a href="/original-project-proposal.html">Original Project Proposal</a></li>
+ <li><a href="/special-thanks.html" class="external-link" rel="nofollow">Special Thanks</a></li>
+</ul>
+
+<h5>About Apache</h5>
+<ul>
+ <li><a href="http://www.apache.org/">Apache</a></li>
+ <li><a href="http://www.apache.org/licenses/">License</a></li>
+ <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+ <li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+ <li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+
+ </div>
+ </div>
+ <div id="rightColumn">
+
+ <div class="nav">
+ <div class="nav_prev">
+
+
+
+ </div>
+ <div class="nav_up">
+
+
+ <a href="../user-guide-v1.html">User Guide</a>
+
+ </div>
+ <div class="nav_next">
+
+
+ <a href="1.1-btree-basics.html">1.1 - BTree Basics</a>
+
+ </div>
+ <div class="clearfix"></div>
+ </div>
+
+
+
+ <h1 id="mavibot-initialization">Mavibot initialization</h1>
+<p>The very first step when using <strong>Mavibot</strong> is to initialize it. That means creating the database that will contain all the data (we use only one file for that).</p>
+<p>This is done with a simple call, with one or 3 parameters:</p>
+<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-Java" data-lang="Java"> RecordManager recordManager1 <span style="color:#666">=</span> <span style="color:#a2f;font-weight:bold">new</span> RecordManager<span style="color:#666">(</span> <span style="color:#b44">"MyData.db"</span> <span style="color:#666">)</span><span style="color:#666">;</span>
+
+ <span style="color:#080;font-style:italic">// or
+</span><span style="color:#080;font-style:italic"></span>
+ RecordManager recordManager2 <span style="color:#666">=</span> <span style="color:#a2f;font-weight:bold">new</span> RecordManager<span style="color:#666">(</span> <span style="color:#b44">"MyData.db"</span><span style="color:#666">,</span> 512<span style="color:#666">,</span> 1024 <span style="color:#666">)</span><span style="color:#666">;</span>
+</code></pre></div><p>The first method just require that you name the file that will contain the data (<em>“MyData.db”</em> here), teh second method allows you to configure the page size and teh cache size (in number of pages). Here, we set the page size to <em>512</em> bytes and the cache will store 1024 pages.</p>
+<p>Those call will create the inner structure needed to manage the database:</p>
+<ul>
+<li>the <em>RecordManagerHeader</em></li>
+<li>the <em>CopiedPagesBtree</em></li>
+<li>the list of active B-trees (currently containing no element, the previously created B-tree is a technical one)</li>
+</ul>
+<h2 id="the-recordmanagerheader">The RecordManagerHeader</h2>
+<p>This data structure is critical to <em>Mavibot</em>, it contains the root of all your database. It is stored with one single page, and is written in one single write operation, guaranteeing that once written, all the database is reachable. It cannot be corrupted. Worse case scenario, if it cannot be written, the previous version will always be available and point to the previous revision.</p>
+<p>The inner structure of this page is the following:</p>
+<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-Text" data-lang="Text">+--------------------------+
+| PageSize | 4 bytes : The size of a physical page (default to 4096)
++--------------------------+
+| Nb B-Trees | 4 bytes : The number of managed B-trees (zero or more)
++--------------------------+
+| Revision | 8 bytes : The current revision
++--------------------------+
+| FirstFree offset | 8 bytes : The offset of the first free page
++--------------------------+
+| list of B-trees offset | 8 bytes : The offset of the current list of B-trees
++--------------------------+
+| current CP btree offset | 8 bytes : The offset of the current BoB
++--------------------------+
+| idCounter | 8 bytes : The page ID counter (an incremental counter)
++--------------------------+
+</code></pre></div><p>The <em>RecordManagerHeader</em> is a 48 bytes block, stored in a bigger page (default page size is 4096 bytes).</p>
+<p>The important information are :</p>
+<ul>
+<li>the current revision</li>
+<li>the pointer to the first free page (free pages are linked together in a list for the page allocator to use them)</li>
+<li>the pointer to the list of existing B-trees</li>
+<li>the pointer to the <em>CopiedPagesBtree</em> which is used to manage dead pages</li>
+<li>a unique page counter whicch is incremented after every write</li>
+</ul>
+<p>When you use a <em>Mavibot</em> database, the system will always read this first page, and retrieve all the needed informations about the existing B-trees, plus some extra information to retreive dead pages if there was a crash beforehand. It’s critical to undestand that a crash will not corrupt the database, you will just lose the data that were written before the write transaction has been fully committed.</p>
+<h2 id="the-copiedpages-btree">The CopiedPages Btree</h2>
+<p>This is a technical B-tree that is used to keep a reference of all the pages that have been copied during a write transaction. That allows the system to reclaim the pages that are not anymore in use. The algorithm will be axplain later. Enough said that for every write operation, we keep track of every page that is copied in this B-tree. Note that unlike the other B-trees, this B-tree is not versionned (ie we discard the old <em>CopiedPagesBtree</em> pages immediately, they aren&rsquo [...]
+<h2 id="the-list-of-active-b-trees">The list of active B-trees</h2>
+<p>We need to keep a track of all the active B-trees, whatever their version. A B-ytree is active when there is at least a read transaction using the assocciated revision. We may have many.</p>
+<p>The reason we keep them on teh disk is that it helps to reclaim old pages in case of a crash, otherwise we would have to parse the whole database - which would be costly.</p>
+<p>Here is the data structure as it is written on disk - and it may span on many pages -:</p>
+<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-Text" data-lang="Text">
++--+--+--+--+--+--+--+--+
+| | | | | | | | | pageID
++--+--+--+--+--+--+--+--+
+| | | | | number of transaction lists
++--+--+--+--+
+ The current RMH :
++--+--+--+--+
+| | | | | number of managed BTrees (N)
++--+--+--+--+--+--+--+--+
+| | | | | | | | | revision
++--+--+--+--+--+--+--+--+
+...
++--+--+--+--+--+--+--+--+
+| | | | | | | | | BtreeHeader offset x N, For each managed B-tree
++--+--+--+--+--+--+--+--+
+...
+
+ The active transactions list :
++--+--+--+--+
+| | | | | number of managed BTrees for RMH[i] (M)
++--+--+--+--+--+--+--+--+
+| | | | | | | | | revision RMH[i]
++--+--+--+--+--+--+--+--+
+...
++--+--+--+--+--+--+--+--+
+| | | | | | | | | BtreeHeader offset x M, For each managed B-tree of RMH[i]
++--+--+--+--+--+--+--+--+
+...
+</code></pre></div><p>Each transaction list has a size of <code>12 + (nb B-tree * 8)</code> bytes. For instance, if we manage 16 B-trees, that is 140 bytes (16 * 8 + 12 -> 140), and add the first 12 bytes for completion). If we have 10 active transactions, a 4096 bytes page will easily hold all of them (12 + 10 x 140 -> 1412 bytes).</p>
+<h2 id="the-list-of-free-pages">The list of free pages</h2>
+<p>This is basically a pointer to the first free page. All the freed pages are linked together. Their content is not flushed or cleared.</p>
+<p>The principle is that when a page is freed, we attach it to the begining of this list, and it becomes the new head of the free pages list.</p>
+<p>For the record, when <em>Mavibot</em> needs a new page to store some data, it will first fetch some from this list, and when this list get exhausted, then it will get a new page at the end of the file, growing the file in the process.</p>
+<p>Here is a representation of this list:</p>
+<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-Text" data-lang="Text"> +-------------+---+ +-------------+---+ +-------------+---+
+Head -->| | o-+--->| | o-+--->| | x |
+ +-------------+---+ +-------------+---+ +-------------+---+
+</code></pre></div><p>Note that the links are offsets in the file, and that the pages may be spread all across the file (ie we can start with 0x2000, then jump to 0x4000, go back to 0x3000, etc).</p>
+<h2 id="transaction-list">Transaction list</h2>
+<p>We have now created the database, we need to initialize the transaction list. The <em>transaction list</em> is a list that contains all the existing transactions, as soon as they are in use. That means:</p>
+<ul>
+<li>the newest revision (after a write)</li>
+<li>any older revision for which a read transaction is sill holding a revision</li>
+</ul>
+<p>When one start a read transaction, it always uses the current revision, but we may have other writes while the read transaction is still processing data (a read transaction can remain opened for a very long time). Of course, the database for this old revision is outdated, but this is the contract: a read transaction always uses pages created before or uup to the read revision. Any data added, moddified or removed since the beginning of the read transaction won’t be seen.</p>
+<h1 id="adding-a-b-tree">Adding a B-tree</h1>
+<p>As soon as the database has been initialized, we can now add a working B-tree. This is done with a <em>write transaction</em> that needs to be created:</p>
+<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"> <span style="color:#a2f;font-weight:bold">try</span> <span style="color:#666">(</span> WriteTransaction writeTransaction <span style="color:#666">=</span> recordManager<span style="color:#666">.</span><span style="color:#b44">beginWriteTransaction</span><span style="color:#666">(</span><span style="color:#666">)</span> <span style="col [...]
+ <span style="color:#666">{</span>
+ <span style="color:#080;font-style:italic">// Create a new BTree with transaction and another one without
+</span><span style="color:#080;font-style:italic"></span> <span style="color:#a2f;font-weight:bold">try</span>
+ <span style="color:#666">{</span>
+ btree <span style="color:#666">=</span> recordManager<span style="color:#666">.</span><span style="color:#b44">addBTree</span><span style="color:#666">(</span> writeTransaction<span style="color:#666">,</span> <span style="color:#b44">"testWithTxn"</span><span style="color:#666">,</span> LongSerializer<span style="color:#666">.</span><span style="color:#b44">INSTANCE</span><span style="color:#666">,</span> StringSerializer<span style="color:#666">.</span><span sty [...]
+ <span style="color:#a2f;font-weight:bold">throw</span> <span style="color:#a2f;font-weight:bold">new</span> NullPointerException<span style="color:#666">(</span><span style="color:#666">)</span><span style="color:#666">;</span>
+ <span style="color:#666">}</span>
+ <span style="color:#a2f;font-weight:bold">catch</span> <span style="color:#666">(</span> Exception e <span style="color:#666">)</span>
+ <span style="color:#666">{</span>
+ writeTransaction<span style="color:#666">.</span><span style="color:#b44">abort</span><span style="color:#666">(</span><span style="color:#666">)</span><span style="color:#666">;</span>
+ <span style="color:#666">}</span>
+ <span style="color:#666">}</span>
+</code></pre></div><ul>
+<li>We first create a <em>Write Transaction</em> in a <em>try_with_resource</em> block</li>
+<li>then we add a B-tree (here stroring <Long, String> tuples) in a try/catch sequence</li>
+<li>we handle a potential exception, and rollback explicitely the transaction in this case</li>
+<li>last, not least, the commit is implicit when the transaction is auto-closed</li>
+</ul>
+<p>Note: We have to deal with the <em>abort()</em> call explicitely.</p>
+<p>The <em>B-tree</em> creation is entirely managed by the <em>recordManager</em> instance. A <em>B_Tree</em> is a data structure holding tuples (<code><key, value></code>) into pages. It has at least three pages:</p>
+<ul>
+<li>a <em>Info</em> page</li>
+<li>a <em>Header</em> page</li>
+<li>a <em>root</em> page.
+All those pages are written to disk when the transaction is commited, otherwise they are hold in memory until the transaction is either committed (and the pages are flushed oin disk) or rollbacked (and the memory is freed)</li>
+</ul>
+<p>The <em>Header</em> page is the reference page when accessing a <em>B_Tree</em>. It points to the <em>Info</em> and <em>root</em> page.</p>
+<p>Note: Each reference is a long integer, whch is the offset of the page on disk, if it has been written, or the page ID if it’s in memory. Each single page has a unique ID whcih never change. This ID is created when the page is created, and it’s an incremental number.</p>
+
+
+
+ <div class="nav">
+ <div class="nav_prev">
+
+
+
+ </div>
+ <div class="nav_up">
+
+
+ <a href="../user-guide-v1.html">User Guide</a>
+
+ </div>
+ <div class="nav_next">
+
+
+ <a href="1.1-btree-basics.html">1.1 - BTree Basics</a>
+
+ </div>
+ <div class="clearfix"></div>
+ </div>
+
+
+ </div>
+ <div id="endContent"></div>
+ </div>
+
+ <div id="footer">
+ © 2003-2022, <a href="http://www.apache.org">The Apache Software Foundation</a> - <a href="/privacy-policy.html">Privacy Policy</a><br />
+ Apache Directory, ApacheDS, Apache Directory Server, Apache Directory Studio, Apache LDAP API, Apache Triplesec,
+ Triplesec, Apache Mavibot, Mavibot, Apache eSCIMo, eSCIMo, Apache SCIMple, SCIMple,Fortress, Apache Fortress, EnMasse,
+ Apache EnMasse, Apache Kerby, Kerby, Apache, the Apache feather logo, and the Apache Directory project logos are
+ trademarks of The Apache Software Foundation.
+</div>
+
+</div>
+
+</body>
+
+</html>
diff --git a/content/sitemap.xml b/content/sitemap.xml
index 96983b59..b491e2e3 100644
--- a/content/sitemap.xml
+++ b/content/sitemap.xml
@@ -57,6 +57,11 @@
<lastmod>2020-08-08T11:25:14+02:00</lastmod>
</url>
+ <url>
+ <loc>https://directory.apache.org/mavibot/user-guide-v1/1-initialization.html</loc>
+ <lastmod>2022-08-17T15:47:50+02:00</lastmod>
+ </url>
+
<url>
<loc>https://directory.apache.org/mavibot/user-guide/1-introduction.html</loc>
<lastmod>2020-08-08T11:25:14+02:00</lastmod>
@@ -1624,7 +1629,7 @@
<url>
<loc>https://directory.apache.org/apacheds.html</loc>
- <lastmod>2021-04-14T22:20:03+02:00</lastmod>
+ <lastmod>2022-08-17T15:47:50+02:00</lastmod>
</url>
<url>
@@ -1714,7 +1719,7 @@
<url>
<loc>https://directory.apache.org/apacheds/developer-guide.html</loc>
- <lastmod>2021-04-03T20:40:15+02:00</lastmod>
+ <lastmod>2022-08-17T15:47:50+02:00</lastmod>
</url>
<url>
@@ -1724,7 +1729,7 @@
<url>
<loc>https://directory.apache.org/apacheds/download/download-sources.html</loc>
- <lastmod>2020-08-08T11:25:14+02:00</lastmod>
+ <lastmod>2022-08-17T15:47:50+02:00</lastmod>
</url>
<url>
@@ -2059,7 +2064,7 @@
<url>
<loc>https://directory.apache.org/mavibot.html</loc>
- <lastmod>2021-04-03T20:40:15+02:00</lastmod>
+ <lastmod>2022-08-17T15:47:50+02:00</lastmod>
</url>
<url>