use of org.apache.bookkeeper.replication.AutoRecoveryMain in project pulsar by yahoo.
the class BookKeeperClusterTestCase method stopAutoRecoveryService.
private void stopAutoRecoveryService(BookieServer toRemove) throws Exception {
AutoRecoveryMain autoRecoveryMain = autoRecoveryProcesses.remove(toRemove);
if (null != autoRecoveryMain && isAutoRecoveryEnabled()) {
autoRecoveryMain.shutdown();
LOG.debug("Shutdown auto recovery for bookieserver:" + toRemove.getLocalAddress());
}
}
use of org.apache.bookkeeper.replication.AutoRecoveryMain in project pulsar by yahoo.
the class BookKeeperClusterTestCase method stopBKCluster.
/**
* Stop cluster. Also, stops all the auto recovery processes for the bookie cluster, if isAutoRecoveryEnabled is
* true.
*
* @throws Exception
*/
protected void stopBKCluster() throws Exception {
if (bkc != null) {
bkc.close();
}
for (BookieServer server : bs) {
server.shutdown();
AutoRecoveryMain autoRecovery = autoRecoveryProcesses.get(server);
if (autoRecovery != null && isAutoRecoveryEnabled()) {
autoRecovery.shutdown();
LOG.debug("Shutdown auto recovery for bookieserver:" + server.getLocalAddress());
}
}
bs.clear();
for (File f : tmpDirs) {
FileUtils.deleteDirectory(f);
}
}
Aggregations