Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F41DAFF6A for ; Wed, 17 Jul 2013 08:20:14 +0000 (UTC) Received: (qmail 92059 invoked by uid 500); 17 Jul 2013 08:20:13 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 91992 invoked by uid 500); 17 Jul 2013 08:20:12 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 91984 invoked by uid 500); 17 Jul 2013 08:20:11 -0000 Delivered-To: apmail-hadoop-zookeeper-user@hadoop.apache.org Received: (qmail 91980 invoked by uid 99); 17 Jul 2013 08:20:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jul 2013 08:20:10 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=SPF_FAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: encountered temporary error during SPF processing of domain of f.loocke@gmx.net) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jul 2013 08:20:05 +0000 Received: from jim.nabble.com ([192.168.236.80]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1UzMxI-00077h-7o for zookeeper-user@hadoop.apache.org; Wed, 17 Jul 2013 01:19:24 -0700 Date: Wed, 17 Jul 2013 01:19:24 -0700 (PDT) From: Chewy To: zookeeper-user@hadoop.apache.org Message-ID: <1374049164215-7578914.post@n2.nabble.com> In-Reply-To: References: <1373913099503-7578892.post@n2.nabble.com> Subject: Re: Zookeeper Internals & Dyn. Reconf. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi again, Thank you for answering so quickly.=20 >> - 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. whe= n checking for to be added and removed servers or for the members-entry insid= e the request, or when building/checking the QurumVerifier and so on? I=C2=B4m just asking in advance because I=C2=B4m done with bad surprises at= m ;) > 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=C2=B4ll try. But before I get something wrong, one more general question concernig this issue:=20 Changing the DataTree from within is just a manipulation of the server=C2= =B4s local data, right? It won=C2=B4t 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, >=20 >> - Are there any possible ways to let servers themselves cast requests >> like >> the ZooKeeper.class does? >=20 > not sure about this one, maybe someone else knows. >=20 >> - How can I extend the reconfig-request by certain parameters? >=20 > You need to change src/zookeeper.jute (look for ReconfigRequest) and > then recompile, which will update the relevant classes. >=20 >> - How can I implement fixed zNodes to the DataTree so they are created >> when >> servers startup, like the /zookeeper/config node? >=20 > 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: >=20 > // 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): >=20 > initConfigInZKDatabase(); >=20 > this is a method in QuorumPeer.java. Perhaps in your case you need > something similar, don't know. >=20 > Alex >=20 >=20 > On Mon, Jul 15, 2013 at 11:31 AM, Chewy < > f.loocke@ > > 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=C2=B4m searching, = i=C2=B4m >> 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=C2=B4s done with the conf= ig >> zNode. >> The Datatree structure can see the DataNode, but the standard-client doe= s >> 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 woul= d >> 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=C2=B4s appreciate any help. Thank you in advance (and another thanks t= o 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-Recon= f-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/Zo= okeeper-Internals-Dyn-Reconf-tp7578892p7578914.html Sent from the zookeeper-user mailing list archive at Nabble.com.