Interface TimestampedInputSplit

All Superinterfaces:
Comparable<TimestampedInputSplit>, org.apache.flink.core.io.InputSplit, Serializable
All Known Implementing Classes:
TimestampedFileInputSplit

public interface TimestampedInputSplit extends org.apache.flink.core.io.InputSplit, Comparable<TimestampedInputSplit>
An extended InputSplit that also includes information about:
  • The modification time of the file this split belongs to.
  • When checkpointing, the state of the split at the moment of the checkpoint.

This class is used by the ContinuousFileMonitoringFunction and the ContinuousFileReaderOperator to perform continuous file processing.

  • Method Details

    • setSplitState

      void setSplitState(Serializable state)
      Sets the state of the split. This information is used when restoring from a checkpoint and allows to resume reading the underlying file from the point we left off.

      * This is applicable to FileInputFormats that implement the CheckpointableInputFormat interface.

    • getSplitState

      Serializable getSplitState()
      Returns:
      the state of the split.
    • resetSplitState

      default void resetSplitState()
      Sets the state of the split to null.
    • getModificationTime

      long getModificationTime()
      Returns:
      The modification time of the file this split belongs to.