|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapreduce.InputSplit
org.apache.hadoop.mapred.FileSplit
public class FileSplit
A section of an input file. Returned by InputFormat.getSplits(JobConf, int)
and passed to
InputFormat.getRecordReader(InputSplit,JobConf,Reporter)
.
Constructor Summary | |
---|---|
FileSplit(org.apache.hadoop.fs.Path file,
long start,
long length,
JobConf conf)
Deprecated. |
|
FileSplit(org.apache.hadoop.fs.Path file,
long start,
long length,
java.lang.String[] hosts)
Constructs a split with host information |
Method Summary | |
---|---|
long |
getLength()
The number of bytes in the file to process. |
java.lang.String[] |
getLocations()
Get the list of nodes by name where the data for the split would be local. |
org.apache.hadoop.fs.Path |
getPath()
The file containing this split's data. |
long |
getStart()
The position of the first byte in the file to process. |
void |
readFields(java.io.DataInput in)
|
java.lang.String |
toString()
|
void |
write(java.io.DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
@Deprecated public FileSplit(org.apache.hadoop.fs.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(org.apache.hadoop.fs.Path file, long start, long length, java.lang.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 nullMethod Detail |
---|
public org.apache.hadoop.fs.Path getPath()
public long getStart()
public long getLength()
getLength
in interface InputSplit
getLength
in class InputSplit
public java.lang.String toString()
toString
in class java.lang.Object
public void write(java.io.DataOutput out) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void readFields(java.io.DataInput in) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
public java.lang.String[] getLocations() throws java.io.IOException
InputSplit
getLocations
in interface InputSplit
getLocations
in class InputSplit
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |