Beispiel #1
0
  @AfterClass
  public static void shutdown() {
    kafkaGateway.stop();
    pluginRegistry.stop();

    simpleKafkaGateway.stop();
    pluginRegistry2.stop();

    try {
      if (kafkaServer != null) {
        kafkaServer.shutdown();
        kafkaServer.awaitShutdown();
      }
      zkTestServer.shutdownNetwork();
    } finally {
      try {
        FileUtils.deleteDirectory(kafkaLogFile);
      } catch (IOException e) {
        e.printStackTrace();
      }
    }
  }
Beispiel #2
0
 public void shutdown() {
   try {
     logger.info("shutting down node...");
     try {
       _core.shutdown();
       _clusterClient.removeNode(_id);
       _clusterClient.shutdown();
       _serverNode = null;
       pluginRegistry.stop();
       _core.getPluggableSearchEngineManager().close();
     } catch (Exception e) {
       logger.warn(e.getMessage());
     } finally {
       if (_networkServer != null) {
         _networkServer.shutdown();
       }
     }
   } catch (Exception e) {
     logger.error(e.getMessage(), e);
   }
 }