@InterfaceAudience.Public @InterfaceStability.Stable public class CompositeInputSplit extends InputSplit implements org.apache.hadoop.io.Writable
| 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.
|
String[] |
getLocation(int i)
getLocations from ith InputSplit.
|
String[] |
getLocations()
Collect a set of hosts from all child InputSplits.
|
void |
readFields(DataInput in) |
void |
write(DataOutput out)
Write splits in the following format.
|
getLocationInfopublic CompositeInputSplit()
public CompositeInputSplit(int capacity)
public void add(InputSplit s) throws IOException, InterruptedException
IOException - If capacity was not specified during construction
or if capacity has been reached.InterruptedExceptionpublic InputSplit get(int i)
public long getLength()
throws IOException
getLength in class InputSplitIOExceptionpublic long getLength(int i)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic String[] getLocations() throws IOException, InterruptedException
getLocations in class InputSplitIOExceptionInterruptedExceptionpublic String[] getLocation(int i) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void write(DataOutput out) throws IOException
<count><class1><class2>...<classn><split1><split2>...<splitn>
write in interface org.apache.hadoop.io.WritableIOExceptionpublic void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOException - If the child InputSplit cannot be read, typically
for failing access checks.Copyright © 2022 Apache Software Foundation. All rights reserved.