AbstractThis guide contains detailed information about using BookKeeper for logging. It discusses the basic operations BookKeeper supports, and how to create logs and perform basic read and write operations on these logs. Getting Started: Setting up BookKeeper to write logs.This document contains information to get you started quickly with BookKeeper. It is aimed primarily at developers willing to try it out, and contains simple installation instructions for a simple BookKeeper installation and a simple programming example. For further programming detail, please refer to BookKeeper Programmer's Guide. Pre-requisitesSee System Requirements the Admin guide. DownloadBookKeeper trunk can be downloaded from subversion. See "Version Control:http://zookeeper.apache.org/bookkeeper/svn.html. LocalBookKeeperBookKeeper provides a utility program to start a standalone ZooKeeper ensemble and a number of bookies on a local machine. As this all runs on a local machine, throughput will be very low. It should only be used for testing. To start a local bookkeeper ensemble with 5 bookies: Setting up bookiesIf you're bold and you want more than just running things locally, then you'll need to run bookies in different servers. You'll need at least three bookies to start with. For each bookie, we need to execute a command like the following: This command will use the default directories for storing ledgers and the write ahead log, and will look for a zookeeper server on localhost:2181. See the Admin Guide for more details. To see the default values of these configuration variables, run: Setting up ZooKeeperZooKeeper stores metadata on behalf of BookKeeper clients and bookies. To get a minimal ZooKeeper installation to work with BookKeeper, we can set up one server running in standalone mode. Once we have the server running, we need to create a few znodes:
ExampleIn the following excerpt of code, we:
|