Re: feedback zkclient

2009-10-01 Thread Patrick Hunt
I started looking a bit more closely at the source, some questions: 1) I tried generating the javadocs (see my fork of the project on github if you want my changes to build.xml for this) but it looks like there's pretty much no javadoc. Some information, particularly on semantics of

Re: feedback zkclient

2009-10-01 Thread Peter Voss
Hi Patrick, On 01.10.2009, at 08:57, Patrick Hunt wrote: I started looking a bit more closely at the source, some questions: 1) I tried generating the javadocs (see my fork of the project on github if you want my changes to build.xml for this) but it looks like there's pretty much no

Re: feedback zkclient

2009-10-01 Thread Ted Dunning
I think that another way to say this is that zkClient is going a bit for the Spring philosophy that if the caller can't (or won't) be handling the situation, then they shouldn't be forced to declare it. The Spring jdbcTemplate is a grand example of the benefits of this. First implementations of

Re: feedback zkclient

2009-10-01 Thread Ted Dunning
There is not much way to totally avoid this without massive performance loss because the connection loss could be during the the time that the confirmation is returning. You may be able to tell if the file is yours be examining the content and ownership, but this is pretty implementation

Re: feedback zkclient

2009-10-01 Thread Patrick Hunt
Not to harp on this ;-) but this sounds like something that would be a very helpful addition to the README. Ted Dunning wrote: I think that another way to say this is that zkClient is going a bit for the Spring philosophy that if the caller can't (or won't) be handling the situation, then they

Re: feedback zkclient

2009-10-01 Thread Patrick Hunt
Ted Dunning wrote: You may be able to tell if the file is yours be examining the content and ownership, but this is pretty implementation dependent. In particular, it makes queues very difficult to implement correctly. If this happens during the creation of an ephemeral file, the only option

Re: feedback zkclient

2009-10-01 Thread Ted Dunning
That looks really lovely. Judging by history and that fact that only 40/127 issues are resolved, 3.3 is probably 3-6 months away. Is that a fair assessment? On Thu, Oct 1, 2009 at 11:13 AM, Patrick Hunt ph...@apache.org wrote: One nice thing about ephemeral is that the Stat contains the owner

Re: feedback zkclient

2009-10-01 Thread Patrick Hunt
Ted Dunning wrote: Judging by history and that fact that only 40/127 issues are resolved, 3.3 is probably 3-6 months away. Is that a fair assessment? Yes, that's fair. Patrick On Thu, Oct 1, 2009 at 11:13 AM, Patrick Hunt ph...@apache.org wrote: One nice thing about ephemeral is that the

Re: How do we find the Server the client is connected to?

2009-10-01 Thread Patrick Hunt
That detail is purposefully not exposed through the client api, however it is output to the log on connection establishment. Why would your client code need to know which server in the ensemble it is connected to? Patrick Rob Baccus wrote: How do I determine the server the client is

RE: How do we find the Server the client is connected to?

2009-10-01 Thread Todd Greenwood
Failover testing. -Original Message- From: Patrick Hunt [mailto:ph...@apache.org] Sent: Thursday, October 01, 2009 3:44 PM To: zookeeper-user@hadoop.apache.org; Rob Baccus Subject: Re: How do we find the Server the client is connected to? That detail is purposefully not exposed

problem starting ensemble mode

2009-10-01 Thread Hector Yuen
Hi all, I am trying to start zookeeper in two nodes, the configuration file I have is tickTime=2000 initLimit=10 syncLimit=5 dataDir=/var/zookeeper clientPort=2181 server.1=hec-bp1:2888:3888 server.2=hec-bp2:2888:3888 i also have two files /var/zookeeper/myid on each of the machines, the

Re: How do we find the Server the client is connected to?

2009-10-01 Thread Ted Dunning
Grovel the logs. On Thu, Oct 1, 2009 at 3:46 PM, Todd Greenwood to...@audiencescience.comwrote: Failover testing. -Original Message- From: Patrick Hunt [mailto:ph...@apache.org] Sent: Thursday, October 01, 2009 3:44 PM To: zookeeper-user@hadoop.apache.org; Rob Baccus Subject:

Re: How do we find the Server the client is connected to?

2009-10-01 Thread Patrick Hunt
It's possible, but not pretty. Try this: 1) create a subclass of ZooKeeper to be used in your tests 2) in the subclass add something like this: public String getConnectedServer() { return ((SocketChannel)cnxn.sendThread.sockKey.channel()).socket()

Re: How do we find the Server the client is connected to?

2009-10-01 Thread Patrick Hunt
Possible, but very ugly. I do something similar to this in zk tests: org.apache.zookeeper.server.quorum.QuorumPeerMainTest.testBadPeerAddressInQuorum() if you want to see an example. Patrick Ted Dunning wrote: Grovel the logs. On Thu, Oct 1, 2009 at 3:46 PM, Todd Greenwood

Re: problem starting ensemble mode

2009-10-01 Thread Patrick Hunt
Hi Hector, looks like a connectivity issue to me: NoRouteToHostException. 3888 is the election port 2888 is the quorum port basically, the ensemble uses the election port for leader election. Once a leader is elected it then uses the quorum port for subsequent communication. Could it be a