Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 19244 invoked from network); 6 Mar 2010 00:27:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Mar 2010 00:27:08 -0000 Received: (qmail 51281 invoked by uid 500); 6 Mar 2010 00:26:52 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 51260 invoked by uid 500); 6 Mar 2010 00:26:51 -0000 Mailing-List: contact zookeeper-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-user@hadoop.apache.org Delivered-To: mailing list zookeeper-user@hadoop.apache.org Received: (qmail 51252 invoked by uid 99); 6 Mar 2010 00:26:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Mar 2010 00:26:51 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ndimiduk@gmail.com designates 209.85.216.201 as permitted sender) Received: from [209.85.216.201] (HELO mail-px0-f201.google.com) (209.85.216.201) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Mar 2010 00:26:47 +0000 Received: by pxi39 with SMTP id 39so1441281pxi.29 for ; Fri, 05 Mar 2010 16:26:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=Yl11WaEObhSiwakeUdr1Kgdys3lC3D9SsF5NQtVFbX0=; b=VgmXKVzaimFACQ/RmlbZunuiaHadlJmwr+EJZSNI2T3hTLoDKdqGPrr/L6sNxvC4Sl mPKpOK7Oh2G4hUTM9q88uKKaPaepRUo6ym5oyutU/wNE/m3UV6f+IH0Qnz99nEKv2m8y pmIWN7VXCjV5mzDNfLe9fKnXtsYUnXzumCeCI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=JcMaqi+tbPjhV1/NEgrhAPHlvUr0M9aU7kUAl1wHuYJ1FRGcilSZXkbkhUGjIhnnQK fuRIUy11XWaYXttiG8XCWB0Q/gy50laG6gsw5PC70BGYg0E9NE5BOWOGRS1+psZvwHBh 64PFCPMZvrfS8sby+HOZcT4fSuRIn8TRYnzGk= MIME-Version: 1.0 Received: by 10.143.26.13 with SMTP id d13mr1127490wfj.0.1267835186946; Fri, 05 Mar 2010 16:26:26 -0800 (PST) In-Reply-To: References: Date: Fri, 5 Mar 2010 16:26:26 -0800 Message-ID: <86e557c1003051626m705541c9gdecbf1b925ea2bf5@mail.gmail.com> Subject: Re: Usage of myId From: Nick Dimiduk To: zookeeper-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=001636e0ac8af3ade9048116e164 --001636e0ac8af3ade9048116e164 Content-Type: text/plain; charset=UTF-8 I think automating this assignment has been discussed in the past. IIRC, some combination of MAC address and pid or timestamp would be sufficient to uniquely identify a ZK instance. There may be some detail I'm forgetting about maintaining the ID between process restarts, making these ephemeral values unacceptable. Cheers, -Nick On Mon, Mar 1, 2010 at 6:56 PM, Henry Robinson wrote: > If you have two servers with the same myid, two servers will identify > themselves as the 'same' machine X in a ZooKeeper ensemble. This id is used > to map onto a hostname / port pair where messages for a given server are > sent. Assuming a consistent quorum specification across all machines, > messages for server X will only go to one machine and the other will think > itself partitioned from the network. > > Servers need ids to distinguish themselves from other servers in order to > break symmetry and successfully elect a leader. > > Henry > > On 27 February 2010 23:06, Qian Ye wrote: > > > myid is used to identify your service instance, with its help, it is > > possible to start more than one Zookeeper service on one computer. If the > > configuration of myid is wrong, the service can not be started properly. > > > > On Sun, Feb 28, 2010 at 11:39 AM, Avinash Lakshman < > > avinash.lakshman@gmail.com> wrote: > > > > > Why is this important? What breaks down if I have 2 servers with the > same > > > myId? > > > > > > Cheers > > > A > > > > > > > > > > > -- > > With Regards! > > > > Ye, Qian > > > > > > -- > Henry Robinson > Software Engineer > Cloudera > 415-994-6679 > --001636e0ac8af3ade9048116e164--