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

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

public class SequenceFileLogWriter
extends Object
implements HLog.Writer

Implementation of HLog.Writer that delegates to SequenceFile.Writer.


Constructor Summary
SequenceFileLogWriter()
          Default constructor.
SequenceFileLogWriter(Class<? extends HLogKey> keyClass)
          This constructor allows a specific HLogKey implementation to override that which would otherwise be chosen via configuration property.
 
Method Summary
 void append(HLog.Entry entry)
           
 void close()
           
 OutputStream getDFSCOutputStream()
           
 long getLength()
           
 void init(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
           
 void sync()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceFileLogWriter

public SequenceFileLogWriter()
Default constructor.


SequenceFileLogWriter

public SequenceFileLogWriter(Class<? extends HLogKey> keyClass)
This constructor allows a specific HLogKey implementation to override that which would otherwise be chosen via configuration property.

Parameters:
keyClass -
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
Specified by:
init in interface HLog.Writer
Throws:
IOException

append

public void append(HLog.Entry entry)
            throws IOException
Specified by:
append in interface HLog.Writer
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface HLog.Writer
Throws:
IOException

sync

public void sync()
          throws IOException
Specified by:
sync in interface HLog.Writer
Throws:
IOException

getLength

public long getLength()
               throws IOException
Specified by:
getLength in interface HLog.Writer
Throws:
IOException

getDFSCOutputStream

public OutputStream getDFSCOutputStream()
Returns:
The dfsclient out stream up inside SF.Writer made accessible, or null if not available.


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.