public class ProtobufLogWriter extends AbstractProtobufLogWriter
| Modifier and Type | Field and Description |
|---|---|
protected FSDataOutputStream |
output |
cellEncoder, compressionContext, compressor, conf, length, trailer, trailerWarnSize, trailerWritten| Constructor and Description |
|---|
ProtobufLogWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
append(Entry entry) |
void |
close() |
protected java.io.OutputStream |
getOutputStreamForCellEncoder() |
FSDataOutputStream |
getStream() |
protected void |
initOutput(FileSystem fs,
Path path,
boolean overwritable,
int bufferSize,
short replication,
long blockSize) |
void |
sync() |
protected long |
writeMagicAndWALHeader(byte[] magic,
WALHeader header)
return the file length after written.
|
protected long |
writeWALTrailerAndMagic(WALTrailer trailer,
byte[] magic) |
buildSecureWALHeader, buildWALHeader, getLength, getWriterClassName, init, initAfterHeader, secureInitAfterHeader, setEncryptor, writeWALTrailerpublic void append(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 FSDataOutputStream getStream()
protected void initOutput(FileSystem fs,
Path path,
boolean overwritable,
int bufferSize,
short replication,
long blockSize)
throws java.io.IOException,
StreamLacksCapabilityException
initOutput in class AbstractProtobufLogWriterjava.io.IOExceptionStreamLacksCapabilityExceptionprotected long writeMagicAndWALHeader(byte[] magic,
WALHeader header)
throws java.io.IOException
AbstractProtobufLogWriterwriteMagicAndWALHeader in class AbstractProtobufLogWriterjava.io.IOExceptionprotected java.io.OutputStream getOutputStreamForCellEncoder()
getOutputStreamForCellEncoder in class AbstractProtobufLogWriterprotected long writeWALTrailerAndMagic(WALTrailer trailer,
byte[] magic)
throws java.io.IOException
writeWALTrailerAndMagic in class AbstractProtobufLogWriterjava.io.IOException