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 0BE3C1040C for ; Mon, 15 Jul 2013 21:32:03 +0000 (UTC) Received: (qmail 62158 invoked by uid 500); 15 Jul 2013 21:32:02 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 62125 invoked by uid 500); 15 Jul 2013 21:32:02 -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 62117 invoked by uid 500); 15 Jul 2013 21:32:02 -0000 Delivered-To: apmail-hadoop-zookeeper-user@hadoop.apache.org Received: (qmail 62114 invoked by uid 99); 15 Jul 2013 21:32:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jul 2013 21:32:02 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of shralex@gmail.com designates 209.85.223.170 as permitted sender) Received: from [209.85.223.170] (HELO mail-ie0-f170.google.com) (209.85.223.170) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jul 2013 21:31:56 +0000 Received: by mail-ie0-f170.google.com with SMTP id e11so27532405iej.15 for ; Mon, 15 Jul 2013 14:31:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=GH+WaP37kS0wnUb6tHRS9q6mJOoAgRQAtKFGueHAKpQ=; b=Hye39XdQs63STV4fT/ttxzxbJYr/UfRBcHYo/aAcppJy4er1K2n3YsHNp8NZfkDawN 5oZ9OIAOJ0ewUvJ8nLU1X+ANzwB3s6XYtVdZEciOXS8VL7hS0IzUW0jtNc/Lvnwwogzf O4WV75fko1k5l3QJRf4kuxUI0/wJrwGz394Zhuk8DH+XkC43SFZYQgaN+hj9DBh11+RC fqgPbTchiGZtAiDarr77CziZi7ZmmPuDKhSfcNKLil0cgT2Fg/oCq4c9tVxn/g5HvrN5 S4Os6x/UOEEjB+9l68FKjPkHGUiSR01tJ8RyZ22RmP/is0cvQYO3I0bzFlA9Z3HHjG/E 2lxw== X-Received: by 10.43.67.73 with SMTP id xt9mr18688077icb.99.1373923895186; Mon, 15 Jul 2013 14:31:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.131.106 with HTTP; Mon, 15 Jul 2013 14:31:15 -0700 (PDT) In-Reply-To: <1373913099503-7578892.post@n2.nabble.com> References: <1373913099503-7578892.post@n2.nabble.com> From: Alexander Shraer Date: Mon, 15 Jul 2013 14:31:15 -0700 Message-ID: Subject: Re: Zookeeper Internals & Dyn. Reconf. To: user@zookeeper.apache.org Cc: zookeeper-user@hadoop.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Frank, > - Are there any possible ways to let servers themselves cast requests lik= e > 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 wh= en > 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 committ= ed // 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 wrote: > Hi all, > > I could really need some help here. > > My task is to implement time-bound references for (not with) zookeeper. t= hat > is, server-configurations are bundled to grouped references (much like th= e > 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 gener= al > 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 o= f > time are these: > > - How can I extend the reconfig-request by certain parameters? What class= es > do i have to change? I found some, but most of time i=B4m searching, i=B4= m > ending up in dead ends. > > - How can I implement fixed zNodes to the DataTree so they are created wh= en > servers startup, like the /zookeeper/config node? I tried to by changing = the > DataTree.java, doing everythingthe same way it=B4s done with the config z= Node. > 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 lik= e > the ZooKeeper.class does? I didnt find anything, so I guess I have to ext= end > 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, bu= t > it doesnt seem to be able to establish a connection to the service (i wan= t > it to connect to its host-peer only). so i set the connectionstring to > "localhost:" + clientportnumber of the server, which i got from the serve= r > itself. I created an instance of zk, but it threw an connection loss > exception when trying to set up a request. > > I=B4s appreciate any help. Thank you in advance (and another thanks to Al= ex > 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.