Database Reference
In-Depth Information
Mode: standalone
Node count: 1954
Finally, the reqs command returns currently outstanding requests, useful
for determining whether or not clients are blocked.
ZooKeeper's Native Java Client
The ZooKeeper library ships with a Java client that you can use in projects.
This section describes setting up a Maven project to use the ZooKeeper
library. It also covers the basic usage of the client.
Adding ZooKeeper to a Maven Project
The basic ZooKeeper client library, version 3.4.5 at the time of writing, is
hosted on Maven Central and can be included in a project by adding the
following dependencies to the project's pom.xml :
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.4.5</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
Note that the log4j artifact has been excluded from the ZooKeeper artifact
and then manually included. This addresses a problem specific to the
version of Log4J included by ZooKeeper 1.2.15, which references libraries
that are no longer accessible. If a newer version of ZooKeeper has been
Search WWH ::




Custom Search