Class TimestampedFileInputSplit
- java.lang.Object
-
- org.apache.flink.core.io.LocatableInputSplit
-
- org.apache.flink.core.fs.FileInputSplit
-
- org.apache.flink.streaming.api.functions.source.TimestampedFileInputSplit
-
- All Implemented Interfaces:
Serializable,Comparable<TimestampedInputSplit>,org.apache.flink.core.io.InputSplit,TimestampedInputSplit
public class TimestampedFileInputSplit extends org.apache.flink.core.fs.FileInputSplit implements TimestampedInputSplit
AFileInputSplitwithTimestampedInputSplit.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TimestampedFileInputSplit(long modificationTime, int num, org.apache.flink.core.fs.Path file, long start, long length, String[] hosts)Creates aTimestampedFileInputSplitbased on the file modification time and the rest of the information of theFileInputSplit, as returned by the underlying filesystem.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(TimestampedInputSplit o)booleanequals(Object o)longgetModificationTime()SerializablegetSplitState()inthashCode()voidsetSplitState(Serializable state)Sets the state of the split.StringtoString()-
Methods inherited from class org.apache.flink.core.io.LocatableInputSplit
getHostnames, getSplitNumber
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.flink.streaming.api.functions.source.TimestampedInputSplit
resetSplitState
-
-
-
-
Constructor Detail
-
TimestampedFileInputSplit
public TimestampedFileInputSplit(long modificationTime, int num, org.apache.flink.core.fs.Path file, long start, long length, String[] hosts)Creates aTimestampedFileInputSplitbased on the file modification time and the rest of the information of theFileInputSplit, as returned by the underlying filesystem.- Parameters:
modificationTime- the modification file of the file this split belongs tonum- the number of this input splitfile- the file namestart- the position of the first byte in the file to processlength- the number of bytes in the file to process (-1 is flag for "read whole file")hosts- the list of hosts containing the block, possiblynull
-
-
Method Detail
-
setSplitState
public 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
FileInputFormatsthat implement theCheckpointableInputFormatinterface.- Specified by:
setSplitStatein interfaceTimestampedInputSplit
-
getSplitState
public Serializable getSplitState()
- Specified by:
getSplitStatein interfaceTimestampedInputSplit- Returns:
- the state of the split.
-
getModificationTime
public long getModificationTime()
- Specified by:
getModificationTimein interfaceTimestampedInputSplit- Returns:
- The modification time of the file this split belongs to.
-
compareTo
public int compareTo(TimestampedInputSplit o)
- Specified by:
compareToin interfaceComparable<TimestampedInputSplit>
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classorg.apache.flink.core.fs.FileInputSplit
-
hashCode
public int hashCode()
- Overrides:
hashCodein classorg.apache.flink.core.fs.FileInputSplit
-
toString
public String toString()
- Overrides:
toStringin classorg.apache.flink.core.fs.FileInputSplit
-
-