Package org.apache.hadoop.hbase.codec
Class KeyValueCodec
java.lang.Object
org.apache.hadoop.hbase.codec.KeyValueCodec
- All Implemented Interfaces:
Codec
Codec that does KeyValue version 1 serialization.
Encodes Cell as serialized in KeyValue with total length prefix. This is how KVs were serialized in Puts, Deletes and Results pre-0.96. Its what would happen if you called the Writable#write KeyValue implementation. This encoder will fail if the passed Cell is not an old-school pre-0.96 KeyValue. Does not copy bytes writing. It just writes them direct to the passed stream.
If you wrote two KeyValues to this encoder, it would look like this in the stream:
length-of-KeyValue1 // A java int with the length of KeyValue1 backing array KeyValue1 backing array filled with a KeyValue serialized in its particular format length-of-KeyValue2 KeyValue2 backing array
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.codec.Codec
Codec.Decoder, Codec.Encoder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionImplementation depends onInputStream.available()
getDecoder
(ByteBuff buf)
-
Constructor Details
-
KeyValueCodec
public KeyValueCodec()
-
-
Method Details
-
getDecoder
Implementation depends onInputStream.available()
- Specified by:
getDecoder
in interfaceCodec
-
getDecoder
- Specified by:
getDecoder
in interfaceCodec
-
getEncoder
- Specified by:
getEncoder
in interfaceCodec
-