zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chewy <f.loo...@gmx.net>
Subject Re: Zookeeper Internals & Dyn. Reconf.
Date Wed, 17 Jul 2013 08:19:24 GMT
Hi again,

Thank you for answering so quickly. 

>> - 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.


So, if changing the relevant entries there, among changing
ReconfRequest.java all necessary changes are inserted automatically to all
corresponing and participating classes that process this request? So, for
example, the /zookeeper/config zNode will contain the added information at
the end, while within the Request Processors the request is still readable
and everything is still working the same way as it did before like e.g. when
checking for to be added and removed servers or for the members-entry inside
the request, or when building/checking the QurumVerifier and so on?
I´m just asking in advance because I´m done with bad surprises atm ;)


> 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. [...]
>
> initConfigInZKDatabase();

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

I´ll try. But before I get something wrong, one more general question
concernig this issue: 
Changing the DataTree from within is just a manipulation of the server´s
local data, right? It won´t be changed/replicated at any time as long as
there are no requests that aim for that specific DataNode, or will it?
I just ask because unique server-related zNodes may come in handy for me.

Thank you once more,
Frank




Alexander Shraer-2 wrote
> 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 &lt;

> f.loocke@

> &gt; 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.





--
View this message in context: http://zookeeper-user.578899.n2.nabble.com/Zookeeper-Internals-Dyn-Reconf-tp7578892p7578914.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

Mime
View raw message