We are starting the process of moving to Apache. We have been approved as a
subproject of Hadoop and are in the process of moving subversion over. We
will also be moving over the documentation and tracker items.
For now, the only thing setup on Apache is Jira, the bug tracking system.
Please
You can do this. We only done preliminary testing with that configuration. You
may need to increase the tickTime if the pipe between A and B has high
latency and you start seeing timeouts.
There is a bit of a gotcha that you need to keep in mind. Currently clients
select servers at random to
The client library is in charge of preventing expirations, if it happens it is
probably because of dead servers or network problems that caused a spike in
latency.
Increasing your session timeout helps prevent this.
If/when it happens, you need create another ZooKeeper object to reconnect to
Good point. The recipe we show guarantees there will be a single leader
elected, but only the leader knows it. Jacob Levy has been implementing a
client library to do leader election, so he should really chime in here, but
just in case he doesn't: I believe Jacob's solution was for the leader
You understand it correctly. The confusion is the result of a bug you
have found. I've filed a bug report with a patch for your problem:
https://issues.apache.org/jira/browse/ZOOKEEPER-48. Since there weren't
any authenticated ids on the channel, when CREATOR_ALL_ACL was used the
ACL was empty.
The easiest way to fix this code is to move the Collections.sort(values) to
right after the zk.getChildren() and then use the following Comparator with
Collections.sort() and Collections.binarySearch():
/* This Comparator defines an ordering such that the strings with
* the lowest sequence
Jacob answered your first question. With respect to your last question,
yes it is save to share ZooKeeper objects. The ZooKeeper object is
thread safe and it is much more efficient for all threads to share the
same object rather than having an object per thread.
ben
Anthony Urso wrote:
I have a
Creative idea. This should work. It's kind of a pain. I don't think
there is a Jira opened for this, but you should open one. It's really a
matter of implementation. You should be able to add (or remove) a
machine to ZooKeeper and just have it get integrated in without having
to do any restarting.