@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix","Configuration"}) public class WALCellCodec extends Object implements Codec
Modifier and Type | Class and Description |
---|---|
(package private) static class |
WALCellCodec.BaosAndCompressor |
static interface |
WALCellCodec.ByteStringCompressor |
static interface |
WALCellCodec.ByteStringUncompressor |
(package private) static class |
WALCellCodec.CompressedKvDecoder |
(package private) static class |
WALCellCodec.CompressedKvEncoder |
static class |
WALCellCodec.EnsureKvEncoder |
(package private) static class |
WALCellCodec.NoneCompressor |
(package private) static class |
WALCellCodec.NoneUncompressor |
(package private) static class |
WALCellCodec.StatelessUncompressor |
Codec.Decoder, Codec.Encoder
Modifier and Type | Field and Description |
---|---|
protected CompressionContext |
compression |
static String |
WAL_CELL_CODEC_CLASS_KEY
Configuration key for the class to use when encoding cells in the WAL
|
Constructor and Description |
---|
WALCellCodec()
All subclasses must implement a no argument constructor
|
WALCellCodec(org.apache.hadoop.conf.Configuration conf,
CompressionContext compression)
Default constructor - all subclasses must implement a constructor with this signature
if they are to be dynamically loaded from the
Configuration . |
Modifier and Type | Method and Description |
---|---|
static WALCellCodec |
create(org.apache.hadoop.conf.Configuration conf,
CompressionContext compression)
Create and setup a
WALCellCodec from the CompressionContext. |
static WALCellCodec |
create(org.apache.hadoop.conf.Configuration conf,
String cellCodecClsName,
CompressionContext compression)
Create and setup a
WALCellCodec from the cellCodecClsName and
CompressionContext, if cellCodecClsName is specified. |
WALCellCodec.ByteStringCompressor |
getByteStringCompressor() |
WALCellCodec.ByteStringUncompressor |
getByteStringUncompressor() |
Codec.Decoder |
getDecoder(ByteBuff buf) |
Codec.Decoder |
getDecoder(InputStream is) |
Codec.Encoder |
getEncoder(OutputStream os) |
static WALCellCodec.ByteStringCompressor |
getNoneCompressor() |
static WALCellCodec.ByteStringUncompressor |
getNoneUncompressor() |
static Class<?> |
getWALCellCodecClass(org.apache.hadoop.conf.Configuration conf) |
private static byte[] |
uncompressByteString(org.apache.hbase.thirdparty.com.google.protobuf.ByteString bs,
Dictionary dict) |
public static final String WAL_CELL_CODEC_CLASS_KEY
protected final CompressionContext compression
public WALCellCodec()
public WALCellCodec(org.apache.hadoop.conf.Configuration conf, CompressionContext compression)
Configuration
.conf
- configuration to configure thiscompression
- compression the codec should support, can be null to indicate no
compressionpublic static Class<?> getWALCellCodecClass(org.apache.hadoop.conf.Configuration conf)
public static WALCellCodec create(org.apache.hadoop.conf.Configuration conf, String cellCodecClsName, CompressionContext compression) throws UnsupportedOperationException
WALCellCodec
from the cellCodecClsName
and
CompressionContext, if cellCodecClsName
is specified. Otherwise Cell Codec classname is
read from Configuration
. Fully prepares the codec for use.conf
- Configuration
to read for the user-specified codec. If none is
specified, uses a WALCellCodec
.cellCodecClsName
- name of codeccompression
- compression the codec should useWALCellCodec
ready for use.UnsupportedOperationException
- if the codec cannot be instantiatedpublic static WALCellCodec create(org.apache.hadoop.conf.Configuration conf, CompressionContext compression) throws UnsupportedOperationException
WALCellCodec
from the CompressionContext. Cell Codec classname is
read from Configuration
. Fully prepares the codec for use.conf
- Configuration
to read for the user-specified codec. If none is
specified, uses a WALCellCodec
.compression
- compression the codec should useWALCellCodec
ready for use.UnsupportedOperationException
- if the codec cannot be instantiatedprivate static byte[] uncompressByteString(org.apache.hbase.thirdparty.com.google.protobuf.ByteString bs, Dictionary dict) throws IOException
IOException
public Codec.Decoder getDecoder(InputStream is)
getDecoder
in interface Codec
public Codec.Decoder getDecoder(ByteBuff buf)
getDecoder
in interface Codec
public Codec.Encoder getEncoder(OutputStream os)
getEncoder
in interface Codec
public WALCellCodec.ByteStringCompressor getByteStringCompressor()
public WALCellCodec.ByteStringUncompressor getByteStringUncompressor()
public static WALCellCodec.ByteStringCompressor getNoneCompressor()
public static WALCellCodec.ByteStringUncompressor getNoneUncompressor()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.