zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "郭平(坤宇)" <guoping...@alibaba-inc.com>
Subject can the value of myid > 255?
Date Tue, 20 Dec 2016 15:50:56 GMT
In the zookeeper's document for v3.4.6, it says 
"...The myid file consists of a single line containing only the text of that machine's id.
So myid of server 1 would contain the text "1" and nothing else. The id must be unique within
the ensemble and should have a value between 1 and 255..."

but by checking the source code, I can not see any limitation on this myid?? So if I have
config a myid > 255, is there any side effect??

    /**     * My id     */    private long myid;

I want to use the host ip to auto generate myid (ip2long) in bash shell when install zookeeper,
but the auto generated will greater than 255
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message