public class TimestampedFileInputSplit extends FileInputSplit implements TimestampedInputSplit
FileInputSplit
with TimestampedInputSplit
.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(TimestampedInputSplit o) |
boolean |
equals(Object o) |
long |
getModificationTime() |
Serializable |
getSplitState() |
int |
hashCode() |
void |
setSplitState(Serializable state)
Sets the state of the split.
|
String |
toString() |
getLength, getPath, getStart
getHostnames, getSplitNumber
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
resetSplitState
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.
setSplitState
in interface TimestampedInputSplit
public Serializable getSplitState()
getSplitState
in interface TimestampedInputSplit
public long getModificationTime()
getModificationTime
in interface TimestampedInputSplit
public int compareTo(TimestampedInputSplit o)
compareTo
in interface Comparable<TimestampedInputSplit>
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–2021 The Apache Software Foundation. All rights reserved.