org.apache.hadoop.hbase.regionserver.wal
Class ProtobufLogWriter
java.lang.Object
org.apache.hadoop.hbase.regionserver.wal.WriterBase
org.apache.hadoop.hbase.regionserver.wal.ProtobufLogWriter
- All Implemented Interfaces:
- HLog.Writer
- Direct Known Subclasses:
- SecureProtobufLogWriter
@InterfaceAudience.LimitedPrivate(value="Configuration")
public class ProtobufLogWriter
- extends WriterBase
Writer for protobuf-based WAL.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
output
protected org.apache.hadoop.fs.FSDataOutputStream output
cellEncoder
protected Codec.Encoder cellEncoder
compressor
protected WALCellCodec.ByteStringCompressor compressor
ProtobufLogWriter
public ProtobufLogWriter()
getCodec
protected WALCellCodec getCodec(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.regionserver.wal.CompressionContext compressionContext)
throws IOException
- Throws:
IOException
buildWALHeader
protected org.apache.hadoop.hbase.protobuf.generated.WALProtos.WALHeader buildWALHeader(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.protobuf.generated.WALProtos.WALHeader.Builder builder)
throws IOException
- Throws:
IOException
init
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
- Specified by:
init
in interface HLog.Writer
- Overrides:
init
in class WriterBase
- Throws:
IOException
initAfterHeader
protected void initAfterHeader(boolean doCompress)
throws IOException
- Throws:
IOException
append
public void append(HLog.Entry entry)
throws IOException
- Throws:
IOException
close
public void close()
throws IOException
- Throws:
IOException
buildWALTrailer
protected org.apache.hadoop.hbase.protobuf.generated.WALProtos.WALTrailer buildWALTrailer(org.apache.hadoop.hbase.protobuf.generated.WALProtos.WALTrailer.Builder builder)
sync
public void sync()
throws IOException
- Throws:
IOException
getLength
public long getLength()
throws IOException
- Throws:
IOException
getStream
public org.apache.hadoop.fs.FSDataOutputStream getStream()
setWALTrailer
public void setWALTrailer(org.apache.hadoop.hbase.protobuf.generated.WALProtos.WALTrailer walTrailer)
- Description copied from interface:
HLog.Writer
- Sets HLog's WALTrailer. This trailer is appended at the end of WAL on closing.
- Parameters:
walTrailer
- trailer to append to WAL.
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.