public class CompositeInputSplit extends java.lang.Object implements InputSplit
Constructor and Description |
---|
CompositeInputSplit() |
CompositeInputSplit(int capacity) |
Modifier and Type | Method and Description |
---|---|
void |
add(InputSplit s)
Add an InputSplit to this collection.
|
InputSplit |
get(int i)
Get ith child InputSplit.
|
long |
getLength()
Return the aggregate length of all child InputSplits currently added.
|
long |
getLength(int i)
Get the length of ith child InputSplit.
|
java.lang.String[] |
getLocation(int i)
getLocations from ith InputSplit.
|
java.lang.String[] |
getLocations()
Collect a set of hosts from all child InputSplits.
|
void |
readFields(java.io.DataInput in) |
void |
write(java.io.DataOutput out)
Write splits in the following format.
|
public CompositeInputSplit()
public CompositeInputSplit(int capacity)
public void add(InputSplit s) throws java.io.IOException
java.io.IOException
- If capacity was not specified during construction
or if capacity has been reached.public InputSplit get(int i)
public long getLength() throws java.io.IOException
getLength
in interface InputSplit
java.io.IOException
public long getLength(int i) throws java.io.IOException
java.io.IOException
public java.lang.String[] getLocations() throws java.io.IOException
getLocations
in interface InputSplit
InputSplit
is
located as an array of String
s.java.io.IOException
public java.lang.String[] getLocation(int i) throws java.io.IOException
java.io.IOException
public void write(java.io.DataOutput out) throws java.io.IOException
<count><class1><class2>...<classn><split1><split2>...<splitn>
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
- If the child InputSplit cannot be read, typically
for faliing access checks.Copyright © 2009 The Apache Software Foundation