@InterfaceAudience.Private class CompressionState extends Object
Modifier and Type | Field and Description |
---|---|
(package private) byte |
familyLength |
private static int |
FIRST_KEY |
(package private) int |
keyLength |
(package private) int |
prevOffset |
(package private) int |
qualifierLength |
(package private) short |
rowLength |
(package private) byte |
type |
(package private) int |
valueLength |
Constructor and Description |
---|
CompressionState() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
copyFrom(CompressionState state) |
(package private) boolean |
isFirst() |
(package private) void |
readKey(ByteBuffer in,
int keyLength,
int valueLength)
Analyze the key and fill the state.
|
(package private) void |
readKey(ByteBuffer in,
int keyLength,
int valueLength,
int commonPrefix,
CompressionState previousState)
Analyze the key and fill the state assuming we know previous state.
|
protected void |
readTimestamp(ByteBuffer in) |
int keyLength
int valueLength
short rowLength
int prevOffset
byte familyLength
int qualifierLength
byte type
private static final int FIRST_KEY
CompressionState()
boolean isFirst()
void readKey(ByteBuffer in, int keyLength, int valueLength)
in
- Buffer at the position where key startskeyLength
- Length of key in bytesvalueLength
- Length of values in bytesvoid readKey(ByteBuffer in, int keyLength, int valueLength, int commonPrefix, CompressionState previousState)
This method overrides all the fields of this instance, except
prevOffset
, which is usually manipulated directly by encoders
and decoders.
in
- Buffer at the position where key startskeyLength
- Length of key in bytesvalueLength
- Length of values in bytescommonPrefix
- how many first bytes are common with previous KeyValuepreviousState
- State from previous KeyValueprotected void readTimestamp(ByteBuffer in)
void copyFrom(CompressionState state)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.