Re: Usage of myId

2010-03-05 Thread Nick Dimiduk
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 he...@cloudera.com 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 yeqian@gmail.com 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.laksh...@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



Re: Usage of myId

2010-03-05 Thread Patrick Hunt
re previous discussion see this thread: 
http://www.mail-archive.com/zookeeper-user@hadoop.apache.org/msg00916.html


Patrick

Nick Dimiduk wrote:

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 he...@cloudera.com 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 yeqian@gmail.com 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.laksh...@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





Re: Usage of myId

2010-03-01 Thread Henry Robinson
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 yeqian@gmail.com 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.laksh...@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