Package org.apache.flink.core.fs
Class FileInputSplit
- java.lang.Object
-
- org.apache.flink.core.io.LocatableInputSplit
-
- org.apache.flink.core.fs.FileInputSplit
-
- All Implemented Interfaces:
Serializable
,InputSplit
- Direct Known Subclasses:
TimestampedFileInputSplit
@Public public class FileInputSplit extends LocatableInputSplit
A file input split provides information on a particular part of a file, possibly hosted on a distributed file system and replicated among several hosts.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FileInputSplit(int num, Path file, long start, long length, String[] hosts)
Constructs a split with host information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
long
getLength()
Returns the number of bytes in the file to process.Path
getPath()
Returns the path of the file containing this split's data.long
getStart()
Returns the position of the first byte in the file to process.int
hashCode()
String
toString()
-
Methods inherited from class org.apache.flink.core.io.LocatableInputSplit
getHostnames, getSplitNumber
-
-
-
-
Constructor Detail
-
FileInputSplit
public FileInputSplit(int num, Path file, long start, long length, String[] hosts)
Constructs a split with host information.- Parameters:
num
- 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
-
getPath
public Path getPath()
Returns the path of the file containing this split's data.- Returns:
- the path of the file containing this split's data.
-
getStart
public long getStart()
Returns the position of the first byte in the file to process.- Returns:
- the position of the first byte in the file to process
-
getLength
public long getLength()
Returns the number of bytes in the file to process.- Returns:
- the number of bytes in the file to process
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classLocatableInputSplit
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classLocatableInputSplit
-
toString
public String toString()
- Overrides:
toString
in classLocatableInputSplit
-
-