@InterfaceAudience.LimitedPrivate(value="Configuration") public abstract class AbstractProtobufLogWriter extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Codec.Encoder |
cellEncoder |
protected CompressionContext |
compressionContext |
protected WALCellCodec.ByteStringCompressor |
compressor |
protected org.apache.hadoop.conf.Configuration |
conf |
protected AtomicLong |
length |
protected org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALTrailer |
trailer |
protected int |
trailerWarnSize |
protected boolean |
trailerWritten |
| Constructor and Description |
|---|
AbstractProtobufLogWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALHeader |
buildSecureWALHeader(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALHeader.Builder builder) |
protected org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALHeader |
buildWALHeader(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALHeader.Builder builder) |
protected void |
closeOutputIfNecessary()
It is straight forward to close the output, do not need to write trailer like the Writer.close
|
long |
getLength() |
protected abstract OutputStream |
getOutputStreamForCellEncoder() |
protected String |
getWriterClassName() |
void |
init(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf,
boolean overwritable,
long blocksize,
StreamSlowMonitor monitor) |
protected void |
initAfterHeader(boolean doCompress) |
protected abstract void |
initOutput(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
boolean overwritable,
int bufferSize,
short replication,
long blockSize,
StreamSlowMonitor monitor) |
protected void |
secureInitAfterHeader(boolean doCompress,
Encryptor encryptor) |
protected void |
setEncryptor(Encryptor encryptor) |
protected abstract long |
writeMagicAndWALHeader(byte[] magic,
org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALHeader header)
return the file length after written.
|
protected void |
writeWALTrailer() |
protected abstract long |
writeWALTrailerAndMagic(org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALTrailer trailer,
byte[] magic) |
protected CompressionContext compressionContext
protected org.apache.hadoop.conf.Configuration conf
protected Codec.Encoder cellEncoder
protected WALCellCodec.ByteStringCompressor compressor
protected boolean trailerWritten
protected org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALTrailer trailer
protected int trailerWarnSize
protected AtomicLong length
protected org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALHeader buildWALHeader(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALHeader.Builder builder) throws IOException
IOExceptionprotected final org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALHeader buildSecureWALHeader(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALHeader.Builder builder) throws IOException
IOExceptionprotected void setEncryptor(Encryptor encryptor)
protected String getWriterClassName()
public void init(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf,
boolean overwritable,
long blocksize,
StreamSlowMonitor monitor)
throws IOException,
CommonFSUtils.StreamLacksCapabilityException
protected void initAfterHeader(boolean doCompress)
throws IOException
IOExceptionprotected final void secureInitAfterHeader(boolean doCompress,
Encryptor encryptor)
throws IOException
IOExceptionpublic long getLength()
protected void writeWALTrailer()
protected abstract void initOutput(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
boolean overwritable,
int bufferSize,
short replication,
long blockSize,
StreamSlowMonitor monitor)
throws IOException,
CommonFSUtils.StreamLacksCapabilityException
protected void closeOutputIfNecessary()
protected abstract long writeMagicAndWALHeader(byte[] magic,
org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALHeader header)
throws IOException
IOExceptionprotected abstract long writeWALTrailerAndMagic(org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.WALTrailer trailer, byte[] magic) throws IOException
IOExceptionprotected abstract OutputStream getOutputStreamForCellEncoder()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.