From zookeeper-user-return-2169-apmail-hadoop-zookeeper-user-archive=hadoop.apache.org@hadoop.apache.org Thu Sep 02 20:47:09 2010 Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 52769 invoked from network); 2 Sep 2010 20:47:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Sep 2010 20:47:09 -0000 Received: (qmail 63932 invoked by uid 500); 2 Sep 2010 20:47:08 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 63845 invoked by uid 500); 2 Sep 2010 20:47:08 -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 63837 invoked by uid 99); 2 Sep 2010 20:47:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Sep 2010 20:47:08 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_IN_DNSWL_NONE X-Spam-Check-By: apache.org Received-SPF: unknown (athena.apache.org: error in processing during lookup of strib@nicira.com) Received: from [209.85.161.48] (HELO mail-fx0-f48.google.com) (209.85.161.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Sep 2010 20:47:00 +0000 Received: by fxm17 with SMTP id 17so832279fxm.35 for ; Thu, 02 Sep 2010 13:46:39 -0700 (PDT) Received: by 10.223.108.71 with SMTP id e7mr9252951fap.13.1283460399340; Thu, 02 Sep 2010 13:46:39 -0700 (PDT) Received: from [172.16.0.50] (173-164-220-209-SFBA.hfc.comcastbusiness.net [173.164.220.209]) by mx.google.com with ESMTPS id h12sm481379faa.37.2010.09.02.13.46.37 (version=SSLv3 cipher=RC4-MD5); Thu, 02 Sep 2010 13:46:38 -0700 (PDT) Message-ID: <4C800CD7.50809@nicira.com> Date: Thu, 02 Sep 2010 13:45:11 -0700 From: Jeremy Stribling User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100619 Icedove/3.0.5 MIME-Version: 1.0 To: zookeeper-user@hadoop.apache.org Subject: maximum myid? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Can the server id in the myid field be any valid long value? I'm interested in generating, rather than pre-assigning, a unique id for every server, so my current plan is to convert the server's IP address into a 32-bit integer, and use the decimal, ASCII representation of that integer for the myid field. Can anyone think of a reason not to do this? For example, if the code ever uses the id as an index into an array, that would probably be bad. Thanks, Jeremy