public class TextFileReader extends AbstractDataStreamReader implements DataStoreReader<java.lang.String>
TextFileReader
is a DataStoreReader
implementation
able to read String
s from a raw hdfs files.AbstractDataStreamReader.ReaderHelper<T,V>
Constructor and Description |
---|
TextFileReader(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec)
Instantiates a new text file reader.
|
TextFileReader(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec,
Split split)
Instantiates a new text file reader.
|
TextFileReader(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec,
Split split,
byte[] delimiter)
Instantiates a new text file reader.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.lang.String |
read()
Read next entity from a reader.
|
getInput
getInputContext, getSplit
doStart, doStop, flushTimeout, getCodec, getConfiguration, getPath, handleTimeout, isCompressed, onInit, resetIdleTimeout, setCloseTimeout, setFlushTimeout, setIdleTimeout
afterPropertiesSet, getBeanFactory, getPhase, getStoreEventPublisher, getTaskExecutor, getTaskScheduler, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setStoreEventPublisher, setTaskExecutor, setTaskScheduler, start, stop, stop
public TextFileReader(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec)
configuration
- the hadoop configurationbasePath
- the hdfs pathcodec
- the compression codec infopublic TextFileReader(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec, Split split)
configuration
- the configurationbasePath
- the base pathcodec
- the codecsplit
- the input splitpublic TextFileReader(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec, Split split, byte[] delimiter)
configuration
- the configurationbasePath
- the base pathcodec
- the codecsplit
- the input splitdelimiter
- the delimiterpublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public java.lang.String read() throws java.io.IOException
DataReader
read
in interface DataReader<java.lang.String>
null
java.io.IOException
- if an I/O error occurs