Closes #2 Replacing all references to ZooKeeper with CuratorFramework wh...

...ere possible.
I don't believe I changed the amount of connections being created. The
CuratorFactory is rather verbose so I wanted to encapsulate the lengthy
pieces in a factory method to make it a little more clean. I did get a
sense, however, that there were quite a few connections that could have
been shared and I do think it's time to clean that up sooner rather than
later.

There's a chicken and egg situation happening with the SharedResources
class that i'll try to fix. The problem is, you need a CuratorFramework to
create the Configuration and you need a Configuration to get the
SharedResources from it. At that point, you've created 2 curator
frameworks. I'll fix this as well.


On Fri, Aug 1, 2014 at 11:01 AM, Keith Turner <notifications@github.com>
wrote:

> In modules/core/src/main/java/io/fluo/core/util/CuratorUtil.java:
>
> > @@ -0,0 +1,13 @@
> > +package io.fluo.core.util;
> > +
> > +import org.apache.curator.framework.*;
> > +import org.apache.curator.retry.*;
> > +
> > +public class CuratorUtil {
> > +
> > +  private CuratorUtil() {}
> > +
> > +  public static CuratorFramework getCurator(String zookeepers, long timeout) {
> > +    return CuratorFrameworkFactory.newClient(zookeepers, 30000, 30000, new ExponentialBackoffRetry(1000, 10));
>
> Ideally each worker process would have one zookeeper connection. I have no
> idea if this is achieved in the code. After making this change, do you have
> a sense of that?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/fluo-io/fluo/pull/110/files#r15700404>.
>