The server id (myid) should be a number btw 1 and 255. See item 5 here: http://hadoop.apache.org/zookeeper/docs/current/zookeeperAdmin.html#sc_zkMulitServerSetup
The lower 8 bits of the myid is used as the upper 8 bits in session id generation, you might end up with duplicate session ids if you use values outside the range specified. <http://hadoop.apache.org/zookeeper/docs/current/zookeeperAdmin.html#sc_zkMulitServerSetup> Patrick On Thu, Sep 2, 2010 at 1:45 PM, Jeremy Stribling <st...@nicira.com> wrote: > 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 > >