Class FileJournalManager.EditLogFile

java.lang.Object
org.apache.hadoop.hdfs.server.namenode.FileJournalManager.EditLogFile
Enclosing class:
FileJournalManager

@Private public static class FileJournalManager.EditLogFile extends Object
Record of an edit log that has been located and had its filename parsed.
  • Method Details

    • getFirstTxId

      public long getFirstTxId()
    • getLastTxId

      public long getLastTxId()
    • scanLog

      public void scanLog(long maxTxIdToScan, boolean verifyVersion) throws IOException
      Find out where the edit log ends. This will update the lastTxId of the EditLogFile or mark it as corrupt if it is.
      Parameters:
      maxTxIdToScan - Maximum Tx ID to try to scan. The scan returns after reading this or a higher ID. The file portion beyond this ID is potentially being updated.
      verifyVersion - Whether the scan should verify the layout version
      Throws:
      IOException
    • isInProgress

      public boolean isInProgress()
    • getFile

      public File getFile()
    • moveAsideEmptyFile

      public void moveAsideEmptyFile() throws IOException
      Throws:
      IOException
    • moveAsideStaleInprogressFile

      public void moveAsideStaleInprogressFile() throws IOException
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object