public class OutputStreamWriter extends AbstractDataStreamWriter implements DataStoreWriter<byte[]>
OutputStreamWriter is a DataStoreWriter implementation
able to write byte[]s into raw hdfs files.DEFAULT_MAX_OPEN_ATTEMPTS| Constructor and Description |
|---|
OutputStreamWriter(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec)
Instantiates a new output stream writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
protected void |
handleTimeout()
Handle idle timeout.
|
void |
hflush() |
void |
write(byte[] entity)
Write an entity.
|
getOutput, getPosition, setMaxOpenAttemptsfindInitFiles, getOutputContext, getResolvedPath, initOutputContext, isAppendable, isFileWriteable, isOverwrite, isSyncable, onInit, renameFile, setAppendable, setFileNamingStrategy, setInWritingPrefix, setInWritingSuffix, setOverwrite, setRolloverStrategy, setSyncable, setWritePositiondoStart, doStop, getCodec, getConfiguration, getPath, isCompressed, resetIdleTimeout, setCloseTimeout, setIdleTimeoutafterPropertiesSet, getBeanFactory, getPhase, getStoreEventPublisher, getTaskExecutor, getTaskScheduler, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setStoreEventPublisher, setTaskExecutor, setTaskScheduler, start, stop, stoppublic OutputStreamWriter(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec)
configuration - the configurationbasePath - the base pathcodec - the codecpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushablejava.io.IOExceptionpublic void hflush()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic void write(byte[] entity)
throws java.io.IOException
DataWriterwrite in interface DataWriter<byte[]>entity - the entity to writejava.io.IOException - if an I/O error occursprotected void handleTimeout()
StoreObjectSupporthandleTimeout in class StoreObjectSupport