A cautionary note with this problem - who says when 2 minutes is up? Clocks
will go forward at different rates and with different offsets. You cannot
rely on two machines having the same perception of what 2 minutes means. In
general, in distributed systems, it's a good design principle to
I do believe that it is relatively easy to set up high latency/high error
network interface clones in Linux. I haven't looked into that for several
years, but it used to be pretty easy.
You can also build a delegater that wraps a real ZK connection. That would
be more compatible with a mocked
Random back-off like this is unlikely to succeed (seems to me). Better to
use the watch on the locks directory to make the wait as long as possible
AND as short as possible.
On Wed, Feb 24, 2010 at 8:53 AM, Patrick Hunt ph...@apache.org wrote:
Anyone interested in locking an explicit resource
Hi Mahadev,
That is interesting. All I need to do is hold the connection for the
required time of a session that created an ephemeral node.
Zookeeper is an interesting tool.
Thanks again,
Martin
On 24 February 2010 17:00, Mahadev Konar maha...@yahoo-inc.com wrote:
Hi Martin,
There isnt an
Hi,
I take the point that the watch is useful for stopping clients unnecessarily
pestering the zk nodes.
I think that this is something I will have to experiment with and see how it
goes. I only need to place about 10k locks per minute, so I am hoping that
whatever approach I take is well
I am not sure if I was clear enoguh in my last message.
What is suggested was this:
Create a client with a timeout of lets say 10 seconds!
Zookeeper zk = new ZooKeeper(1); (for brevity ignoring other parameters)
Zk.create(/parent/ephemeral, data, EPEMERAL);
//create a another thread that
Hi Patrick,
Thanks for the info - the Fallacies link especially. As you might have
guessed, I am one the programmers new to distributed computing who is very
much in danger of messing things up.
I am going to have to knuckle down and do some experiments. Thankfully, I
don't think my
Hi martin,
Currently you cannot access the server that the client is connected to.
This was fixed in this jira
http://issues.apache.org/jira/browse/ZOOKEEPER-544
But again this does not tell you if you are connected to the primary or the
other followers. So you will anyway have to do some
Actually you can do it today, but not as easily. Look at the patch for
544 - in your test you need to create your own subclass of ZooKeeper,
then you can use the cnxn in a similar way as the patch does in order to
access the data. Not particularly hard, but we've wrapped it up in a
nice
I was thinking of adding it on the client. You can sub-class the client
connection and add any desired additional behaviors such as delays. I am
fond of mocking the client connection as well in order to simulate severe
malfunctions or failure scenarios.
On Wed, Feb 24, 2010 at 11:18 AM, Martin
You can simply implement the current system if you like by keeping a file
per card in ZK that contains your lock expiration time. The garbage
collector would work the same way. In order to make the getchildren
operation in the garbage collector work well, I would recommend a
hierarchical naming
11 matches
Mail list logo