zoo.putPersistentData(path, "forced down".getBytes(Constants.UTF8), NodeExistsPolicy.OVERWRITE);
return null;
}
// TODO move this to isReady() and drop while loop? - ACCUMULO-1259
Listener listener = master.getEventCoordinator().getListener();
master.shutdownTServer(server);
while (master.onlineTabletServers().contains(server)) {
TServerConnection connection = master.getConnection(server);
if (connection != null) {
try {
TabletServerStatus status = connection.getTableMap(false);
if (status.tableMap != null && status.tableMap.isEmpty()) {
log.info("tablet server hosts no tablets " + server);
connection.halt(master.getMasterLock());
log.info("tablet server asked to halt " + server);
break;
}
} catch (TTransportException ex) {
// expected
} catch (Exception ex) {
log.error("Error talking to tablet server " + server + ": " + ex);
}
}
listener.waitForEvents(1000);
}
return null;
}