Download or clone BookKeeper and build it locally


You can install BookKeeper either by downloading a GZipped tarball package or cloning the BookKeeper repository.

Requirements

Download

You can download Apache BookKeeper releases from one of many Apache mirrors. Here’s an example for the apache.claz.org mirror:

$ curl -O http://apache.claz.org/bookkeeper/bookkeeper-4.6.0/bookkeeper-4.6.0-src.tar.gz
$ tar xvf bookkeeper-4.6.0-src.tar.gz
$ cd bookkeeper-4.6.0

Clone

To build BookKeeper from source, clone the repository, either from the GitHub mirror or from the Apache repository:

# From the GitHub mirror
$ git clone https://github.com/apache/bookkeeper

# From Apache directly
$ git clone git://git.apache.org/bookkeeper.git/

Build using Maven

Once you have the BookKeeper on your local machine, either by downloading or cloning it, you can then build BookKeeper from source using Maven:

$ mvn package

You can skip tests by adding the -DskipTests flag when running mvn package.

Useful Maven commands

Some other useful Maven commands beyond mvn package:

Command Action
mvn clean Removes build artifacts
mvn compile Compiles JAR files from Java sources
mvn compile findbugs:findbugs Compile using the Maven FindBugs plugin
mvn install Install the BookKeeper JAR locally in your local Maven cache (usually in the ~/.m2 directory)
mvn deploy Deploy the BookKeeper JAR to the Maven repo (if you have the proper credentials)
mvn verify Performs a wide variety of verification and validation tasks
mvn apache-rat:check Run Maven using the Apache Rat plugin
mvn compile javadoc:aggregate Build Javadocs locally
mvn package assembly:single Build a complete distribution using the Maven Assembly plugin

Package directory

The BookKeeper project contains several subfolders that you should be aware of:

Subfolder Contains
bookkeeper-server The BookKeeper server and client
bookkeeper-benchmark A benchmarking suite for measuring BookKeeper performance
bookkeeper-stats A BookKeeper stats library
bookkeeper-stats-providers BookKeeper stats providers

An entry is a sequence of bytes (plus some metadata) written to a BookKeeper ledger. Entries are also known as records.

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.

A bookie is an individual BookKeeper storage server.

Bookies store the content of ledgers and act as a distributed ensemble.

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.

Striping is the process of distributing BookKeeper ledgers to sub-groups of bookies rather than to all bookies in a BookKeeper ensemble.

Striping is essential to ensuring fast performance.

A journal file stores BookKeeper transaction logs.

When a reader forces a ledger to close, preventing any further entries from being written to the ledger.

A record is a sequence of bytes (plus some metadata) written to a BookKeeper ledger. Records are also known as entries.