public class AsyncProtobufLogWriter extends AbstractProtobufLogWriter
cellEncoder, compressionContext, compressor, conf, length, trailer, trailerWarnSize, trailerWritten| Constructor and Description |
|---|
AsyncProtobufLogWriter(EventLoopGroup eventLoopGroup,
java.lang.Class<? extends Channel> channelClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(Entry entry) |
void |
close() |
AsyncFSOutput |
getOutput() |
protected java.io.OutputStream |
getOutputStreamForCellEncoder() |
protected java.lang.String |
getWriterClassName() |
protected void |
initOutput(FileSystem fs,
Path path,
boolean overwritable,
int bufferSize,
short replication,
long blockSize) |
java.util.concurrent.CompletableFuture<java.lang.Long> |
sync() |
protected long |
writeMagicAndWALHeader(byte[] magic,
WALHeader header)
return the file length after written.
|
protected long |
writeWALTrailerAndMagic(WALTrailer trailer,
byte[] magic) |
buildSecureWALHeader, buildWALHeader, getLength, init, initAfterHeader, secureInitAfterHeader, setEncryptor, writeWALTrailerpublic AsyncProtobufLogWriter(EventLoopGroup eventLoopGroup,
java.lang.Class<? extends Channel> channelClass)
protected java.lang.String getWriterClassName()
getWriterClassName in class AbstractProtobufLogWriterpublic void append(Entry entry)
public java.util.concurrent.CompletableFuture<java.lang.Long> sync()
public void close()
throws java.io.IOException
java.io.IOExceptionpublic AsyncFSOutput getOutput()
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 long writeWALTrailerAndMagic(WALTrailer trailer,
byte[] magic)
throws java.io.IOException
writeWALTrailerAndMagic in class AbstractProtobufLogWriterjava.io.IOExceptionprotected java.io.OutputStream getOutputStreamForCellEncoder()
getOutputStreamForCellEncoder in class AbstractProtobufLogWriter