@Override public synchronized void start() { this.lastRolledMillis = System.currentTimeMillis(); counter.start(); // signal that this sink is ready to process LOG.info("Started DatasetSink " + getName()); super.start(); }
@Override public synchronized void stop() { counter.stop(); try { // Close the writer and commit the transaction, but don't create a new // writer since we're stopping closeWriter(); commitTransaction(); } catch (EventDeliveryException ex) { rollbackTransaction(); LOG.warn("Closing the writer failed: " + ex.getLocalizedMessage()); LOG.debug("Exception follows.", ex); // We don't propogate the exception as the transaction would have been // rolled back and we can still finish stopping } // signal that this sink has stopped LOG.info("Stopped dataset sink: " + getName()); super.stop(); }
@Override public synchronized void start() { this.lastRolledMs = System.currentTimeMillis(); counter.start(); // signal that this sink is ready to process LOG.info("Started DatasetSink " + getName()); super.start(); }
@Override public synchronized void start() { this.lastRolledMillis = System.currentTimeMillis(); counter.start(); // signal that this sink is ready to process LOG.info("Started DatasetSink " + getName()); super.start(); }
@Override public synchronized void stop() { counter.stop(); if (writer != null) { // any write problems invalidate the writer, which is immediately closed writer.close(); this.writer = null; this.lastRolledMs = System.currentTimeMillis(); } // signal that this sink has stopped LOG.info("Stopped dataset sink: " + getName()); super.stop(); }
@Override public synchronized void stop() { counter.stop(); try { // Close the writer and commit the transaction, but don't create a new // writer since we're stopping closeWriter(); commitTransaction(); } catch (EventDeliveryException ex) { rollbackTransaction(); LOG.warn("Closing the writer failed: " + ex.getLocalizedMessage()); LOG.debug("Exception follows.", ex); // We don't propogate the exception as the transaction would have been // rolled back and we can still finish stopping } // signal that this sink has stopped LOG.info("Stopped dataset sink: " + getName()); super.stop(); }