Configuration conf = new Configuration(false);
conf.setBoolean(CompressionContext.ENABLE_WAL_TAGS_COMPRESSION, compressTags);
WALCellCodec codec = new WALCellCodec(conf, new CompressionContext(LRUDictionary.class, false,
compressTags));
ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
Encoder encoder = codec.getEncoder(bos);
encoder.write(createKV(1));
encoder.write(createKV(0));
encoder.write(createKV(2));
InputStream is = new ByteArrayInputStream(bos.toByteArray());
Decoder decoder = codec.getDecoder(is);
decoder.advance();
KeyValue kv = (KeyValue) decoder.current();