@InterfaceAudience.Public @InterfaceStability.Stable public class CombineFileSplit extends InputSplit implements org.apache.hadoop.io.Writable
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.FileSplit
,
CombineFileInputFormat
Constructor and Description |
---|
CombineFileSplit()
default constructor
|
CombineFileSplit(CombineFileSplit old)
Copy constructor
|
CombineFileSplit(org.apache.hadoop.fs.Path[] files,
long[] lengths) |
CombineFileSplit(org.apache.hadoop.fs.Path[] files,
long[] start,
long[] lengths,
String[] locations) |
Modifier and Type | Method and Description |
---|---|
long |
getLength()
Get the size of the split, so that the input splits can be sorted by size.
|
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
|
org.apache.hadoop.fs.Path |
getPath(int i)
Returns the ith Path
|
org.apache.hadoop.fs.Path[] |
getPaths()
Returns all the Paths in the split
|
long[] |
getStartOffsets()
Returns an array containing the start offsets of the files in the split
|
void |
readFields(DataInput in) |
String |
toString() |
void |
write(DataOutput out) |
public CombineFileSplit()
public CombineFileSplit(org.apache.hadoop.fs.Path[] files, long[] start, long[] lengths, String[] locations)
public CombineFileSplit(org.apache.hadoop.fs.Path[] files, long[] lengths)
public CombineFileSplit(CombineFileSplit old) throws IOException
IOException
public long getLength()
InputSplit
getLength
in class InputSplit
public long[] getStartOffsets()
public long[] getLengths()
public long getOffset(int i)
public long getLength(int i)
public int getNumPaths()
public org.apache.hadoop.fs.Path getPath(int i)
public org.apache.hadoop.fs.Path[] getPaths()
public String[] getLocations() throws IOException
getLocations
in class InputSplit
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2013 Apache Software Foundation. All Rights Reserved.