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 400BBF672 for ; Mon, 25 Mar 2013 01:29:00 +0000 (UTC) Received: (qmail 40541 invoked by uid 500); 25 Mar 2013 01:28:59 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 40397 invoked by uid 500); 25 Mar 2013 01:28:59 -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 40386 invoked by uid 99); 25 Mar 2013 01:28:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 01:28:59 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,HTML_OBFUSCATE_05_10,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nileader@gmail.com designates 74.125.82.45 as permitted sender) Received: from [74.125.82.45] (HELO mail-wg0-f45.google.com) (74.125.82.45) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 01:28:53 +0000 Received: by mail-wg0-f45.google.com with SMTP id dq12so767608wgb.12 for ; Sun, 24 Mar 2013 18:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=HFmMdPUNKVBT6k2mrjp8zM+1s8g1NfwdVnET7tQQ8FQ=; b=oY6jFZjreFGPeedCbiPGt93GOK7btVTfOB5tksiZKG0wcNPQiXwTSWoRX1MCkp7FrX HOskklTLD56nHJM3SN+40WSbQJuNq1OAmGMSuf7HqSSHZWHUrpVwbedG0K9w8x5B7yCd oqIECgHU8HwuWOeLZ6ct6DbuVmsCJwOZnh2lFeviAOpGe+7gvbn9j7YGRMSPIZ4O1+UP 6K7BjxcPWrnzz0Pua2h5KxCMsPe7+qY8ZIVqvHDOTY8Y8e0F6bhjj43iFXGOIarlDm5V OArEtdwdnlwEvToYyMMIXHKHhOlJ94vUfE1/YnJ6lMi6AblDi+AsqfFWcqeBRk3L6J+R GbDA== X-Received: by 10.194.21.233 with SMTP id y9mr14738110wje.47.1364174913418; Sun, 24 Mar 2013 18:28:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.109.39 with HTTP; Sun, 24 Mar 2013 18:27:53 -0700 (PDT) In-Reply-To: References: <6d56a29b.24d4f.13d86a6e26a.Coremail.qhwj2006@126.com> From: nileader Date: Mon, 25 Mar 2013 09:27:53 +0800 Message-ID: Subject: Re: Confused with zookeeper!!! To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=047d7b5d2774203d6c04d8b5b9e6 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d2774203d6c04d8b5b9e6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks Chris. And I can tell you some useful links in Chinese. First, you will need to have a overview for zookeeper: =E3=80=8A=E5=88=86= =E5=B8=83=E5=BC=8F=E6=9C=8D=E5=8A=A1=E6=A1=86=E6=9E=B6 Zookeeper -- =E7=AE=A1=E7=90=86=E5=88=86=E5=B8=83=E5=BC=8F=E7=8E=AF=E5=A2=83=E4=B8=AD= =E7=9A=84=E6=95=B0=E6=8D=AE=E3=80=8B http://www.ibm.com/developerworks/cn/opensource/os-cn-zookeeper/ Then=EF=BC=8Cyou may have no alternative but to want to do this thing, so =E3=80=8AZooKeeper=E7=AE=A1=E7=90=86=E5=91=98=E6=8C=87=E5=8D=97=E2=80=94=E2= =80=94=E9=83=A8=E7=BD=B2=E4=B8=8E=E7=AE=A1=E7=90=86ZooKeeper=E3=80=8Bwill h= elp you to build you own zookeeper cluster. http://rdc.taobao.com/team/jm/archives/2318 Next=EF=BC=8Cyou just want to use zookeeper in you program, Now, =E3=80=8AZ= ooKeeper Java API =E4=BD=BF=E7=94=A8=E6=A0=B7=E4=BE=8B=E3=80=8Bhttp://nileader.blog.51cto= .com/1381108/795265 After you can use zookeepr in a simple way, you need to know typical scene for zookeepr, so, =E3=80=8AZooKeeper=E5=85=B8=E5=9E=8B=E5=BA=94=E7=94=A8=E5= =9C=BA=E6=99=AF=E4=B8=80=E8=A7=88=E3=80=8B http://rdc.taobao.com/team/jm/archives/1232 Finally=EF=BC=8Czookeeper home page, it's always useful! http://zookeeper.a= pache.org *nileader* ni=E6=8E=8C=E6=AB=83=E7=9A=84=E5=80=8B=E4=BA=BA=E9=83=B5=E7=AE= =B1 *MSN*=EF=BC=9A nileader@gmail.com *Weibo*=EF=BC=9Ahttp://weibo.com/nileader =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94 This email (including any attachments) is confidential and may be legally privileged, private information of correct recipient and nileader. If you received this email in error, please delete it immediately and do not copy it or use it for any purpose or disclose its contents to any other person. Thank you. * =E6=9C=AC=E9=9B=BB=E9=83=B5(=E5=8C=85=E6=8B=AC=E4=BB=BB=E4=BD=95=E9=99=84= =E4=BB=B6)=E5=8F=AF=E8=83=BD=E5=90=AB=E6=9C=89=E6=A9=9F=E5=AF=86=E8=B3=87= =E6=96=99=E4=B8=A6=E5=8F=97=E6=B3=95=E5=BE=8B=E4=BF=9D=E8=AD=B7=EF=BC=8C=E5= =B1=AC=E6=96=BCni=E6=8E=8C=E6=AB=83=E5=92=8C=E6=AD=A3=E7=A2=BA=E6=94=B6=E4= =BB=B6=E4=BA=BA=E4=B9=8B=E9=96=93=E7=9A=84=E7=A7=81=E6=9C=89=E4=BF=A1=E6=81= =AF=E3=80=82=E5=A6=82=E6=82=A8=E4=B8=8D=E6=98=AF=E6=AD=A3=E7=A2=BA=E7=9A=84= =E6=94=B6=E4=BB=B6=E4=BA=BA=EF=BC=8C=E8=AB=8B=E6=82=A8=E7=AB=8B=E5=8D=B3=E5= =88=AA=E9=99=A4=E6=9C=AC=E9=83=B5=E4=BB=B6=E3=80=82=E8=AB=8B=E4=B8=8D=E8=A6= =81=E5=B0=87=E6=9C=AC=E9=9B=BB=E9=83=B5=E9=80=B2=E8=A1=8C=E8=A4=87=E8=A3=BD= =E4=B8=A6=E7=94=A8=E4=BD=9C=E4=BB=BB=E4=BD=95=E5=85=B6=E5=AE=83=E7=94=A8=E9= =80=94=EF=BC=8C=E6=88=96=E9=80=8F=E9=9C=B2=E6=9C=AC=E9=83=B5=E4=BB=B6=E4=B9= =8B=E5=85=A7=E5=AE=B9=E3=80=82=E8=AC=9D=E8=AC=9D=E3=80=82 * 2013/3/21 Chris Brinley > As someone recently new to zookeeper myself I can see the confusion. Here > is what I can suggest and I'm sure others will have far more experienced > input: > > To keep things simple I will skip over some details and features. > > Zookeeper is essentially an in memory replicated tree. This means any dat= a > you can represent as a tree can be placed in zookeeper and clients can > register to listen for changes to that tree. Mapping a basic XML document > to this model is probably easiest to understand. > Each node in zookeeper can represent a tag in the xml with the same sort > of hierarchy. > > The nodes themselves can have arbitrary data associated with them, though > off hand I'm not sure what the size and type limitations are. > But continuing this example the nodes of XML usually have attributes > associated with them and maybe some content between the open/close tags. > If you were mapping this onto zookeeper one option would be to put those > attributes and perhaps even the content between open/close tags as node > data. You could of course make a sub-node in the tree to represent the > content between open/close tags. > > That's essentially it. Some of the practical challenges will likely cente= r > around how your apps currently read config data. These are the areas that > need to be translated into zookeeper compatible logic. Also where today > you may start and read config once to fully take advantage of zookeeper > you'd likely want to react dynamically as state changes in zoookeeper, > though this can obviously be a latter phase as much difficulty can be > hidden here. Depending on how you abstract configuration load/read in you= r > code today this may or may not represent a big migration challenge. > > I'm sure there are many follow on questions but hopefully this gives you > some context to start with. > Also if you brand new to zookeeper you might want to checkout Curator > which can help lower the learning curve by handling some of the > housekeeping required of the client. This client also implements some > common usage patterns (few of which you listed in your question). > > Regards, > > On 3/20/13 2:15 AM, "=E5=90=B4=E9=9D=96" wrote: > > >hi, guys=EF=BC=81 > > > > > > I am new to zookeeper. and I 'm quite confused with zookeeper, as i > >know zookeeper is a coordination service for distributed applications. > >In Hbase,Zookeeper keeps all the meta data of the Hbase nodes,so all the > >node can see the same meta data, this is the coordination service. > > but what confused me is how to used zookeeper ? for example If we hav= e > >a distributed system, and we need to unify the configuration files for > >all nodes=EF=BC=8C how can we use the zookeeper? Just put the configurat= ion files > >in zookeeper(znode) and let the distributed nodes read from zookeeper? > > > > > >thank you ! > > --047d7b5d2774203d6c04d8b5b9e6--