T - object type representing input datapublic abstract class AbstractTextFilesFirehoseFactory<T> extends Object implements FirehoseFactory<StringInputRowParser>
connect(StringInputRowParser, File) implementation for its subclasses.| Constructor and Description |
|---|
AbstractTextFilesFirehoseFactory() |
| Modifier and Type | Method and Description |
|---|---|
Firehose |
connect(StringInputRowParser firehoseParser,
File temporaryDirectory)
Initialization method that connects up the fire hose.
|
protected abstract Collection<T> |
initObjects()
Initialize objects to be read by this firehose.
|
protected abstract InputStream |
openObjectStream(T object)
Open an input stream from the given object.
|
protected abstract InputStream |
wrapObjectStream(T object,
InputStream stream)
Wrap the given input stream if needed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectpublic Firehose connect(StringInputRowParser firehoseParser, File temporaryDirectory) throws IOException
FirehoseFactoryPrefetchableTextFilesFirehoseFactory may use a temporary
directory to cache data in it.connect in interface FirehoseFactory<StringInputRowParser>firehoseParser - an input row parsertemporaryDirectory - a directory where temporary files are storedIOExceptionprotected abstract Collection<T> initObjects() throws IOException
connect(StringInputRowParser, File) is called.IOExceptionprotected abstract InputStream openObjectStream(T object) throws IOException
wrapObjectStream(Object, InputStream).object - an object to be readIOExceptionprotected abstract InputStream wrapObjectStream(T object, InputStream stream) throws IOException
object - an input objectstream - a stream for the objectIOExceptionCopyright © 2011–2018. All rights reserved.