@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 WALProtos.WALTrailer |
trailer |
protected int |
trailerWarnSize |
protected boolean |
trailerWritten |
| Constructor and Description |
|---|
AbstractProtobufLogWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected WALProtos.WALHeader |
buildSecureWALHeader(org.apache.hadoop.conf.Configuration conf,
WALProtos.WALHeader.Builder builder) |
protected WALProtos.WALHeader |
buildWALHeader(org.apache.hadoop.conf.Configuration conf,
WALProtos.WALHeader.Builder builder) |
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) |
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) |
protected void |
secureInitAfterHeader(boolean doCompress,
Encryptor encryptor) |
protected void |
setEncryptor(Encryptor encryptor) |
protected abstract long |
writeMagicAndWALHeader(byte[] magic,
WALProtos.WALHeader header)
return the file length after written.
|
protected void |
writeWALTrailer() |
protected abstract long |
writeWALTrailerAndMagic(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 WALProtos.WALTrailer trailer
protected int trailerWarnSize
protected AtomicLong length
protected WALProtos.WALHeader buildWALHeader(org.apache.hadoop.conf.Configuration conf, WALProtos.WALHeader.Builder builder) throws IOException
IOExceptionprotected final WALProtos.WALHeader buildSecureWALHeader(org.apache.hadoop.conf.Configuration conf, 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)
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)
throws IOException,
CommonFSUtils.StreamLacksCapabilityException
protected abstract long writeMagicAndWALHeader(byte[] magic,
WALProtos.WALHeader header)
throws IOException
IOExceptionprotected abstract long writeWALTrailerAndMagic(WALProtos.WALTrailer trailer, byte[] magic) throws IOException
IOExceptionprotected abstract OutputStream getOutputStreamForCellEncoder()
Copyright © 2007–2019 Cloudera. All rights reserved.