Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> Zookeeper Internals & Dyn. Reconf.


Copy link to this message
-
Re: Zookeeper Internals & Dyn. Reconf.
Hi Frank,

> - Are there any possible ways to let servers themselves cast requests like
> the ZooKeeper.class does?

not sure about this one, maybe someone else knows.

> - How can I extend the reconfig-request by certain parameters?

You need to change src/zookeeper.jute (look for ReconfigRequest) and
then recompile, which will update the relevant classes.

> - How can I implement fixed zNodes to the DataTree so they are created when
> servers startup, like the /zookeeper/config node?

DataTree.java is the right place, so I'm not sure why it doesn't work
for you. You can see how the quota node is implemented there. For
reconfiguration there were some cases where changing DataTree.java was
not enough. Here's a comment I made in QuorumPeer.java explaining
this:

       // There is no log record for the initial config, thus after syncing
       // with leader
       // /zookeeper/config is empty! it is also possible that last committed
       // config is propagated during leader election
       // without the propagation the corresponding log records.
       // so we should explicitly do this (this is not necessary when we're
       // already a Follower/Observer, only
       // for Learner):

       initConfigInZKDatabase();

this is a method in QuorumPeer.java. Perhaps in your case you need
something similar, don't know.

Alex
On Mon, Jul 15, 2013 at 11:31 AM, Chewy <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I could really need some help here.
>
> My task is to implement time-bound references for (not with) zookeeper. that
> is, server-configurations are bundled to grouped references (much like the
> config-command provides) and each reference guarantees a certain lifetime.
> Furthermore, there are some security and reliancy issues to be considered.
> The specific topics are not so important here, I only got some more general
> Questions on adapting the Zookeeper code.
>
> I worked myself in the depth of the implementation, but there are still a
> lot of unsolved technical problems left Only some of them at this point of
> time are these:
>
> - How can I extend the reconfig-request by certain parameters? What classes
> do i have to change? I found some, but most of time i´m searching, i´m
> ending up in dead ends.
>
> - How can I implement fixed zNodes to the DataTree so they are created when
> servers startup, like the /zookeeper/config node? I tried to by changing the
> DataTree.java, doing everythingthe same way it´s done with the config zNode.
> The Datatree structure can see the DataNode, but the standard-client does
> not. What did I miss?
>
> - Are there any possible ways to let servers themselves cast requests like
> the ZooKeeper.class does? I didnt find anything, so I guess I have to extend
> the servers by a ZooKeeper-Instance. In what classes on server side would I
> do that? I tried to insert an instance of zk in QuorumZooKeeperServer, but
> it doesnt seem to be able to establish a connection to the service (i want
> it to connect to its host-peer only). so i set the connectionstring to
> "localhost:" + clientportnumber of the server, which i got from the server
> itself. I created an instance of zk, but it threw an connection loss
> exception when trying to set up a request.
>
> I´s appreciate any help. Thank you in advance (and another thanks to Alex
> who already helped me via mail 2 weeks ago)
>
> Cheers,
>
> Frank
>
>
>
>
>
>
> --
> View this message in context: http://zookeeper-user.578899.n2.nabble.com/Zookeeper-Internals-Dyn-Reconf-tp7578892.html
> Sent from the zookeeper-user mailing list archive at Nabble.com.