|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object 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(Path file,
long start,
long length,
JobConf conf)
Constructs a split. |
Method Summary | |
---|---|
File |
getFile()
Deprecated. Call getPath() instead. |
long |
getLength()
The number of bytes in the file to process. |
String[] |
getLocations()
Get the list of hostnames where the input split is located. |
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)
Reads the fields of this object from in . |
String |
toString()
|
void |
write(DataOutput out)
Writes the fields of this object to out . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 processMethod Detail |
---|
public File getFile()
getPath()
instead.
public Path getPath()
public long getStart()
public long getLength()
getLength
in interface InputSplit
public String toString()
toString
in class Object
public void write(DataOutput out) throws IOException
Writable
out
.
write
in interface Writable
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
in interface Writable
IOException
public String[] getLocations() throws IOException
InputSplit
getLocations
in interface InputSplit
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |