hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Greenwood" <to...@audiencescience.com>
Subject Runtime Interrogation of the Ensemble
Date Mon, 31 Aug 2009 20:56:58 GMT
Is there a way to query an ensemble and find out who is the current
leader?

Along those lines, what facilities exist for interrogating the ensemble
and the ensemble members? I'm thinking (dreaming) of an API like:

Ensemble : object representing a zookeeper ensemble

	Long Ensemble.getLastTxid()
	ZKServer Ensemble.getCurrentLeader()
	ZKServer[] Ensemble.getPastLeaders()
	ZKServer[] Ensemble.getConnectedServers()
	ZKServer[] Ensemble.getDisConnectedServers()
	Boolean doWeHaveAQuorum()

ZKServer : object representing a zookeeper server

	Client[] ZKServer.getClients()
	Client[] ZKServer.getDisconnectedClients()
	Boolean isLeader()
	Boolean isAbleToBeLeader()
	int get|set VotingWeight()
	Group get|set GroupMembership()

It would be cool if...

1. The ensemble could trigger nagios type alerts if it no longer had a
quorum
2. The ensemble could dynamically bring up new zk servers in the event
that enough severs have died to prevent a quorum
3. The ensemble/server api could allow analysis of problem servers
(servers that keep dropping connections and/or clients)

-Todd

Mime
View raw message