public class TimestampedFileInputSplit extends FileInputSplit implements Comparable<TimestampedFileInputSplit>
FileInputSplit
that also includes information about:
ContinuousFileMonitoringFunction
and the
ContinuousFileReaderOperator
to perform continuous file processing.Constructor and Description |
---|
TimestampedFileInputSplit(long modificationTime,
int num,
Path file,
long start,
long length,
String[] hosts)
Creates a
TimestampedFileInputSplit based on the file modification time and
the rest of the information of the FileInputSplit , as returned by the
underlying filesystem. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(TimestampedFileInputSplit o) |
boolean |
equals(Object o) |
long |
getModificationTime() |
Serializable |
getSplitState() |
int |
hashCode() |
void |
resetSplitState()
Sets the state of the split to
null . |
void |
setSplitState(Serializable state)
Sets the state of the split.
|
String |
toString() |
getLength, getPath, getStart
getHostnames, getSplitNumber
public TimestampedFileInputSplit(long modificationTime, int num, Path file, long start, long length, String[] hosts)
TimestampedFileInputSplit
based on the file modification time and
the rest of the information of the FileInputSplit
, as returned by the
underlying filesystem.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, possibly null
public void setSplitState(Serializable state)
* This is applicable to
FileInputFormats
that implement the
CheckpointableInputFormat
interface.
public void resetSplitState()
null
.public Serializable getSplitState()
public long getModificationTime()
public int compareTo(TimestampedFileInputSplit o)
compareTo
in interface Comparable<TimestampedFileInputSplit>
public boolean equals(Object o)
equals
in class FileInputSplit
public int hashCode()
hashCode
in class FileInputSplit
public String toString()
toString
in class FileInputSplit
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.