@Override public void run() { while (fsRunning && shouldRun) { try { long numEdits = getCorrectTransactionsSinceLastLogRoll(); if (numEdits > rollThreshold) { FSNamesystem.LOG.info("NameNode rolling its own edit log because" + " number of edits in open segment exceeds threshold of " + rollThreshold); rollEditLog(); } } catch (Exception e) { FSNamesystem.LOG.error("Swallowing exception in " + NameNodeEditLogRoller.class.getSimpleName() + ":", e); } try { Thread.sleep(sleepIntervalMs); } catch (InterruptedException e) { FSNamesystem.LOG.info(NameNodeEditLogRoller.class.getSimpleName() + " was interrupted, exiting"); break; } } }
@Override // ClientProtocol public long rollEdits() throws AccessControlException, IOException { checkNNStartup(); CheckpointSignature sig = namesystem.rollEditLog(); return sig.getCurSegmentTxId(); }
@Override // NamenodeProtocol public CheckpointSignature rollEditLog() throws IOException { checkNNStartup(); namesystem.checkSuperuserPrivilege(); return namesystem.rollEditLog(); }
/** * Roll the edit log. */ public CheckpointSignature rollEditLog() throws IOException { return namesystem.rollEditLog(); }
/** * Roll the edit log. */ public CheckpointSignature rollEditLog() throws IOException { return namesystem.rollEditLog(); }
@Override // NamenodeProtocol public CheckpointSignature rollEditLog() throws IOException { checkNNStartup(); namesystem.checkSuperuserPrivilege(); return namesystem.rollEditLog(); }
@Override // ClientProtocol public long rollEdits() throws AccessControlException, IOException { checkNNStartup(); CheckpointSignature sig = namesystem.rollEditLog(); return sig.getCurSegmentTxId(); }
@Override // ClientProtocol public long rollEdits() throws AccessControlException, IOException { checkNNStartup(); CheckpointSignature sig = namesystem.rollEditLog(); return sig.getCurSegmentTxId(); }
@Override // NamenodeProtocol public CheckpointSignature rollEditLog() throws IOException { checkNNStartup(); namesystem.checkSuperuserPrivilege(); return namesystem.rollEditLog(); }
@Override public void run() { while (fsRunning && shouldRun) { try { FSEditLog editLog = getFSImage().getEditLog(); long numEdits = editLog.getLastWrittenTxId() - editLog.getCurSegmentTxId(); if (numEdits > rollThreshold) { FSNamesystem.LOG.info("NameNode rolling its own edit log because" + " number of edits in open segment exceeds threshold of " + rollThreshold); rollEditLog(); } } catch (Exception e) { FSNamesystem.LOG.error("Swallowing exception in " + NameNodeEditLogRoller.class.getSimpleName() + ":", e); } try { Thread.sleep(sleepIntervalMs); } catch (InterruptedException e) { FSNamesystem.LOG.info(NameNodeEditLogRoller.class.getSimpleName() + " was interrupted, exiting"); break; } } }
@Override public void run() { while (fsRunning && shouldRun) { try { FSEditLog editLog = getFSImage().getEditLog(); long numEdits = editLog.getLastWrittenTxId() - editLog.getCurSegmentTxId(); if (numEdits > rollThreshold) { FSNamesystem.LOG.info("NameNode rolling its own edit log because" + " number of edits in open segment exceeds threshold of " + rollThreshold); rollEditLog(); } } catch (Exception e) { FSNamesystem.LOG.error("Swallowing exception in " + NameNodeEditLogRoller.class.getSimpleName() + ":", e); } try { Thread.sleep(sleepIntervalMs); } catch (InterruptedException e) { FSNamesystem.LOG.info(NameNodeEditLogRoller.class.getSimpleName() + " was interrupted, exiting"); break; } } }
CheckpointSignature sig = fsn.rollEditLog(); LOG.warn("Checkpoint signature: " + sig);
CheckpointSignature sig = fsn.rollEditLog(); LOG.warn("Checkpoint signature: " + sig);