public class TextSequenceFileWriter extends AbstractSequenceFileWriter implements DataStoreWriter<java.lang.String>
TextSequenceFileWriter
is a DataStoreWriter
implementation
able to write String
s into a SequenceFile
.Constructor and Description |
---|
TextSequenceFileWriter(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec)
Instantiates a new text sequence file writer.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
protected void |
handleIdleTimeout()
Handle idle timeout.
|
void |
hflush() |
void |
write(java.lang.String entity)
Write an entity.
|
getOutput, getPosition
findInitFiles, getOutputContext, getResolvedPath, initOutputContext, isAppendable, isFileWriteable, isOverwrite, onInit, renameFile, setAppendable, setFileNamingStrategy, setInWritingPrefix, setInWritingSuffix, setOverwrite, setRolloverStrategy, setWritePosition
doStart, doStop, getCodec, getConfiguration, getPath, isCompressed, resetIdleTimeout, setIdleTimeout
afterPropertiesSet, getBeanFactory, getPhase, getStoreEventPublisher, getTaskExecutor, getTaskScheduler, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setStoreEventPublisher, setTaskExecutor, setTaskScheduler, start, stop, stop
public TextSequenceFileWriter(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 void flush() throws java.io.IOException
flush
in interface java.io.Flushable
java.io.IOException
public void hflush() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public void write(java.lang.String entity) throws java.io.IOException
DataWriter
write
in interface DataWriter<java.lang.String>
entity
- the entity to writejava.io.IOException
- if an I/O error occursprotected void handleIdleTimeout()
StoreObjectSupport
handleIdleTimeout
in class StoreObjectSupport