|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.codec.prefixtree.encode.other.CellTypeEncoder
@InterfaceAudience.Private public class CellTypeEncoder
Detect if every KV has the same KeyValue.Type, in which case we don't need to store it for each KV. If(allSameType) during conversion to byte[], then we can store the "onlyType" in blockMeta, therefore not repeating it for each cell and saving 1 byte per cell.
Field Summary | |
---|---|
protected boolean |
allSameType
|
protected byte |
onlyType
|
protected boolean |
pendingFirstType
fields |
Constructor Summary | |
---|---|
CellTypeEncoder()
|
Method Summary | |
---|---|
void |
add(byte type)
methods |
boolean |
areAllSameType()
get/set |
byte |
getOnlyType()
|
void |
reset()
construct |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean pendingFirstType
protected boolean allSameType
protected byte onlyType
Constructor Detail |
---|
public CellTypeEncoder()
Method Detail |
---|
public void reset()
public void add(byte type)
public boolean areAllSameType()
public byte getOnlyType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |