/** * Receive a notification that the NameNode has begun a new edit log. * This causes the BN to also start the new edit log in its local * directories. */ synchronized void namenodeStartedLogSegment(long txid) throws IOException { editLog.startLogSegment(txid, true, namesystem.getEffectiveLayoutVersion()); if (bnState == BNState.DROP_UNTIL_NEXT_ROLL) { setState(BNState.JOURNAL_ONLY); } if (stopApplyingEditsOnNextRoll) { if (bnState == BNState.IN_SYNC) { LOG.info("Stopped applying edits to prepare for checkpoint."); setState(BNState.JOURNAL_ONLY); } stopApplyingEditsOnNextRoll = false; notifyAll(); } }
setState(BNState.IN_SYNC);
setState(BNState.IN_SYNC);
setState(BNState.IN_SYNC);