|
1 | | -Hedwig is a large scale pub/sub system built on top of ZooKeeper and BookKeeper. |
| 1 | +Build instructions for BookKeeper |
2 | 2 |
|
3 | | -For documentation on building, setting up, and using Hedwig see the `doc` directory. |
| 3 | +------------------------------------------------------------------------------- |
| 4 | +Requirements: |
| 5 | + |
| 6 | +* Unix System |
| 7 | +* JDK 1.6 |
| 8 | +* Maven 3.0 |
| 9 | +* Autotools (if compiling native hedwig client) |
| 10 | +* Internet connection for first build (to fetch all dependencies) |
| 11 | + |
| 12 | +------------------------------------------------------------------------------- |
| 13 | +The BookKeeper project contains: |
| 14 | + |
| 15 | + - bookkeeper-server (BookKeeper server and client) |
| 16 | + - bookkeeper-benchmark (Benchmark suite for testing BookKeeper performance) |
| 17 | + - hedwig-protocol (Hedwig network protocol) |
| 18 | + - hedwig-client (Hedwig client library) |
| 19 | + - hedwig-server (Hedwig server) |
| 20 | + |
| 21 | +BookKeeper is a system to reliably log streams of records. It is designed to |
| 22 | +store write ahead logs, such as those found in database or database like |
| 23 | +applications. |
| 24 | + |
| 25 | +Hedwig is a publish-subscribe system designed to carry large amounts of data |
| 26 | +across the internet in a guaranteed-delivery fashion from those who produce |
| 27 | +it (publishers) to those who are interested in it (subscribers). |
| 28 | + |
| 29 | +-------------------------------------------------------------------------------- |
| 30 | +How do I build? |
| 31 | + |
| 32 | + BookKeeper uses maven as its build system. To build, run "mvn package" from the |
| 33 | + top-level directory, or from within any of the submodules. |
| 34 | + |
| 35 | + Useful maven commands are: |
| 36 | + |
| 37 | + * Clean : mvn clean |
| 38 | + * Compile : mvn compile |
| 39 | + * Run tests : mvn test |
| 40 | + * Create JAR : mvn package |
| 41 | + * Run findbugs : mvn compile findbugs:findbugs |
| 42 | + * Install JAR in M2 cache : mvn install |
| 43 | + * Deploy JAR to Maven repo : mvn deploy |
| 44 | + * Run Rat : mvn apache-rat:check |
| 45 | + * Build javadocs : mvn compile javadoc:aggregate |
| 46 | + * Build distribution : mvn package assembly:single |
| 47 | + |
| 48 | + Tests options: |
| 49 | + |
| 50 | + * Use -DskipTests to skip tests when running the following Maven goals: |
| 51 | + 'package', 'install', 'deploy' or 'verify' |
| 52 | + * -Dtest=<TESTCLASSNAME>,<TESTCLASSNAME#METHODNAME>,.... |
| 53 | + * -Dtest.exclude=<TESTCLASSNAME> |
| 54 | + * -Dtest.exclude.pattern=**/<TESTCLASSNAME1>.java,**/<TESTCLASSNAME2>.java |
| 55 | + |
| 56 | +-------------------------------------------------------------------------------- |
| 57 | +How do I run the services? |
| 58 | + |
| 59 | + Running a Hedwig service requires a running BookKeeper service, which in turn |
| 60 | + requires a running ZooKeeper service (see http://zookeeper.apache.org). To |
| 61 | + start a bookkeeper service quickly for testing, run: |
| 62 | + |
| 63 | + $ bookkeeper-server/bin/bookkeeper localbookie 10 |
| 64 | + |
| 65 | + This will start a standalone, ZooKeeper instance and 10 BookKeeper bookies. |
| 66 | + Note that this is only useful for testing. Data is not persisted between runs. |
| 67 | + |
| 68 | + To start a real BookKeeper service, you must set up a ZooKeeper instance and |
| 69 | + run start a bookie on several machines. Modify bookkeeper-server/conf/bk_server.conf |
| 70 | + to point to your ZooKeeper instance. To start a bookie run: |
| 71 | + |
| 72 | + $ bookkeeper-server/bin/bookkeeper bookie |
| 73 | + |
| 74 | + Once you have at least 3 bookies runnings, you can start some Hedwig hubs. A |
| 75 | + hub is a machines which is responsible for a set of topics in the pubsub |
| 76 | + system. The service automatically distributes the topics among the hubs. |
| 77 | + To start a hedwig hub: |
| 78 | + |
| 79 | + $ hedwig-server/bin/hedwig server |
| 80 | + |
| 81 | + You can get more help on using these commands by running: |
| 82 | + |
| 83 | + $ bookkeeper-server/bin/bookkeeper help |
| 84 | + and |
| 85 | + $ hedwig-server/bin/hedwig help |
0 commit comments