[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] ZooDiscovery without starting ANY ZooKeeper instance

Hi Martin,

The sole existence of zoodiscovery.autoStart regardless of being (zoodiscovery.autoStart=false or zoodiscovery.autoStart=true) will instruct  zooDiscovery to look for the system property  "zoodiscovery.flavor" then start  and configures itself following that  flavor. If no flavor system property is found it defaults starting a local zooKeeper server and connecting to it(useless in most cases). Not auto-stating means you must remove the "zoodiscovery.autoStart" property.

If those system properties are set then you go and call  this code (from your previous email)
>IContainer container =
>ID target = container.getConnectNamespace().createInstance(
        new String[] {"zoodiscovery.flavor.centralized=" + ip});
>container.connect(target, null);

then you're just duplicating your work.  You  just do it one way or the other, not both. That is, by setting system properties (at least  "zoodiscovery.autoStart<no need to true or false>" and  "zoodiscovery.flavor=some flavor") or programmatically the way you did as in your code above.

zooDiscovery instances configured to run centrally ("zoodiscovery.flavor.centralized"),  will all start just a client  zooKeeper and connect to the one instance playing the central role. Only the zooDiscovery instance playing that central role will start a server zooKeeper. as explained in :

Please let us know if we can be of any help.


From: Martin Petzold <mpetzold@xxxxxxx>
To: ecf-dev@xxxxxxxxxxx
Date: 07-02-2011 15:34
Subject: [ecf-dev] ZooDiscovery without starting ANY ZooKeeper instance

Hello folks,

at the moment (with zoodiscovery.autoStart=false) ZooDiscovery starts a
ZooKeeper instance when I create a container and the given IP
(...centralized=?) matches my IP, right? This is still not working well,
as IP detection with multiple ethernet devices is not supported
(problems with Linux and also if Java Security is activated).

So how can I use ZooDiscovery without having any ZooKeeper instance
created by ZooDiscovery, e.g. starting my own ZooKeeper Server somewhere

I think the ZooDiscovery API is rather confusing as there should be some
clear difference between starting a ZooKeeper instance and just
connecting to one.

I think ZooDiscovery is a great think for ECF, also the ZooDiscovery
implementation. What do you think about some improvements about the API?
I think i would like to file a Bug for this...



ecf-dev mailing list