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
A
FileInputSplit with TimestampedInputSplit.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTimestampedFileInputSplit(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
Modifier and TypeMethodDescriptionintbooleanlonginthashCode()voidsetSplitState(Serializable state) Sets the state of the split.toString()Methods inherited from class org.apache.flink.core.fs.FileInputSplit
getLength, getPath, getStartMethods inherited from class org.apache.flink.core.io.LocatableInputSplit
getHostnames, getSplitNumberMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.flink.core.io.InputSplit
getSplitNumberMethods inherited from interface org.apache.flink.streaming.api.functions.source.TimestampedInputSplit
resetSplitState
-
Constructor Details
-
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 Details
-
setSplitState
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
- 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
- Specified by:
compareToin interfaceComparable<TimestampedInputSplit>
-
equals
- Overrides:
equalsin classorg.apache.flink.core.fs.FileInputSplit
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.apache.flink.core.fs.FileInputSplit
-
toString
- Overrides:
toStringin classorg.apache.flink.core.fs.FileInputSplit
-