public class CombineFileSplit extends Object implements InputSplit
FileSplit
,
CombineFileSplit * class does not represent a split of a file, but a split of input files
into smaller sets. A split may contain blocks from different file but all
the blocks in the same split are probably local to some rack RecordReader
's,
with reading one record per file.构造器和说明 |
---|
CombineFileSplit()
default constructor
|
CombineFileSplit(CombineFileSplit old)
Copy constructor
|
CombineFileSplit(JobConf job,
Path[] files,
long[] lengths) |
CombineFileSplit(JobConf job,
Path[] files,
long[] start,
long[] lengths,
String[] locations) |
限定符和类型 | 方法和说明 |
---|---|
JobConf |
getJob() |
long |
getLength()
Get the total number of bytes in the data of the
InputSplit . |
long |
getLength(int i)
Returns the length of the ith Path
|
long[] |
getLengths()
Returns an array containing the lengths of the files in the split
|
String[] |
getLocations()
Returns all the Paths where this input-split resides
|
int |
getNumPaths()
Returns the number of Paths in the split
|
long |
getOffset(int i)
Returns the start offset of the ith Path
|
Path |
getPath(int i)
Returns the ith Path
|
Path[] |
getPaths()
Returns all the Paths in the split
|
long[] |
getStartOffsets()
Returns an array containing the startoffsets of the files in the split
|
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 . |
public CombineFileSplit()
public CombineFileSplit(JobConf job, Path[] files, long[] start, long[] lengths, String[] locations)
public CombineFileSplit(CombineFileSplit old) throws IOException
IOException
public JobConf getJob()
public long getLength()
InputSplit
InputSplit
.getLength
在接口中 InputSplit
public long[] getStartOffsets()
public long[] getLengths()
public long getOffset(int i)
public long getLength(int i)
public int getNumPaths()
public Path getPath(int i)
public Path[] getPaths()
public String[] getLocations() throws IOException
getLocations
在接口中 InputSplit
InputSplit
is
located as an array of String
s.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 void write(DataOutput out) throws IOException
Writable
out
.write
在接口中 Writable
out
- DataOuput
to serialize this object into.IOException
Copyright © 2009 The Apache Software Foundation