Hi,
On 20 February 2014 02:08, Abu-Aisheh <[email protected]> wrote:
> Good morning,
>
> Could anyone of you provide me with a simple java code that uses the Zab
> protocol of Zookeeper? I have been searching about that but I did not
> succeed to find a code that shows how can I use Zab.
>
There are papers by Patrick (Hunt) and Flavio (P. Junquiera) out there for
the theory and I'd say ZK's source under:
src/java/main/org/apache/zookeeper/server/quorum/{Leader.java,
Learner.java, LearnerHandler.java}
would be a good start. I don't know of a standalone ZAB library or
implementation (though that would be fun).
In fact what I need is simple, I have a MapReduce code and I want all the
> mappers to update a variable (let's say X) whenever they succeed to find a
> better value (i.e. a bigger value). In this case, the leader has to
> broadcast the actual best value to all mappers. How can I do such a thing
> in
> Java?
>
I am guessing it has to be in process and using ZK to store this
variables/state isn't an option?
Cheers,
-rgs