@InterfaceAudience.Public @InterfaceStability.Stable public class FileSplit extends InputSplit implements InputSplit
InputFormat.getSplits(JobConf, int) and passed to
InputFormat.getRecordReader(InputSplit,JobConf,Reporter).| Modifier | Constructor and Description |
|---|---|
protected |
FileSplit() |
|
FileSplit(FileSplit fs) |
|
FileSplit(Path file,
long start,
long length,
JobConf conf)
Deprecated.
|
|
FileSplit(Path file,
long start,
long length,
String[] hosts)
Constructs a split with host information
|
| Modifier and Type | Method and Description |
|---|---|
long |
getLength()
The number of bytes in the file to process.
|
String[] |
getLocations()
Get the list of nodes by name where the data for the split would be local.
|
Path |
getPath()
The file containing this split's data.
|
long |
getStart()
The position of the first byte in the file to process.
|
void |
readFields(DataInput in)
Deserialize the fields of this object from
in. |
String |
toString() |
void |
write(DataOutput out)
Serialize the fields of this object to
out. |
protected FileSplit()
@Deprecated public FileSplit(Path file, long start, long length, JobConf conf)
file - the file namestart - the position of the first byte in the file to processlength - the number of bytes in the file to processpublic FileSplit(Path file, long start, long length, String[] hosts)
file - the file namestart - the position of the first byte in the file to processlength - the number of bytes in the file to processhosts - the list of hosts containing the block, possibly nullpublic FileSplit(FileSplit fs)
public Path getPath()
public long getStart()
public long getLength()
getLength in interface InputSplitgetLength in class InputSplitpublic void write(DataOutput out) throws IOException
Writableout.write in interface Writableout - DataOuput to serialize this object into.IOExceptionpublic void readFields(DataInput in) throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface Writablein - DataInput to deseriablize this object from.IOExceptionpublic String[] getLocations() throws IOException
InputSplitgetLocations in interface InputSplitgetLocations in class InputSplitIOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.