You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Gaojinchao <ga...@huawei.com> on 2011/08/29 08:38:07 UTC
About failover
version: Trunk.
When we startup a cluster, processDeadServers shouldn't be called,
otherwise we will create a lots of unuseful zk nodes.
As follows:
void joinCluster() throws IOException, KeeperException, InterruptedException {
Map<ServerName,List<Pair<HRegionInfo,Result>>> deadServers =
rebuildUserRegions();
//when startup the cluster,all regions are considered as dead ones.
//we will create a offline zk node for each region. But these nodes are cleared in function processRegionsInTransition
processDeadServers(deadServers);
//Determine whether it is failover. If it is not , we will clean all the zk nodes.
processRegionsInTransition(deadServers);
}