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,
java.lang.String search,
java.lang.String replace)
Static factory method, replace the string version of the URI with a simple search-replace pair
|
void |
readFields(java.io.DataInput in)
Deserialize the fields of this object from
in . |
void |
reset()
Reset the InputSplit without reinitializing it from scratch.
|
void |
write(java.io.DataOutput out)
Serialize the fields of this object to
out . |
length, locations, locationsIterator, locationsPathIterator, sample, toDouble, toFloat, toInt, toLong
public TransformSplit(@NonNull BaseInputSplit sourceSplit, @NonNull TransformSplit.URITransform transform) throws java.net.URISyntaxException
sourceSplit
- the split with URIs to transformtransform
- transform operation that returns a new URI based on an input URIjava.net.URISyntaxException
- thrown if the transformed URI is malformedpublic static TransformSplit ofSearchReplace(@NonNull BaseInputSplit sourceSplit, @NonNull java.lang.String search, @NonNull java.lang.String replace) throws java.net.URISyntaxException
sourceSplit
- the split with URIs to transformsearch
- the string to searchreplace
- the string to replace withjava.net.URISyntaxException
- thrown if the transformed URI is malformedpublic void write(java.io.DataOutput out) throws java.io.IOException
Writable
out
.out
- DataOuput
to serialize this object into.java.io.IOException
public void readFields(java.io.DataInput in) throws java.io.IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
in
- DataInput
to deseriablize this object from.java.io.IOException
public void reset()
InputSplit