@InterfaceAudience.LimitedPrivate(value="Configuration") public class ProtobufLogWriter extends WriterBase
| Modifier and Type | Field and Description |
|---|---|
protected Codec.Encoder |
cellEncoder |
protected WALCellCodec.ByteStringCompressor |
compressor |
protected FSDataOutputStream |
output |
compressionContext, conf| Constructor and Description |
|---|
ProtobufLogWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
append(WAL.Entry entry) |
protected WALProtos.WALHeader |
buildWALHeader(Configuration conf,
WALProtos.WALHeader.Builder builder) |
void |
close() |
protected WALCellCodec |
getCodec(Configuration conf,
CompressionContext compressionContext) |
long |
getLength() |
FSDataOutputStream |
getStream() |
void |
init(FileSystem fs,
Path path,
Configuration conf,
boolean overwritable) |
protected void |
initAfterHeader(boolean doCompress) |
void |
sync() |
initializeCompressionContextprotected FSDataOutputStream output
protected Codec.Encoder cellEncoder
protected WALCellCodec.ByteStringCompressor compressor
protected WALCellCodec getCodec(Configuration conf, CompressionContext compressionContext) throws java.io.IOException
java.io.IOExceptionprotected WALProtos.WALHeader buildWALHeader(Configuration conf, WALProtos.WALHeader.Builder builder) throws java.io.IOException
java.io.IOExceptionpublic void init(FileSystem fs,
Path path,
Configuration conf,
boolean overwritable)
throws java.io.IOException
init in interface DefaultWALProvider.Writerinit in class WriterBasejava.io.IOExceptionprotected void initAfterHeader(boolean doCompress)
throws java.io.IOException
java.io.IOExceptionpublic void append(WAL.Entry entry) throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionpublic void sync()
throws java.io.IOException
java.io.IOExceptionpublic long getLength()
throws java.io.IOException
java.io.IOExceptionpublic FSDataOutputStream getStream()