@Override public synchronized void stop() { executor.shutdown(); try { executor.awaitTermination(10L, TimeUnit.SECONDS); } catch (InterruptedException ex) { logger.info("Interrupted while awaiting termination", ex); } executor.shutdownNow(); super.stop(); sourceCounter.stop(); logger.info("SpoolDir source {} stopped. Metrics: {}", getName(), sourceCounter); }
public void stop() { if (server != null && server.isServing()) { server.stop(); } servingExecutor.shutdown(); try { if (!servingExecutor.awaitTermination(5, TimeUnit.SECONDS)) { servingExecutor.shutdownNow(); } } catch (InterruptedException e) { throw new FlumeException("Interrupted while waiting for server to be " + "shutdown."); } sourceCounter.stop(); // Thrift will shutdown the executor passed to it. super.stop(); }
/** Stops the Source's event processing and shuts down the Twitter stream. */ @Override public void stop() { logger.debug("Shutting down Twitter sample stream..."); twitterStream.shutdown(); super.stop(); }
/** What happens when the stream is shutdown */ @Override public void stop() { System.out.println("Shutting down"); twitterStream.shutdown(); super.stop(); }
@Override public synchronized void stop() { RabbitMQUtil.close(_Connection, _Channel); super.stop(); }