blob: f7a5d15af48d4ad33e5790c87b12aa2581d64b4f [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Apache BookKeeper&trade; - BookKeeper CLI tool reference</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/normalize.css">
<link rel="stylesheet" href="/css/tippy.css">
<link rel="stylesheet" href="/css/style.css">
<link rel="shortcut icon" href="/img/favicon.ico">
<script src="/js/tippy.min.js"></script>
<script type="text/javascript">
var shiftWindow = function() { scrollBy(0, -25); };
window.addEventListener("hashchange", shiftWindow);
window.addEventListener("pageshow", shiftWindow);
function load() { if (window.location.hash) shiftWindow(); }
</script>
</head>
<body class="body">
<main class="main">
<nav class="navbar bk-topnav">
<div class="navbar-brand">
<a class="navbar-item bk-brand" href="/">
Apache BookKeeper&trade;
</a>
<div class="navbar-burger burger" data-target="bkNav">
<span></span>
<span></span>
<span></span>
</div>
</div>
<div id="bkNav" class="navbar-menu">
<div class="navbar-start">
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">Documentation</a>
<div class="navbar-dropdown is-boxed">
<a class="navbar-item" href="/docs/latest/overview/overview">
Version 4.14.0-SNAPSHOT
<span class="tag is-warning">Development</span>
</a>
<a class="navbar-item" href="/docs/latest/api/javadoc">
<span class="icon bk-javadoc-icon">
<img src="/img/java-icon.svg">
</span>
Javadoc
</a>
<hr class="dropdown-divider">
<a class="navbar-item" href="/docs/4.13.0/overview/overview">
Release 4.13.0
</a>
<a class="navbar-item" href="/docs/4.12.1/overview/overview">
Release 4.12.1
</a>
<a class="navbar-item" href="/docs/4.12.0/overview/overview">
Release 4.12.0
</a>
<a class="navbar-item" href="/docs/4.11.1/overview/overview">
Release 4.11.1
<span class="tag is-success">Stable</span>
</a>
<a class="navbar-item" href="/docs/4.11.0/overview/overview">
Release 4.11.0
</a>
<a class="navbar-item" href="/docs/4.10.0/overview/overview">
Release 4.10.0
</a>
<a class="navbar-item" href="/archives/docs/r4.9.2">
Release 4.9.2
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.9.1">
Release 4.9.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.9.0">
Release 4.9.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.8.2">
Release 4.8.2
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.8.1">
Release 4.8.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.8.0">
Release 4.8.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.7.3">
Release 4.7.3
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.7.2">
Release 4.7.2
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.7.1">
Release 4.7.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.7.0">
Release 4.7.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.6.2">
Release 4.6.2
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.6.1">
Release 4.6.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.6.0">
Release 4.6.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.5.1">
Release 4.5.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.5.0">
Release 4.5.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.4.0">
Release 4.4.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.3.2">
Release 4.3.2
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.3.1">
Release 4.3.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.3.0">
Release 4.3.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.2.4">
Release 4.2.4
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.2.3">
Release 4.2.3
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.2.2">
Release 4.2.2
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.2.1">
Release 4.2.1
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.2.0">
Release 4.2.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.1.0">
Release 4.1.0
<span class="tag is-warning">EOL</span>
</a>
<a class="navbar-item" href="/archives/docs/r4.0.0">
Release 4.0.0
<span class="tag is-warning">EOL</span>
</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">Community</a>
<div class="navbar-dropdown is-boxed">
<a class="navbar-item" href="/community/mailing-lists">Mailing lists</a>
<a class="navbar-item" href="/community/slack">Slack</a>
<a class="navbar-item" href="https://github.com/apache/bookkeeper/issues">Github Issues</a>
<a class="navbar-item" href="/community/releases">Release Management</a>
<a class="navbar-item" href="/community/meeting">Community Meetings</a>
<hr class="dropdown-divider">
<a class="navbar-item" href="/community/contributing">Contribution Guide</a>
<a class="navbar-item" href="/community/coding_guide">Coding Guide</a>
<a class="navbar-item" href="/community/testing">Testing Guide</a>
<a class="navbar-item" href="/community/issue-report">Issue Report Guide</a>
<a class="navbar-item" href="/community/release_guide">Release Guide</a>
<hr class="dropdown-divider">
<a class="navbar-item" href="/community/presentations">Presentations</a>
<a class="navbar-item" href="/community/bookkeeper_proposals">BookKeeper Proposals</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">Project</a>
<div class="navbar-dropdown is-boxed">
<a class="navbar-item" href="/project/who">Who are we?</a>
<a class="navbar-item" href="/project/bylaws">Bylaws</a>
<a class="navbar-item" href="http://www.apache.org/licenses/">License</a>
<hr class="dropdown-divider">
<a class="navbar-item" href="/project/privacy">Privacy policy</a>
<a class="navbar-item" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
<a class="navbar-item" href="http://www.apache.org/foundation/thanks.html">Thanks</a>
</div>
</div>
</div>
<div class="navbar-end">
<div class="navbar-item">
<div class="field is-grouped">
<p class="control">
<a class="button bk-twitter" href="https://twitter.com/asfbookkeeper">
<span class="icon">
<i class="fa fa-twitter"></i>
</span>
<span>Twitter</span>
</a>
</p>
<p class="control">
<a class="button" href="https://github.com/apache/bookkeeper">
<span class="icon">
<i class="fa fa-github"></i>
</span>
<span>GitHub</span>
</a>
</p>
<p class="control">
<a class="button is-primary" href="/releases">
<span class="icon">
<i class="fa fa-download"></i>
</span>
<span>Download</span>
</a>
</p>
</div>
</div>
</div>
</div>
</nav>
<div class="bk-docs-container">
<div class="columns is-gapless">
<div class="column is-2 is-hidden-mobile">
<div class="container">
<aside class="sidebar">
<a class="button is-info">
Version: 4.11.0
</a>
<hr />
<p>
Getting started
</p>
<ul class="sidebar-items">
<li>
<a href="../../getting-started/installation">
Installation
</a>
</li>
<li>
<a href="../../getting-started/run-locally">
Run bookies locally
</a>
</li>
<li>
<a href="../../getting-started/concepts">
Concepts and architecture
</a>
</li>
</ul>
<p>
Deployment
</p>
<ul class="sidebar-items">
<li>
<a href="../../deployment/manual">
Manual deployment
</a>
</li>
<li>
<a href="../../deployment/dcos">
BookKeeper on DC/OS
</a>
</li>
<li>
<a href="../../deployment/kubernetes">
BookKeeper on Kubernetes
</a>
</li>
</ul>
<p>
Administration
</p>
<ul class="sidebar-items">
<li>
<a href="../../admin/bookies">
BookKeeper administration
</a>
</li>
<li>
<a href="../../admin/autorecovery">
AutoRecovery
</a>
</li>
<li>
<a href="../../admin/metrics">
Metric collection
</a>
</li>
<li>
<a href="../../admin/upgrade">
Upgrade
</a>
</li>
<li>
<a href="../../admin/http">
BookKeeper Admin REST API
</a>
</li>
<li>
<a href="../../admin/decomission">
Decommissioning Bookies
</a>
</li>
</ul>
<p>
API
</p>
<ul class="sidebar-items">
<li>
<a href="../../api/overview">
Overview
</a>
</li>
<li>
<a href="../../api/ledger-api">
Ledger API
</a>
</li>
<li>
<a href="../../api/ledger-adv-api">
Advanced Ledger API
</a>
</li>
<li>
<a href="../../api/distributedlog-api">
DistributedLog
</a>
</li>
<li>
<a href="../../api/javadoc">
Java API Docs
</a>
</li>
</ul>
<p>
Security
</p>
<ul class="sidebar-items">
<li>
<a href="../../security/overview">
Overview
</a>
</li>
<li>
<a href="../../security/tls">
TLS Authentication
</a>
</li>
<li>
<a href="../../security/sasl">
SASL Authentication
</a>
</li>
<li>
<a href="../../security/zookeeper">
ZooKeeper Authentication
</a>
</li>
</ul>
<p>
Development
</p>
<ul class="sidebar-items">
<li>
<a href="../../development/protocol">
BookKeeper protocol
</a>
</li>
</ul>
<p>
Reference
</p>
<ul class="sidebar-items">
<li>
<a href="../../reference/config">
Configuration
</a>
</li>
<li>
<a href="../../reference/cli">
Command-line tools
</a>
</li>
<li>
<a href="../../reference/metrics">
Metrics
</a>
</li>
</ul>
</aside>
</div>
</div>
<div class="column is-8 bk-docs-block">
<header class="docs-title">
<nav class="level bk-level">
<div class="level-left">
<div class="level-item">
<h1 class="title">BookKeeper CLI tool reference</h1>
</div>
</div>
</nav>
<h2 class="subtitle">A reference guide to the command-line tools that you can use to administer BookKeeper</h2>
</header>
<hr />
<div class="content">
<section class="bk-main-content">
<h2 id="bookkeeper">bookkeeper</h2>
<p>Manages bookies.</p>
<h4>Environment variables</h4>
<table>
<thead>
<tr>
<th>Environment variable</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>BOOKIE_LOG_CONF</code></td>
<td><p>The Log4j configuration file.</p>
</td>
<td><code>${bookkeeperHome}/bookkeeper-server/conf/log4j.properties</code></td>
</tr>
<tr>
<td><code>BOOKIE_CONF</code></td>
<td><p>The configuration file for the bookie.</p>
</td>
<td><code>${bookkeeperHome}/bookkeeper-server/conf/bk_server.conf</code></td>
</tr>
<tr>
<td><code>BOOKIE_EXTRA_CLASSPATH</code></td>
<td><p>Extra paths to add to BookKeeper’s <a href="https://en.wikipedia.org/wiki/Classpath_(Java)">classpath</a>.</p>
</td>
<td></td>
</tr>
<tr>
<td><code>ENTRY_FORMATTER_CLASS</code></td>
<td><p>The entry formatter class used to format entries.</p>
</td>
<td></td>
</tr>
<tr>
<td><code>BOOKIE_PID_DIR</code></td>
<td><p>The directory where the bookie server PID file is stored.</p>
</td>
<td></td>
</tr>
<tr>
<td><code>BOOKIE_STOP_TIMEOUT</code></td>
<td><p>The wait time before forcefully killing the bookie server instance if stopping it is not successful.</p>
</td>
<td></td>
</tr>
</tbody>
</table>
<h4>Commands</h4>
<h3 id="bookkeeper-bookie">bookie</h3>
<p>Starts up a bookie.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper bookie
</code></pre></div></div>
<hr />
<h3 id="bookkeeper-localbookie">localbookie</h3>
<p>Starts up an ensemble of N bookies in a single JVM process. Typically used for local experimentation and development.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper localbookie N
</code></pre></div></div>
<hr />
<h3 id="bookkeeper-autorecovery">autorecovery</h3>
<p>Runs the autorecovery service daemon.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper autorecovery
</code></pre></div></div>
<hr />
<h3 id="bookkeeper-upgrade">upgrade</h3>
<p>Upgrades the bookie’s filesystem.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper upgrade
</code></pre></div></div>
<hr />
<h3 id="bookkeeper-shell">shell</h3>
<p>Runs the bookie’s shell for admin commands.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell
</code></pre></div></div>
<hr />
<h3 id="bookkeeper-help">help</h3>
<p>Displays the help message for the <code class="highlighter-rouge">bookkeeper</code> tool.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper <span class="nb">help</span>
</code></pre></div></div>
<h2 id="the-bookkeeper-shell">The BookKeeper shell</h2>
<h3 id="bookkeeper-shell-autorecovery">autorecovery</h3>
<p>Enable or disable autorecovery in the cluster.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell autorecovery <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-enable</code></td>
<td>Enable autorecovery of underreplicated ledgers</td>
</tr>
<tr>
<td><code>-disable</code></td>
<td>Disable autorecovery of underreplicated ledgers</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-bookieformat">bookieformat</h3>
<p>Format the current server contents.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell bookieformat <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-nonInteractive</code></td>
<td>Whether to confirm if old data exists.</td>
</tr>
<tr>
<td><code>-force</code></td>
<td>If [nonInteractive] is specified, then whether to force delete the old data without prompt..?</td>
</tr>
<tr>
<td><code>-deleteCookie</code></td>
<td>Delete its cookie on zookeeper</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-initbookie">initbookie</h3>
<p>Initialize new bookie, by making sure that the journalDir, ledgerDirs and
indexDirs are empty and there is no registered Bookie with this BookieId.</p>
<p>If there is data present in current bookie server, the init operation will fail. If you want to format
the bookie server, use <code class="highlighter-rouge">bookieformat</code>.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell initbookie
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-bookieinfo">bookieinfo</h3>
<p>Retrieve bookie info such as free and total disk space.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell bookieinfo
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-bookiesanity">bookiesanity</h3>
<p>Sanity test for local bookie. Create ledger and write/read entries on the local bookie.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell bookiesanity <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-entries N</code></td>
<td>Total entries to be added for the test (default 10)</td>
</tr>
<tr>
<td><code>-timeout N</code></td>
<td>Timeout for write/read operations in seconds (default 1)</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-decommissionbookie">decommissionbookie</h3>
<p>Force trigger the Audittask and make sure all the ledgers stored in the decommissioning bookie are replicated.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell decommissionbookie
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-deleteledger">deleteledger</h3>
<p>Delete a ledger</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell deleteledger <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-ledgerid N</code></td>
<td>Ledger ID</td>
</tr>
<tr>
<td><code>-force</code></td>
<td>Whether to force delete the Ledger without prompt..?</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-endpointinfo">endpointinfo</h3>
<p>Get endpoints of a Bookie.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell endpointinfo
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-expandstorage">expandstorage</h3>
<p>Add new empty ledger/index directories. Update the directories info in the conf file before running the command.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell expandstorage
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-help">help</h3>
<p>Displays the help message.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell <span class="nb">help</span>
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-lastmark">lastmark</h3>
<p>Print last log marker.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell lastmark
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-ledger">ledger</h3>
<p>Dump ledger index entries into readable format.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell ledger <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-m LEDGER_ID</code></td>
<td>Print meta information</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-ledgermetadata">ledgermetadata</h3>
<p>Print the metadata for a ledger.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell ledgermetadata <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-ledgerid N</code></td>
<td>Ledger ID</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-listbookies">listbookies</h3>
<p>List the bookies, which are running as either readwrite or readonly mode.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell listbookies <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-readwrite</code></td>
<td>Print readwrite bookies</td>
</tr>
<tr>
<td><code>-readonly</code></td>
<td>Print readonly bookies</td>
</tr>
<tr>
<td><code>-hostnames</code></td>
<td>Also print hostname of the bookie</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-listfilesondisc">listfilesondisc</h3>
<p>List the files in JournalDirectory/LedgerDirectories/IndexDirectories.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell listfilesondisc <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-journal</code></td>
<td>Print list of journal files</td>
</tr>
<tr>
<td><code>-entrylog</code></td>
<td>Print list of entryLog files</td>
</tr>
<tr>
<td><code>-index</code></td>
<td>Print list of index files</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-listledgers">listledgers</h3>
<p>List all ledgers in the cluster (this may take a long time).</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell listledgers <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-meta</code></td>
<td>Print metadata</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-listunderreplicated">listunderreplicated</h3>
<p>List ledgers marked as underreplicated, with optional options to specify missing replica (BookieId) and to exclude missing replica.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell listunderreplicated <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-missingreplica N</code></td>
<td>Bookie Id of missing replica</td>
</tr>
<tr>
<td><code>-excludingmissingreplica N</code></td>
<td>Bookie Id of missing replica to ignore</td>
</tr>
<tr>
<td><code>-printmissingreplica</code></td>
<td>Whether to print missingreplicas list?</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-metaformat">metaformat</h3>
<p>Format Bookkeeper metadata in Zookeeper. This command is deprecated since 4.7.0,
in favor of using <code class="highlighter-rouge">initnewcluster</code> for initializing a new cluster and <code class="highlighter-rouge">nukeexistingcluster</code> for nuking an existing cluster.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell metaformat <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-nonInteractive</code></td>
<td>Whether to confirm if old data exists..?</td>
</tr>
<tr>
<td><code>-force</code></td>
<td>If [nonInteractive] is specified, then whether to force delete the old data without prompt.</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-initnewcluster">initnewcluster</h3>
<p>Initializes a new bookkeeper cluster. If initnewcluster fails then try nuking
existing cluster by running nukeexistingcluster before running initnewcluster again</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell initnewcluster
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-nukeexistingcluster">nukeexistingcluster</h3>
<p>Nuke bookkeeper cluster by deleting metadata</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell nukeexistingcluster <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-zkledgersrootpath</code></td>
<td>zookeeper ledgers rootpath</td>
</tr>
<tr>
<td><code>-instanceid</code></td>
<td>instance id</td>
</tr>
<tr>
<td><code>-force</code></td>
<td>If instanceid is not specified, then whether to force nuke the metadata without validating instanceid</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-lostbookierecoverydelay">lostbookierecoverydelay</h3>
<p>Setter and Getter for LostBookieRecoveryDelay value (in seconds) in Zookeeper.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell lostbookierecoverydelay <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-get</code></td>
<td>Get LostBookieRecoveryDelay value (in seconds)</td>
</tr>
<tr>
<td><code>-set N</code></td>
<td>Set LostBookieRecoveryDelay value (in seconds)</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-readjournal">readjournal</h3>
<p>Scan a journal file and format the entries into readable format.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell readjournal <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-msg JOURNAL_ID|JOURNAL_FILENAME</code></td>
<td>Print message body</td>
</tr>
<tr>
<td><code>-dir</code></td>
<td>Journal directory (needed if more than one journal configured)</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-readledger">readledger</h3>
<p>Read a range of entries from a ledger.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell readledger <span class="se">\</span>
&lt;ledger_id&gt; <span class="o">[</span>&lt;start_entry_id&gt; <span class="o">[</span>&lt;end_entry_id&gt;]]
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-readlog">readlog</h3>
<p>Scan an entry file and format the entries into readable format.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell readlog <span class="se">\</span>
&lt;entry_log_id | entry_log_file_name&gt; <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-msg</code></td>
<td>Print message body</td>
</tr>
<tr>
<td><code>-ledgerid N</code></td>
<td>Ledger ID</td>
</tr>
<tr>
<td><code>-entryid N</code></td>
<td>Entry ID</td>
</tr>
<tr>
<td><code>-startpos N</code></td>
<td>Start Position</td>
</tr>
<tr>
<td><code>-endpos</code></td>
<td>End Position</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-recover">recover</h3>
<p>Recover the ledger data for failed bookie.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell recover <span class="se">\</span>
&lt;bookieSrc&gt; <span class="o">[</span>&lt;bookieDest&gt;] <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-deleteCookie</code></td>
<td>Delete cookie node for the bookie.</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-simpletest">simpletest</h3>
<p>Simple test to create a ledger and write entries to it.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell simpletest <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-ensemble N</code></td>
<td>Ensemble size (default 3)</td>
</tr>
<tr>
<td><code>-writeQuorum N</code></td>
<td>Write quorum size (default 2)</td>
</tr>
<tr>
<td><code>ackQuorum N</code></td>
<td>Ack quorum size (default 2)</td>
</tr>
<tr>
<td><code>-numEntries N</code></td>
<td>Entries to write (default 1000)</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-triggeraudit">triggeraudit</h3>
<p>Force trigger the Audit by resetting the lostBookieRecoveryDelay.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell triggeraudit
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-updatecookie">updatecookie</h3>
<p>Update bookie id in cookie.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell updatecookie <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-bookieId &lt;hostname|ip&gt;</code></td>
<td>Bookie Id</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-updateledgers">updateledgers</h3>
<p>Update bookie id in ledgers (this may take a long time).</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell updateledgers <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-bookieId &lt;hostname|ip&gt;</code></td>
<td>Bookie Id</td>
</tr>
<tr>
<td><code>-updatespersec N</code></td>
<td>Number of ledgers updating per second (default 5 per sec)</td>
</tr>
<tr>
<td><code>-limit N</code></td>
<td>Maximum number of ledgers to update (default no limit)</td>
</tr>
<tr>
<td><code>-verbose</code></td>
<td>Print status of the ledger updation (default false)</td>
</tr>
<tr>
<td><code>-printprogress N</code></td>
<td>Print messages on every configured seconds if verbose turned on (default 10 secs)</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-updateBookieInLedger">updateBookieInLedger</h3>
<p>Replace srcBookie with destBookie in ledger metadata. (this may take a long time).
Useful when Host-reip or data-migration. In that case, shutdown bookie process in src-bookie,
use this command to update ledger metadata by replacing src-bookie to dest-bookie where data has been copied/moved.
Start the bookie process on dest-bookie and dest-bookie will serve copied ledger data from src-bookie.</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell updateBookieInLedger <span class="se">\</span>
&lt;options&gt;
</code></pre></div></div>
<h5>Options</h5>
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-srcBookie BOOKIE_ID</code></td>
<td>Source Bookie Id</td>
</tr>
<tr>
<td><code>-destBookie BOOKIE_ID</code></td>
<td>Destination Bookie Id</td>
</tr>
<tr>
<td><code>-updatespersec N</code></td>
<td>Number of ledgers updating per second (default 5 per sec)</td>
</tr>
<tr>
<td><code>-limit N</code></td>
<td>Maximum number of ledgers to update (default no limit)</td>
</tr>
<tr>
<td><code>-verbose</code></td>
<td>Print status of the ledger updation (default false)</td>
</tr>
<tr>
<td><code>-printprogress N</code></td>
<td>Print messages on every configured seconds if verbose turned on (default 10 secs)</td>
</tr>
</tbody>
</table>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-whoisauditor">whoisauditor</h3>
<p>Print the node which holds the auditor lock</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell whoisauditor
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-whatisinstanceid">whatisinstanceid</h3>
<p>Print the instanceid of the cluster</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell whatisinstanceid
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-convert-to-db-storage">convert-to-db-storage</h3>
<p>Convert bookie indexes from InterleavedStorage to DbLedgerStorage format</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell convert-to-db-storage
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-convert-to-interleaved-storage">convert-to-interleaved-storage</h3>
<p>Convert bookie indexes from DbLedgerStorage to InterleavedStorage format</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell convert-to-interleaved-storage
</code></pre></div></div>
<p><!-- if command.options --></p>
<hr />
<h3 id="bookkeeper-shell-rebuild-db-ledger-locations-index">rebuild-db-ledger-locations-index</h3>
<p>Rebuild DbLedgerStorage locations index</p>
<h5>Usage</h5>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bin/bookkeeper shell rebuild-db-ledger-locations-index
</code></pre></div></div>
<p><!-- if command.options --></p>
<p><!-- for command in commands --></p>
</section>
</div>
</div>
<div class="column is-2 is-hidden-mobile">
<div class="toc">
<h2 class="title">BookKeeper CLI tool reference</h2>
<ul class="section-nav">
<li class="toc-entry toc-h2"><a href="#bookkeeper">bookkeeper</a>
<ul>
<li class="toc-entry toc-h4"><a href="#environment-variables">Environment variables</a></li>
<li class="toc-entry toc-h4"><a href="#commands">Commands</a></li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-bookie">bookie</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-localbookie">localbookie</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-1">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-autorecovery">autorecovery</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-2">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-upgrade">upgrade</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-3">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell">shell</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-4">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-help">help</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-5">Usage</a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-entry toc-h2"><a href="#the-bookkeeper-shell">The BookKeeper shell</a>
<ul>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-autorecovery">autorecovery</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-6">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-bookieformat">bookieformat</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-7">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-1">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-initbookie">initbookie</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-8">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-bookieinfo">bookieinfo</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-9">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-bookiesanity">bookiesanity</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-10">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-2">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-decommissionbookie">decommissionbookie</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-11">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-deleteledger">deleteledger</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-12">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-3">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-endpointinfo">endpointinfo</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-13">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-expandstorage">expandstorage</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-14">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-help">help</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-15">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-lastmark">lastmark</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-16">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-ledger">ledger</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-17">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-4">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-ledgermetadata">ledgermetadata</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-18">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-5">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-listbookies">listbookies</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-19">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-6">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-listfilesondisc">listfilesondisc</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-20">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-7">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-listledgers">listledgers</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-21">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-8">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-listunderreplicated">listunderreplicated</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-22">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-9">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-metaformat">metaformat</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-23">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-10">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-initnewcluster">initnewcluster</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-24">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-nukeexistingcluster">nukeexistingcluster</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-25">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-11">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-lostbookierecoverydelay">lostbookierecoverydelay</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-26">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-12">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-readjournal">readjournal</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-27">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-13">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-readledger">readledger</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-28">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-readlog">readlog</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-29">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-14">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-recover">recover</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-30">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-15">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-simpletest">simpletest</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-31">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-16">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-triggeraudit">triggeraudit</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-32">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-updatecookie">updatecookie</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-33">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-17">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-updateledgers">updateledgers</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-34">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-18">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-updateBookieInLedger">updateBookieInLedger</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-35">Usage</a></li>
<li class="toc-entry toc-h5"><a href="#options-19">Options</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-whoisauditor">whoisauditor</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-36">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-whatisinstanceid">whatisinstanceid</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-37">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-convert-to-db-storage">convert-to-db-storage</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-38">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-convert-to-interleaved-storage">convert-to-interleaved-storage</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-39">Usage</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#bookkeeper-shell-rebuild-db-ledger-locations-index">rebuild-db-ledger-locations-index</a>
<ul>
<li class="toc-entry toc-h5"><a href="#usage-40">Usage</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="entry-popover-html" class="popover-template">
<p>An entry is a sequence of bytes (plus some metadata) written to a BookKeeper ledger. Entries are also known as records.</p>
</div>
<div id="ledger-popover-html" class="popover-template">
<p>A ledger is a sequence of entries written to BookKeeper. Entries are written sequentially to ledgers and at most once, giving ledgers append-only semantics.</p>
</div>
<div id="bookie-popover-html" class="popover-template">
<p>A bookie is an individual BookKeeper storage server.</p>
<p>Bookies store the content of ledgers and act as a distributed ensemble.</p>
</div>
<div id="rereplication-popover-html" class="popover-template">
<p>A subsystem that runs in the background on bookies to ensure that ledgers are fully replicated even if one bookie from the ensemble is down.</p>
</div>
<div id="striping-popover-html" class="popover-template">
<p>Striping is the process of distributing BookKeeper ledgers to sub-groups of bookies rather than to all bookies in a BookKeeper ensemble.</p>
<p>Striping is essential to ensuring fast performance.</p>
</div>
<div id="striped-popover-html" class="popover-template">
<p>Striping is the process of distributing BookKeeper ledgers to sub-groups of bookies rather than to all bookies in a BookKeeper ensemble.</p>
<p>Striping is essential to ensuring fast performance.</p>
</div>
<div id="journal-popover-html" class="popover-template">
<p>A journal file stores BookKeeper transaction logs.</p>
</div>
<div id="fencing-popover-html" class="popover-template">
<p>When a reader forces a ledger to close, preventing any further entries from being written to the ledger.</p>
</div>
<div id="record-popover-html" class="popover-template">
<p>A record is a sequence of bytes (plus some metadata) written to a BookKeeper ledger. Records are also known as entries.</p>
</div>
<script type="text/javascript">
tippy('#entry-popover', {
html: '#entry-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#ledger-popover', {
html: '#ledger-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#bookie-popover', {
html: '#bookie-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#rereplication-popover', {
html: '#rereplication-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#striping-popover', {
html: '#striping-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#striped-popover', {
html: '#striped-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#journal-popover', {
html: '#journal-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#fencing-popover', {
html: '#fencing-popover-html',
arrow: true,
animation: 'fade'
});
tippy('#record-popover', {
html: '#record-popover-html',
arrow: true,
animation: 'fade'
});
</script>
</main>
<footer class="footer">
<div class="container">
<div class="content has-text-centered">
<p>
Copyright &copy; 2016 - 2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>,<br /> licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, version 2.0</a>.
</p>
<p>
Apache BookKeeper, BookKeeper®, Apache®, the Apache feature logo, and the Apache BookKeeper logo are either registered trademarks or trademarks of The Apache Software Foundation.
</p>
</div>
</div>
</footer>
</body>
<script src="/js/app.js"></script>
<!--
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.
-->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-104419626-1', 'auto');
ga('send', 'pageview');
</script>
</html>