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 303E57097 for ; Fri, 2 Sep 2011 16:48:21 +0000 (UTC) Received: (qmail 16014 invoked by uid 500); 2 Sep 2011 16:48:20 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 15991 invoked by uid 500); 2 Sep 2011 16:48:20 -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 15983 invoked by uid 99); 2 Sep 2011 16:48:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2011 16:48:19 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ted.dunning@gmail.com designates 209.85.216.170 as permitted sender) Received: from [209.85.216.170] (HELO mail-qy0-f170.google.com) (209.85.216.170) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2011 16:48:15 +0000 Received: by qyl38 with SMTP id 38so756740qyl.15 for ; Fri, 02 Sep 2011 09:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=xQWLBKW7SvRa204cxmR3TuH2CjVjb1wk4irTpCAPODI=; b=gqQVrHZT6J9Hik/SQLMuMKtJ4+lLU73cwG7XiUtlArnWvymqb9w+XPs8J5RDs3gZYA nL0P5tHn5Qq4djBoM2rgYwKH65g3YB5sU3PFWN04eI0FX/egB+yeQMo26nv8ezIhB6Lq gRY0mzLxw+AbxSPUj2G8dBS5hsr4gqHy8SvSc= Received: by 10.224.213.5 with SMTP id gu5mr915739qab.23.1314982074137; Fri, 02 Sep 2011 09:47:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.80.136 with HTTP; Fri, 2 Sep 2011 09:47:34 -0700 (PDT) In-Reply-To: References: From: Ted Dunning Date: Fri, 2 Sep 2011 11:47:34 -0500 Message-ID: Subject: Re: An interesting problem removing a key To: user@zookeeper.apache.org Cc: Matthew Willis , Mike Cao Content-Type: multipart/alternative; boundary=20cf300fb1e76a3a8904abf81fce --20cf300fb1e76a3a8904abf81fce Content-Type: text/plain; charset=UTF-8 Probably it would be a bit of a larger task than you would like, but building a proxy might let you do what you want. Then you could simply filter out the notifications you don't want people to see. On Fri, Sep 2, 2011 at 11:22 AM, Ben Hall wrote: > Yeah - I guess to explain a little more... we have a very large number of > clients out in the wild that in essence going to each pool of clients would > be a huge hassle and pain. So - yes we could update our client and provide > a watcher switch but it would be very cumbersome to get to and update each > of the clients. We could also change the ZK structure - but again we would > have to change all of the clients in the wild - a step we are trying to > avoid. > > In short we were looking for just a quick workaround or hack from the > server ensemble perspective even though it may not be a supported or > recommended function - this would be just a one time thing for us. > > Thanks > Ben > > > On Sep 2, 2011, at 12:22 AM, Ted Dunning wrote: > > > I would recommend not spending a whole lot of time figuring out how to > make > > Zookeeper lie to the clients. It is hard enough to make distributed > > software that tells the truth. > > > > Why don't you just make the ZK structure match what you are trying to do? > > For instance, have a znode containing the key and a separate znode that > is > > just for watching. Then the server has the option of updating both > znodes > > or just the key depending on what behavior you want to get. > > > > This is simple and straightforward and makes it very clear what you mean > to > > do. Why hack the server for such a thing? > > > > On Fri, Sep 2, 2011 at 1:37 AM, Mahadev Konar >wrote: > > > >> Ben, > >> I dont think I fully understand the use case. Is it possible that you > >> can register a different callback for that key? > >> > >> Something like: > >> > >> zk.exists(String path, Watcher watcher) > >> > >> where you can register a different watcher for this path? > >> > >> Would this work? > >> > >> mahadev > >> > >> > >> On Thu, Sep 1, 2011 at 5:58 PM, Ben Hall wrote: > >>> Hi, > >>> > >>> We have an interesting problem use case that we wanted to ping the > group > >> about. > >>> > >>> We have a Key on all of our Ensemble servers. All of our clients are > >> also subscribed to this key. We want to remove the key from the > ensemble > >> servers without this action getting propagated down to the clients. Or > if > >> it does get propagated down - at a minimum we do not want to watch > callback > >> function to be called. > >>> > >>> Is there a way to in essence sever the watches from the server > >> perspective without the client knowing? > >>> > >>> We are investing looking into the hidden keys on the zookeeper servers > >> that hold the list of watches and possibly editing that key. has anyone > >> done that before? Do we know what happens when that key is edited > manually? > >>> > >>> Any other suggestions or possibilities available to us? > >>> > >>> Thanks > >>> Ben > >> > > --20cf300fb1e76a3a8904abf81fce--