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

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.wal.WALCellCodec
All Implemented Interfaces:
Codec

public class WALCellCodec
extends Object
implements Codec

Compression in this class is lifted off Compressor/KeyValueCompression. This is a pure coincidence... they are independent and don't have to be compatible.


Nested Class Summary
static interface WALCellCodec.ByteStringCompressor
           
static interface WALCellCodec.ByteStringUncompressor
           
 class WALCellCodec.EnsureKvEncoder
           
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.codec.Codec
Codec.Decoder, Codec.Encoder
 
Field Summary
static String WAL_CELL_CODEC_CLASS_KEY
          Configuration key for the class to use when encoding cells in the WAL
 
Constructor Summary
WALCellCodec(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.regionserver.wal.CompressionContext compression)
          Default constructor - all subclasses must implement a constructor with this signature if they are to be dynamically loaded from the Configuration.
 
Method Summary
static WALCellCodec create(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.regionserver.wal.CompressionContext compression)
          Create and setup a WALCellCodec from the Configuration and CompressionContext, if they have been specified.
 WALCellCodec.ByteStringCompressor getByteStringCompressor()
           
 WALCellCodec.ByteStringUncompressor getByteStringUncompressor()
           
 Codec.Decoder getDecoder(InputStream is)
           
 Codec.Encoder getEncoder(OutputStream os)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WAL_CELL_CODEC_CLASS_KEY

public static final String WAL_CELL_CODEC_CLASS_KEY
Configuration key for the class to use when encoding cells in the WAL

See Also:
Constant Field Values
Constructor Detail

WALCellCodec

public WALCellCodec(org.apache.hadoop.conf.Configuration conf,
                    org.apache.hadoop.hbase.regionserver.wal.CompressionContext compression)
Default constructor - all subclasses must implement a constructor with this signature if they are to be dynamically loaded from the Configuration.

Parameters:
conf - configuration to configure this
compression - compression the codec should support, can be null to indicate no compression
Method Detail

create

public static WALCellCodec create(org.apache.hadoop.conf.Configuration conf,
                                  org.apache.hadoop.hbase.regionserver.wal.CompressionContext compression)
                           throws UnsupportedOperationException
Create and setup a WALCellCodec from the Configuration and CompressionContext, if they have been specified. Fully prepares the codec for use.

Parameters:
conf - Configuration to read for the user-specified codec. If none is specified, uses a WALCellCodec.
compression - compression the codec should use
Returns:
a WALCellCodec ready for use.
Throws:
UnsupportedOperationException - if the codec cannot be instantiated

getDecoder

public Codec.Decoder getDecoder(InputStream is)
Specified by:
getDecoder in interface Codec

getEncoder

public Codec.Encoder getEncoder(OutputStream os)
Specified by:
getEncoder in interface Codec

getByteStringCompressor

public WALCellCodec.ByteStringCompressor getByteStringCompressor()

getByteStringUncompressor

public WALCellCodec.ByteStringUncompressor getByteStringUncompressor()


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