public class CollectionInputSplit extends BaseInputSplit
iterationOrder, length, uriStrings| Constructor and Description |
|---|
CollectionInputSplit(Collection<URI> list) |
CollectionInputSplit(URI[] array) |
| Modifier and Type | Method and Description |
|---|---|
void |
bootStrapForWrite()
Bootstrap this input split for writing.
|
long |
length()
Length of the split
|
boolean |
needsBootstrapForWrite()
Returns true if this
InputSplit
needs bootstrapping for writing. |
InputStream |
openInputStreamFor(String location)
Open an
InputStream
for the given location. |
OutputStream |
openOutputStreamFor(String location)
Open an
OutputStream
for the given location. |
void |
reset()
Reset the InputSplit without reinitializing it from scratch.
|
boolean |
resetSupported() |
void |
updateSplitLocations(boolean reset)
Refreshes the split locations
if needed in memory.
|
addNewLocation, addNewLocation, canWriteToLocation, locations, locationsIterator, locationsPathIterator, samplepublic CollectionInputSplit(URI[] array)
public CollectionInputSplit(Collection<URI> list)
public void updateSplitLocations(boolean reset)
InputSplitpublic boolean needsBootstrapForWrite()
InputSplitInputSplit
needs bootstrapping for writing.
A simple example of needing bootstrapping is for
FileSplit where there is only a directory
existing, but no file to write topublic void bootStrapForWrite()
InputSplitRecordWriterpublic OutputStream openOutputStreamFor(String location) throws Exception
InputSplitOutputStream
for the given location.
Note that the user is responsible for closing
the associated output stream.location - the location to open the output stream forExceptionpublic InputStream openInputStreamFor(String location) throws Exception
InputSplitInputStream
for the given location.
Note that the user is responsible for closing
the associated input stream.location - the location to open the input stream forExceptionpublic long length()
InputSplitlength in interface InputSplitlength in class BaseInputSplitpublic void reset()
InputSplitpublic boolean resetSupported()
Copyright © 2020. All rights reserved.