public abstract class BaseInputSplit extends java.lang.Object implements InputSplit
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
iterationOrder |
protected long |
length |
protected java.util.List<java.lang.String> |
uriStrings |
| Constructor and Description |
|---|
BaseInputSplit() |
| Modifier and Type | Method and Description |
|---|---|
long |
length()
Length of the split
|
java.net.URI[] |
locations()
Locations of the splits
|
java.util.Iterator<java.net.URI> |
locationsIterator() |
java.util.Iterator<java.lang.String> |
locationsPathIterator() |
InputSplit[] |
sample(PathFilter pathFilter,
double... weights)
Samples the locations based on the PathFilter and splits the result into
an array of InputSplit objects, with sizes proportional to the weights.
|
double |
toDouble()
Convert Writable to double.
|
float |
toFloat()
Convert Writable to float.
|
int |
toInt()
Convert Writable to int.
|
long |
toLong()
Convert Writable to long.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresetreadFields, writeprotected java.util.List<java.lang.String> uriStrings
protected int[] iterationOrder
protected long length
public java.net.URI[] locations()
InputSplitlocations in interface InputSplitpublic java.util.Iterator<java.net.URI> locationsIterator()
locationsIterator in interface InputSplitpublic java.util.Iterator<java.lang.String> locationsPathIterator()
locationsPathIterator in interface InputSplitpublic long length()
InputSplitlength in interface InputSplitpublic double toDouble()
Writablepublic float toFloat()
Writablepublic int toInt()
Writablepublic long toLong()
Writablepublic InputSplit[] sample(PathFilter pathFilter, double... weights)
pathFilter - to modify the locations in some way (null == as is)weights - to split the locations into multiple InputSplit