@Override public void stop(final boolean abort) { if (!setRunning(false)) { return; } LOG.info("Stopping the WAL Procedure Store, isAbort=" + abort + (isSyncAborted() ? " (self aborting)" : "")); sendStopSignal(); if (!isSyncAborted()) { try { while (syncThread.isAlive()) { sendStopSignal(); syncThread.join(250); } } catch (InterruptedException e) { LOG.warn("join interrupted", e); Thread.currentThread().interrupt(); } } // Close the writer closeCurrentLogStream(abort); // Close the old logs // they should be already closed, this is just in case the load fails // and we call start() and then stop() for (ProcedureWALFile log: logs) { log.close(); } logs.clear(); loading.set(true); }
@Override public void stop(final boolean abort) { if (!setRunning(false)) { return; } LOG.info("Stopping the WAL Procedure Store, isAbort=" + abort + (isSyncAborted() ? " (self aborting)" : "")); sendStopSignal(); if (!isSyncAborted()) { try { while (syncThread.isAlive()) { sendStopSignal(); syncThread.join(250); } } catch (InterruptedException e) { LOG.warn("join interrupted", e); Thread.currentThread().interrupt(); } } // Close the writer closeCurrentLogStream(); // Close the old logs // they should be already closed, this is just in case the load fails // and we call start() and then stop() for (ProcedureWALFile log: logs) { log.close(); } logs.clear(); loading.set(true); }
@Override public void stop(final boolean abort) { if (!setRunning(false)) { return; } LOG.info("Stopping the WAL Procedure Store, isAbort=" + abort + (isSyncAborted() ? " (self aborting)" : "")); sendStopSignal(); if (!isSyncAborted()) { try { while (syncThread.isAlive()) { sendStopSignal(); syncThread.join(250); } } catch (InterruptedException e) { LOG.warn("join interrupted", e); Thread.currentThread().interrupt(); } } // Close the writer closeCurrentLogStream(abort); // Close the old logs // they should be already closed, this is just in case the load fails // and we call start() and then stop() for (ProcedureWALFile log: logs) { log.close(); } logs.clear(); loading.set(true); }