You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Benjamin Anderson <b...@banjiewen.net> on 2015/07/13 19:43:13 UTC

Is myid actually limited to [1, 255]?

Hi there - I've observed that the documentation[1] suggests that each
node's myid should be an integer in the range [1, 255]. Is that
limitation codified anywhere? A quick perusal of the source suggests
that myid is parsed in to a Long and passed around as such through the
codebase.

For context, I'm working on automating a ZK deployment and having a
larger range for myid values would make my life easier.

Cheers!
--
b

[1]: http://zookeeper.apache.org/doc/r3.4.6/zookeeperAdmin.html

Re: Is myid actually limited to [1, 255]?

Posted by Alexander Shraer <sh...@gmail.com>.
negative ids could break stuff, such as here:

https://github.com/apache/zookeeper/blob/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java#L321

On Mon, Jul 13, 2015 at 11:07 AM, Raúl Gutiérrez Segalés <
rgs@itevenworks.net> wrote:

> Hi,
>
> On 13 July 2015 at 10:43, Benjamin Anderson <b...@banjiewen.net> wrote:
>
> > Hi there - I've observed that the documentation[1] suggests that each
> > node's myid should be an integer in the range [1, 255]. Is that
> > limitation codified anywhere? A quick perusal of the source suggests
> > that myid is parsed in to a Long and passed around as such through the
> > codebase.
> >
> > For context, I'm working on automating a ZK deployment and having a
> > larger range for myid values would make my life easier.
> >
>
> Yeah, definitely wrong (I've used 0, -1, ..). Mind opening a JIRA to get it
> fixed (a patch would be
> most welcomed too!). Otherwise I'll get to it a bit later. Thanks!
>
>
> -rgs
>

Re: Is myid actually limited to [1, 255]?

Posted by Raúl Gutiérrez Segalés <rg...@itevenworks.net>.
Hi,

On 13 July 2015 at 10:43, Benjamin Anderson <b...@banjiewen.net> wrote:

> Hi there - I've observed that the documentation[1] suggests that each
> node's myid should be an integer in the range [1, 255]. Is that
> limitation codified anywhere? A quick perusal of the source suggests
> that myid is parsed in to a Long and passed around as such through the
> codebase.
>
> For context, I'm working on automating a ZK deployment and having a
> larger range for myid values would make my life easier.
>

Yeah, definitely wrong (I've used 0, -1, ..). Mind opening a JIRA to get it
fixed (a patch would be
most welcomed too!). Otherwise I'll get to it a bit later. Thanks!


-rgs