org.apache.hadoop.hbase.regionserver.wal
Class ProtobufLogWriter

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.wal.WriterBase
      extended by org.apache.hadoop.hbase.regionserver.wal.ProtobufLogWriter
All Implemented Interfaces:
HLog.Writer

@InterfaceAudience.Private
public class ProtobufLogWriter
extends WriterBase

Writer for protobuf-based WAL.


Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.regionserver.wal.WriterBase
compressionContext
 
Constructor Summary
ProtobufLogWriter()
           
 
Method Summary
 void append(HLog.Entry entry)
           
 void close()
           
 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)
           
 void setWALTrailer(WALProtos.WALTrailer walTrailer)
          Sets HLog's WALTrailer.
 void sync()
           
 
Methods inherited from class org.apache.hadoop.hbase.regionserver.wal.WriterBase
initializeCompressionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtobufLogWriter

public ProtobufLogWriter()
Method Detail

init

public void init(org.apache.hadoop.fs.FileSystem fs,
                 org.apache.hadoop.fs.Path path,
                 org.apache.hadoop.conf.Configuration conf)
          throws IOException
Throws:
IOException

append

public void append(HLog.Entry entry)
            throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

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(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 © 2013 The Apache Software Foundation. All Rights Reserved.