static final String I_DONT_KNOW_WHY = "unexpected failure";
@Override
public void update(LiveTServerSet current, Set<TServerInstance> deleted, Set<TServerInstance> added) {
DeadServerList obit = new DeadServerList(ZooUtil.getRoot(instance) + Constants.ZDEADTSERVERS);
if (added.size() > 0) {
log.info("New servers: " + added);
for (TServerInstance up : added)
obit.delete(up.hostPort());
}
for (TServerInstance dead : deleted) {
String cause = I_DONT_KNOW_WHY;
if (serversToShutdown.contains(dead))
cause = "clean shutdown"; // maybe an incorrect assumption
if (!getMasterGoalState().equals(MasterGoalState.CLEAN_STOP))
obit.post(dead.hostPort(), cause);
}
Set<TServerInstance> unexpected = new HashSet<TServerInstance>(deleted);
unexpected.removeAll(this.serversToShutdown);
if (unexpected.size() > 0) {