@InterfaceAudience.Public @InterfaceStability.Stable public class FileSplit extends InputSplit implements InputSplitWithLocationInfo
InputFormat.getSplits(JobConf, int)
and passed to
InputFormat.getRecordReader(InputSplit,JobConf,Reporter)
.修飾子 | コンストラクタと説明 |
---|---|
protected |
FileSplit() |
|
FileSplit(FileSplit fs) |
|
FileSplit(Path file,
long start,
long length,
JobConf conf)
非推奨です。
|
|
FileSplit(Path file,
long start,
long length,
String[] hosts)
Constructs a split with host information
|
|
FileSplit(Path file,
long start,
long length,
String[] hosts,
String[] inMemoryHosts)
Constructs a split with host information
|
修飾子とタイプ | メソッドと説明 |
---|---|
long |
getLength()
The number of bytes in the file to process.
|
SplitLocationInfo[] |
getLocationInfo()
Gets info about which nodes the input split is stored on and how it is
stored at each location.
|
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(Path file, long start, long length, String[] hosts, String[] inMemoryHosts)
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 nullinMemoryHosts
- the list of hosts containing the block in memorypublic long getStart()
public long getLength()
getLength
インタフェース内 InputSplit
getLength
クラス内 InputSplit
public void write(DataOutput out) throws IOException
Writable
out
.write
インタフェース内 Writable
out
- DataOuput
to serialize this object into.IOException
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
インタフェース内 Writable
in
- DataInput
to deseriablize this object from.IOException
public String[] getLocations() throws IOException
InputSplit
getLocations
インタフェース内 InputSplit
getLocations
クラス内 InputSplit
IOException
@InterfaceStability.Evolving public SplitLocationInfo[] getLocationInfo() throws IOException
InputSplit
getLocationInfo
インタフェース内 InputSplitWithLocationInfo
getLocationInfo
クラス内 InputSplit
SplitLocationInfo
s describing how the split
data is stored at each location. A null value indicates that all the
locations have the data stored on disk.IOException
Copyright © 2016 Apache Software Foundation. All rights reserved.