BookKeeper enables metrics collection through a variety of stats providers.

For a full listing of available metrics, see the Metrics reference doc.

Stats providers

BookKeeper has stats provider implementations for four five sinks:

Provider Provider class name
Codahale Metrics org.apache.bookkeeper.stats.CodahaleMetricsProvider
Prometheus org.apache.bookkeeper.stats.prometheus.PrometheusMetricsProvider
Finagle org.apache.bookkeeper.stats.FinagleStatsProvider
Ostrich org.apache.bookkeeper.stats.OstrichProvider
Twitter Science Provider org.apache.bookkeeper.stats.TwitterStatsProvider

The Codahale Metrics stats provider is the default provider.

Enabling stats providers in bookies

There are two stats-related configuration parameters available for bookies:

Parameter Description Default
enableStatistics Whether statistics are enabled for the bookie false
statsProviderClass The stats provider class used by the bookie org.apache.bookkeeper.stats.CodahaleMetricsProvider

To enable stats:

  • set the enableStatistics parameter to true
  • set statsProviderClass to the desired provider (see the table above for a listing of classes)

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.