@InterfaceAudience.LimitedPrivate(value="Configuration") public class ProtobufLogWriter extends WriterBase
Modifier and Type | Field and Description |
---|---|
protected Codec.Encoder |
cellEncoder |
protected WALCellCodec.ByteStringCompressor |
compressor |
protected org.apache.hadoop.fs.FSDataOutputStream |
output |
compressionContext, conf
Constructor and Description |
---|
ProtobufLogWriter() |
Modifier and Type | Method and Description |
---|---|
void |
append(HLog.Entry entry) |
protected WALProtos.WALHeader |
buildWALHeader(org.apache.hadoop.conf.Configuration conf,
WALProtos.WALHeader.Builder builder) |
protected WALProtos.WALTrailer |
buildWALTrailer(WALProtos.WALTrailer.Builder builder) |
void |
close() |
protected WALCellCodec |
getCodec(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.regionserver.wal.CompressionContext compressionContext) |
long |
getLength() |
org.apache.hadoop.fs.FSDataOutputStream |
getStream() |
void |
init(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf,
boolean overwritable) |
protected void |
initAfterHeader(boolean doCompress) |
void |
setWALTrailer(WALProtos.WALTrailer walTrailer)
Sets HLog's WALTrailer.
|
void |
sync() |
initializeCompressionContext
protected org.apache.hadoop.fs.FSDataOutputStream output
protected Codec.Encoder cellEncoder
protected WALCellCodec.ByteStringCompressor compressor
protected WALCellCodec getCodec(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.regionserver.wal.CompressionContext compressionContext) throws IOException
IOException
protected WALProtos.WALHeader buildWALHeader(org.apache.hadoop.conf.Configuration conf, WALProtos.WALHeader.Builder builder) throws IOException
IOException
public void init(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf, boolean overwritable) throws IOException
init
in interface HLog.Writer
init
in class WriterBase
IOException
protected void initAfterHeader(boolean doCompress) throws IOException
IOException
public void append(HLog.Entry entry) throws IOException
IOException
public void close() throws IOException
IOException
protected WALProtos.WALTrailer buildWALTrailer(WALProtos.WALTrailer.Builder builder)
public void sync() throws IOException
IOException
public long getLength() throws IOException
IOException
public org.apache.hadoop.fs.FSDataOutputStream getStream()
public void setWALTrailer(WALProtos.WALTrailer walTrailer)
HLog.Writer
walTrailer
- trailer to append to WAL.Copyright © 2014 The Apache Software Foundation. All rights reserved.