Hello everybody!
Please give me advice about designing application on zookeeper. I'd like
to implement queue with limit on number of simultaneous tasks. For
example I have 10 tasks, and I can process only 2 tasks simultaneously.
When one task is finished processing, system should start
Dear ZooKeeper users,
a short question about ZooKeeper's consistency model:
Does ZooKeeper support read-your-writes consistency? E.g., after
having created a node, will the same client always find the newly
created node via getChildren? If yes, is this specified behavior the
client can rely on?
Nodes are maintained un-ordered on the server. A node can store any
subnodes, not exclusively sequential nodes. If we added an ordering
guarantee then then server would have to store the children sorted for
every parent node. This is a problem for a few reasons; 1) in many cases
you don't care
Yes, this is a strong guarantee:
http://hadoop.apache.org/zookeeper/docs/current/zookeeperProgrammers.html#ch_zkGuarantees
Sync is only necessary if client A makes a change, then client B wishes
to read that change with guarantee that it will see the successfully
applied change previously made
Hey Patrik!
Thanks for the reply.
I understand all the reasons that you posted above and totally agree that
nodes should not be sorted since you then have to pay that overhead for
every node, even though you might not need or want it.
I just thought that it might be possible to create a sequential
the create is atomic. we just use a data structure that does not store
the list of children in order.
ben
Erik Holstad wrote:
Hey Patrik!
Thanks for the reply.
I understand all the reasons that you posted above and totally agree that
nodes should not be sorted since you then have to pay that
Thanks Patrick!
I'm not sure if I've miss read the code for the DataNode, but to me it looks
like every node gets a set of children even though it might be an
ephemeral node which cannot have children, so we are wasting 240 B for every
one of those. Not sure if it makes a big difference, but just thinking
that
Hi Erik,
I am not sure if that would a considerable opitmization but even if you
wanted to do it, it would be much more than just adding a check in the
constructor (the serialization/deserialization would need to have
specialized code). Right now all the datanodes are treated equally for
Erik, if you'd like enter a JIRA and take a whack at it go ahead.
Perhaps a subclass of DataNode specific for ephemerals? That way it can
handle any particulars - and should also minimize the number of
if(children==null) type checks that would be needed. (don't neg.
impact performance or b/w
Will file Jira and have a stab at it when I get a little time.
Thanks guys!
11 matches
Mail list logo