org.apache.hadoop.hbase.regionserver.wal
Class WALCellCodec
java.lang.Object
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.
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 . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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 thiscompression
- compression the codec should support, can be null to indicate no
compression
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.