public class TransformSplit extends BaseInputSplit
| Modifier and Type | Class and Description |
|---|---|
static interface |
TransformSplit.URITransform |
iterationOrder, length, uriStrings| Constructor and Description |
|---|
TransformSplit(BaseInputSplit sourceSplit,
TransformSplit.URITransform transform)
Apply a given transformation to the raw URI objects
|
| Modifier and Type | Method and Description |
|---|---|
static TransformSplit |
ofSearchReplace(BaseInputSplit sourceSplit,
String search,
String replace)
Static factory method, replace the string version of the URI with a simple search-replace pair
|
void |
readFields(DataInput in)
Deserialize the fields of this object from
in. |
void |
reset()
Reset the InputSplit without reinitializing it from scratch.
|
void |
write(DataOutput out)
Serialize the fields of this object to
out. |
getType, length, locations, locationsIterator, locationsPathIterator, sample, toDouble, toFloat, toInt, toLong, writeTypepublic TransformSplit(@NonNull
BaseInputSplit sourceSplit,
@NonNull
TransformSplit.URITransform transform)
throws URISyntaxException
sourceSplit - the split with URIs to transformtransform - transform operation that returns a new URI based on an input URIURISyntaxException - thrown if the transformed URI is malformedpublic static TransformSplit ofSearchReplace(@NonNull BaseInputSplit sourceSplit, @NonNull String search, @NonNull String replace) throws URISyntaxException
sourceSplit - the split with URIs to transformsearch - the string to searchreplace - the string to replace withURISyntaxException - thrown if the transformed URI is malformedpublic void write(DataOutput out) throws IOException
Writableout.out - DataOuput to serialize this object into.IOExceptionpublic void readFields(DataInput in) throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
in - DataInput to deseriablize this object from.IOExceptionpublic void reset()
InputSplitCopyright © 2017. All rights reserved.