@Override protected void doStop() throws Exception { LOG.info("Stopping flowlet: " + flowletContext); try { driver.stopAndWait(); } finally { // Close all consumers for (ConsumerSupplier consumerSupplier : consumerSuppliers) { Closeables.closeQuietly(consumerSupplier); } flowletContext.close(); } LOG.info("Flowlet stopped: " + flowletContext); }