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:

  1. $ curl -O http://apache.claz.org/bookkeeper/bookkeeper-4.13.0/bookkeeper-4.13.0-src.tar.gz
  2. $ tar xvf bookkeeper-4.13.0-src.tar.gz
  3. $ cd bookkeeper-4.13.0

Clone

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

  1. # From the GitHub mirror
  2. $ git clone https://github.com/apache/bookkeeper
  3. # From Apache directly
  4. $ 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:

  1. $ mvn package

Since 4.8.0, bookkeeper introduces table service. If you would like to build and tryout table service, you can build it with stream profile.

  1. $ mvn package -Dstream

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

Useful Maven commands

Some other useful Maven commands beyond mvn package:

CommandAction
mvn cleanRemoves build artifacts
mvn compileCompiles JAR files from Java sources
mvn compile spotbugs:spotbugsCompile using the Maven SpotBugs plugin
mvn installInstall the BookKeeper JAR locally in your local Maven cache (usually in the ~/.m2 directory)
mvn deployDeploy the BookKeeper JAR to the Maven repo (if you have the proper credentials)
mvn verifyPerforms a wide variety of verification and validation tasks
mvn apache-rat:checkRun Maven using the Apache Rat plugin
mvn compile javadoc:aggregateBuild Javadocs locally
mvn -am -pl bookkeeper-dist/server packageBuild a server distribution using the Maven Assembly plugin

You can enable table service by adding the -Dstream flag when running above commands.

Package directory

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

SubfolderContains
bookkeeper-serverThe BookKeeper server and client
bookkeeper-benchmarkA benchmarking suite for measuring BookKeeper performance
bookkeeper-statsA BookKeeper stats library
bookkeeper-stats-providersBookKeeper stats providers

Next