Package org.apache.flink.core.io
Class LocatableInputSplit
- java.lang.Object
-
- org.apache.flink.core.io.LocatableInputSplit
-
- All Implemented Interfaces:
Serializable
,InputSplit
- Direct Known Subclasses:
FileInputSplit
,HadoopInputSplit
,HadoopInputSplit
@Public public class LocatableInputSplit extends Object implements InputSplit, Serializable
A locatable input split is an input split referring to input data which is located on one or more hosts.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LocatableInputSplit(int splitNumber, String hostname)
Creates a new locatable input split that refers to a single host as its data location.LocatableInputSplit(int splitNumber, String[] hostnames)
Creates a new locatable input split that refers to a multiple host as its data location.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String[]
getHostnames()
Returns the names of the hosts storing the data this input split refers toint
getSplitNumber()
Returns the number of this input split.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
LocatableInputSplit
public LocatableInputSplit(int splitNumber, String[] hostnames)
Creates a new locatable input split that refers to a multiple host as its data location.- Parameters:
splitNumber
- The number of the splithostnames
- The names of the hosts storing the data this input split refers to.
-
LocatableInputSplit
public LocatableInputSplit(int splitNumber, String hostname)
Creates a new locatable input split that refers to a single host as its data location.- Parameters:
splitNumber
- The number of the split.hostname
- The names of the host storing the data this input split refers to.
-
-
Method Detail
-
getSplitNumber
public int getSplitNumber()
Description copied from interface:InputSplit
Returns the number of this input split.- Specified by:
getSplitNumber
in interfaceInputSplit
- Returns:
- the number of this input split
-
getHostnames
public String[] getHostnames()
Returns the names of the hosts storing the data this input split refers to- Returns:
- the names of the hosts storing the data this input split refers to
-
-