@Override public void run() { LOGGER.info("Running shutdown hook"); if (_fakeInstance != null) { try { _fakeInstance.stop(); } catch (Exception e) { LOGGER.error("Failed to Shutdown FakeInstance !!"); } } LOGGER.info("Shutdown completed !!"); } }
@AfterTest public void shutdown() { LOGGER.info("Trying to shutdown"); for (FakeInstance fakeInstance : FAKE_INSTANCES) { try { LOGGER.info("Trying to shutdown: " + fakeInstance); fakeInstance.stop(); } catch (Exception e) { } } LOGGER.info("Trying to stop controller"); CONTROLLER_STARTER.stop(); LOGGER.info("Trying to stop zk"); kafkaBrokerTopicObserver.stop(); KafkaStarterUtils.stopServer(kafkaStarter); ZK_CLIENT.deleteRecursive("/" + HELIX_CLUSTER_NAME); ZK_CLIENT.close(); ZkStarter.stopLocalZkServer(); }
LOGGER.info("Trying to bring down: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).stop(); } else { for (int k = 0; k < 10; ++k) {
LOGGER.info("Trying to bring down: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).stop(); } else { for (int k = 0; k < 10; ++k) {
if (i % 2 == 0) { LOGGER.info("Trying to bring down: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).stop(); totalInstancesSize--; } else { for (int i = 0; i < fakeInstances.size() - 1; ++i) { LOGGER.info("Trying to bring down: " + fakeInstances.get(i).getInstanceId()); fakeInstances.get(i).stop(); totalInstancesSize--; Thread.sleep(5000);
if (i % 2 == 0) { LOGGER.info("Trying to bring down: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).stop(); totalInstancesSize--; } else { for (int i = 0; i < fakeInstances.size() - 1; ++i) { LOGGER.info("Trying to bring down: " + fakeInstances.get(i).getInstanceId()); fakeInstances.get(i).stop(); totalInstancesSize--; Thread.sleep(5000);
if (i % 2 == 0) { LOGGER.info("Trying to bring down: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).stop(); totalInstancesSize--; } else { for (int i = 0; i < fakeInstances.size() - 1; ++i) { LOGGER.info("Trying to bring down: " + fakeInstances.get(i).getInstanceId()); fakeInstances.get(i).stop(); totalInstancesSize--; Thread.sleep(3000);
if (i % 2 == 0) { LOGGER.info("Trying to bring down: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).stop(); totalInstancesSize--; } else { for (int i = 0; i < fakeInstances.size() - 1; ++i) { LOGGER.info("Trying to bring down: " + fakeInstances.get(i).getInstanceId()); fakeInstances.get(i).stop(); totalInstancesSize--; Thread.sleep(2000);
@Override public void run() { LOGGER.info("Running shutdown hook"); if (_fakeInstance != null) { try { _fakeInstance.stop(); } catch (Exception e) { LOGGER.error("Failed to Shutdown FakeInstance !!"); } } LOGGER.info("Shutdown completed !!"); } }
@AfterTest public void shutdown() { LOGGER.info("Trying to shutdown"); for (FakeInstance fakeInstance : FAKE_INSTANCES) { try { LOGGER.info("Trying to shutdown: " + fakeInstance); fakeInstance.stop(); } catch (Exception e) { } } LOGGER.info("Trying to stop controller"); CONTROLLER_STARTER.stop(); LOGGER.info("Trying to stop zk"); kafkaBrokerTopicObserver.stop(); KafkaStarterUtils.stopServer(kafkaStarter); ZK_CLIENT.deleteRecursive("/" + HELIX_CLUSTER_NAME); ZK_CLIENT.close(); ZkStarter.stopLocalZkServer(); }
if (i % 2 == 0) { LOGGER.info("Trying to bring down: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).stop(); totalInstancesSize--; } else { for (int i = 0; i < fakeInstances.size() - 1; ++i) { LOGGER.info("Trying to bring down: " + fakeInstances.get(i).getInstanceId()); fakeInstances.get(i).stop(); totalInstancesSize--; Thread.sleep(6000);
LOGGER.info("Trying to bring down: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).stop(); } else { for (int k = 0; k < 10; ++k) {
if (i % 2 == 0) { LOGGER.info("Trying to bring down: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).stop(); totalInstancesSize--; } else { for (int i = 0; i < fakeInstances.size() - 1; ++i) { LOGGER.info("Trying to bring down: " + fakeInstances.get(i).getInstanceId()); fakeInstances.get(i).stop(); totalInstancesSize--; Thread.sleep(6000);