java.lang.Object
org.apache.flink.runtime.checkpoint.filemerging.LogicalFile

public class LogicalFile extends Object
An abstraction of logical files in file-merging checkpoints. It stands for a data segment, that is to say a single file before file-merging.
  • Constructor Details

  • Method Details

    • getFileId

      public LogicalFile.LogicalFileId getFileId()
    • advanceLastCheckpointId

      public void advanceLastCheckpointId(long checkpointId)
      A logical file may share across checkpoints (especially for shared state). When this logical file is used/reused by a checkpoint, update the last checkpoint id that uses this logical file.
      Parameters:
      checkpointId - the checkpoint that uses this logical file.
    • discardWithCheckpointId

      public void discardWithCheckpointId(long checkpointId) throws IOException
      When a checkpoint that uses this logical file is subsumed or aborted, discard this logical file. If this file is used by a later checkpoint, the file should not be discarded. Note that the removal of logical may cause the deletion of physical file.
      Parameters:
      checkpointId - the checkpoint that is notified subsumed or aborted.
      Throws:
      IOException - if anything goes wrong with file system.
    • getLastUsedCheckpointID

      public long getLastUsedCheckpointID()
    • getPhysicalFile

      @Nonnull public PhysicalFile getPhysicalFile()
    • getStartOffset

      public long getStartOffset()
    • getLength

      public long getLength()
    • getSubtaskKey

      @Nonnull public FileMergingSnapshotManager.SubtaskKey getSubtaskKey()
    • isDiscarded

      @VisibleForTesting public boolean isDiscarded()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object