Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix for README about internal zk handle. #6

Open
wants to merge 1 commit into from

1 participant

@arosien

Signature and usage was wrong as the callback returns ZooKeeperClient, though getHandle() will return the new ZooKeeper instance.

Adam Rosien Fix getting internal zk handle docs.
Signature and usage was wrong as the callback returns ZooKeeperClient, though getHandle() will return the new ZooKeeper instance.
59569ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 19, 2012
  1. Fix getting internal zk handle docs.

    Adam Rosien authored
    Signature and usage was wrong as the callback returns ZooKeeperClient, though getHandle() will return the new ZooKeeper instance.
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 README.markdown
View
8 README.markdown
@@ -92,11 +92,11 @@ Get the internal zookeeper handle to pass to other libraries:
import com.twitter.zookeeper.ZooKeeperClient
import org.apache.zookeeper.ZooKeeper
- def zkListener(zkHandle : ZooKeeper) {
+ def zkListener(zkClient : ZooKeeperClient) {
// use zkHandle
- println("Internal zookeeper handle changed: %s".format(zkHandle))
- // Note that zkListener will be called with a new handle whenever the Zookeeper session
- // has expired and a new connection to the Zookeeper servers is created
+ println("Internal zookeeper handle changed: %s".format(zkClient.getHandle()))
+ // Note that zkListener will be called with the same ZooKeeperClient instance
+ // whenever the Zookeeper session has expired and a new connection to the Zookeeper servers is created
}
val zk = new ZooKeeperClient("localhost:2181", zkListener _)
Something went wrong with that request. Please try again.