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
@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 booleanequals(Object obj)longgetLength()Returns the number of bytes in the file to process.PathgetPath()Returns the path of the file containing this split's data.longgetStart()Returns the position of the first byte in the file to process.inthashCode()StringtoString()-
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:
hashCodein classLocatableInputSplit
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classLocatableInputSplit
-
toString
public String toString()
- Overrides:
toStringin classLocatableInputSplit
-
-