Modifier and Type | Field and Description |
---|---|
static String |
WAL_EDIT_CODEC_CLASS_KEY
Configuration key for a custom class to use when serializing the WALEdits to the HLog
|
Constructor and Description |
---|
WALEditCodec()
Nullary Constructor - all subclass must support this to load from configuration.
|
Modifier and Type | Method and Description |
---|---|
static WALEditCodec |
create(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.regionserver.wal.CompressionContext compressionContext)
Create and setup a
WALEditCodec from the Configuration , if one has been
specified. |
Decoder |
getDecoder(InputStream is) |
Encoder |
getEncoder(OutputStream os) |
void |
init(org.apache.hadoop.conf.Configuration conf)
Initialize this - called exactly once after the object is instantiated and before any
other method in this class.
|
void |
setCompression(org.apache.hadoop.hbase.regionserver.wal.CompressionContext compression) |
public static final String WAL_EDIT_CODEC_CLASS_KEY
public WALEditCodec()
init(org.apache.hadoop.conf.Configuration)
method.
This implementation defaults to having no compression on the resulting Encoder
/
Decoder
, though it can be added via setCompression(CompressionContext)
public void init(org.apache.hadoop.conf.Configuration conf)
conf
- Configuration
from which to configure thispublic void setCompression(org.apache.hadoop.hbase.regionserver.wal.CompressionContext compression)
public Decoder getDecoder(InputStream is)
getDecoder
in interface Codec
public Encoder getEncoder(OutputStream os)
getEncoder
in interface Codec
public static WALEditCodec create(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.regionserver.wal.CompressionContext compressionContext) throws IOException
WALEditCodec
from the Configuration
, if one has been
specified. Fully prepares the codec for use in serialization.conf
- Configuration
to read for the user-specified codec. If none is specified,
uses a WALEditCodec
.compressionContext
- compression to setup on the codec.WALEditCodec
ready for use.IOException
- if the codec cannot be createdCopyright © 2014 The Apache Software Foundation. All Rights Reserved.