|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.hadoop.store.input.AbstractDataStreamReader.ReaderHelper<T,V>
T
- the type of readerV
- the type of data returned by readerprotected abstract static class AbstractDataStreamReader.ReaderHelper<T,V>
Reader helper hiding complexity of working with input streams.
Constructor Summary | |
---|---|
protected |
AbstractDataStreamReader.ReaderHelper(StreamsHolder<java.io.InputStream> streamsHolder,
InputContext inputContext,
Split split,
CodecInfo codec)
Instantiates a new reader helper. |
Method Summary | |
---|---|
protected abstract T |
createReader(java.io.InputStream inputStream)
Creates the reader. |
protected abstract V |
doRead(T delegate)
Do read. |
protected InputContext |
getContext()
Gets the wrapped InputContext . |
protected StreamsHolder<java.io.InputStream> |
getHolder()
Gets the StreamsHolder for wrapped
input stream. |
protected T |
getReader()
Gets the reader created by createReader(InputStream) . |
protected void |
init()
Inits the reader helper. |
protected void |
processReadCount(int readSize)
Processing a count of bytes read from a stream. |
protected V |
read()
Reads a data by delegating to a reader. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractDataStreamReader.ReaderHelper(StreamsHolder<java.io.InputStream> streamsHolder, InputContext inputContext, Split split, CodecInfo codec)
streamsHolder
- the streams holderinputContext
- the input contextsplit
- the input splitcodec
- the compression codec infoMethod Detail |
---|
protected abstract T createReader(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- the input stream
java.io.IOException
- Signals that an I/O exception has occurred.protected abstract V doRead(T delegate) throws java.io.IOException
delegate
- the delegate reader
java.io.IOException
- Signals that an I/O exception has occurred.protected void init() throws java.io.IOException
java.io.IOException
- Signals that an I/O exception has occurred.protected void processReadCount(int readSize) throws java.io.IOException
Seekable
depending if it has been set.
readSize
- the read size
java.io.IOException
- Signals that an I/O exception has occurred.protected V read() throws java.io.IOException
java.io.IOException
- Signals that an I/O exception has occurred.protected T getReader()
createReader(InputStream)
.
protected StreamsHolder<java.io.InputStream> getHolder()
StreamsHolder
for wrapped
input stream.
protected InputContext getContext()
InputContext
.
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |