public class TextSequenceFileWriter extends AbstractSequenceFileWriter implements DataStoreWriter<String>
TextSequenceFileWriter is a DataStoreWriter implementation
able to write Strings into a SequenceFile.| Constructor and Description |
|---|
TextSequenceFileWriter(Configuration configuration,
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(String entity)
Write an entity.
|
getOutput, getPositionfindInitFiles, getOutputContext, getResolvedPath, initOutputContext, isAppendable, isFileWriteable, isOverwrite, onInit, renameFile, setAppendable, setFileNamingStrategy, setInWritingPrefix, setInWritingSuffix, setOverwrite, setRolloverStrategy, setWritePositiondoStart, doStop, getCodec, getConfiguration, getPath, isCompressed, resetIdleTimeout, setIdleTimeoutafterPropertiesSet, getBeanFactory, getPhase, getStoreEventPublisher, getTaskExecutor, getTaskScheduler, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setStoreEventPublisher, setTaskExecutor, setTaskScheduler, start, stop, stoppublic TextSequenceFileWriter(Configuration configuration, Path basePath, CodecInfo codec)
configuration - the hadoop configurationbasePath - the hdfs pathcodec - the compression codec infopublic void flush()
throws IOException
flush in interface FlushableIOExceptionpublic void hflush()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void write(String entity) throws IOException
DataWriterwrite in interface DataWriter<String>entity - the entity to writeIOException - if an I/O error occursprotected void handleIdleTimeout()
StoreObjectSupporthandleIdleTimeout in class StoreObjectSupport