@InterfaceAudience.Private public class PrefixTreeEncoder extends Object implements CellOutputStream
Constructor and Description |
---|
PrefixTreeEncoder(OutputStream outputStream,
boolean includeMvccVersion)
construct
|
Modifier and Type | Method and Description |
---|---|
protected void |
compile()
Now that all the cells have been added, do the work to reduce them to a series of byte[]
fragments that are ready to be written to the output stream.
|
protected void |
compileFamilies() |
protected void |
compileMvccVersions() |
protected void |
compileQualifiers() |
protected void |
compileRows() |
protected void |
compileTags() |
protected void |
compileTimestamps() |
protected void |
compileTypes()
The following "compile" methods do any intermediate work necessary to transform the cell
fragments collected during the writing phase into structures that are ready to write to the
outputStream.
|
protected void |
ensurePerCellCapacities()
Check that the arrays used to hold cell fragments are large enough for the cell that is being
added.
|
void |
flush()
Expensive method.
|
PrefixTreeBlockMeta |
getBlockMeta()
get/set
|
ByteRangeSet |
getFamilySorter() |
ColumnSectionWriter |
getFamilyWriter() |
LongEncoder |
getMvccVersionEncoder() |
long[] |
getMvccVersions() |
ByteRangeSet |
getQualifierSorter() |
ColumnSectionWriter |
getQualifierWriter() |
Tokenizer |
getRowTokenizer() |
RowSectionWriter |
getRowWriter() |
ByteRangeSet |
getTagSorter() |
ColumnSectionWriter |
getTagWriter() |
LongEncoder |
getTimestampEncoder() |
long[] |
getTimestamps() |
int |
getTotalBytes() |
byte[] |
getTypeBytes() |
ByteRange |
getValueByteRange() |
int |
getValueLength(int index) |
long |
getValueOffset(int index)
convenience getters
|
protected void |
initializeTagHelpers() |
void |
reset(OutputStream outputStream,
boolean includeMvccVersion) |
void |
write(Cell cell)
Implementation must copy the entire state of the Cell.
|
void |
writeWithRepeatRow(Cell cell)
Add a Cell to the output stream but repeat the previous row.
|
protected static final org.apache.commons.logging.Log LOG
public static final boolean MULITPLE_FAMILIES_POSSIBLE
protected long numResets
protected OutputStream outputStream
protected boolean includeMvccVersion
protected ByteRange rowRange
protected ByteRange familyRange
protected ByteRange qualifierRange
protected ByteRange tagsRange
protected long[] timestamps
protected long[] mvccVersions
protected byte[] typeBytes
protected int[] valueOffsets
protected int[] tagsOffsets
protected byte[] values
protected byte[] tags
protected PrefixTreeBlockMeta blockMeta
protected LongEncoder timestampEncoder
protected LongEncoder mvccVersionEncoder
protected CellTypeEncoder cellTypeEncoder
protected ByteRangeSet familyDeduplicator
protected ByteRangeSet qualifierDeduplicator
protected ByteRangeSet tagsDeduplicator
protected Tokenizer rowTokenizer
protected Tokenizer familyTokenizer
protected Tokenizer qualifierTokenizer
protected Tokenizer tagsTokenizer
protected RowSectionWriter rowWriter
protected ColumnSectionWriter familyWriter
protected ColumnSectionWriter qualifierWriter
protected ColumnSectionWriter tagsWriter
protected int totalCells
protected int totalUnencodedBytes
protected int totalValueBytes
protected int totalTagBytes
protected int maxValueLength
protected int maxTagLength
protected int totalBytes
public PrefixTreeEncoder(OutputStream outputStream, boolean includeMvccVersion)
public void reset(OutputStream outputStream, boolean includeMvccVersion)
protected void initializeTagHelpers()
protected void ensurePerCellCapacities()
public void writeWithRepeatRow(Cell cell)
public void write(Cell cell)
CellOutputStream
write
in interface CellOutputStream
cell
- Cell to write outpublic void flush() throws IOException
flush
in interface CellOutputStream
IOException
protected void compile()
protected void compileTypes()
The following "compile" methods do any intermediate work necessary to transform the cell fragments collected during the writing phase into structures that are ready to write to the outputStream.
The family and qualifier treatment is almost identical, as is timestamp and mvccVersion.protected void compileMvccVersions()
protected void compileTimestamps()
protected void compileQualifiers()
protected void compileFamilies()
protected void compileTags()
protected void compileRows()
public long getValueOffset(int index)
public int getValueLength(int index)
public PrefixTreeBlockMeta getBlockMeta()
public Tokenizer getRowTokenizer()
public LongEncoder getTimestampEncoder()
public int getTotalBytes()
public long[] getTimestamps()
public long[] getMvccVersions()
public byte[] getTypeBytes()
public LongEncoder getMvccVersionEncoder()
public ByteRangeSet getFamilySorter()
public ByteRangeSet getQualifierSorter()
public ByteRangeSet getTagSorter()
public ColumnSectionWriter getFamilyWriter()
public ColumnSectionWriter getQualifierWriter()
public ColumnSectionWriter getTagWriter()
public RowSectionWriter getRowWriter()
public ByteRange getValueByteRange()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.