@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 |
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() |
LongEncoder |
getTimestampEncoder() |
long[] |
getTimestamps() |
int |
getTotalBytes() |
byte[] |
getTypeBytes() |
ByteRange |
getValueByteRange() |
int |
getValueLength(int index) |
long |
getValueOffset(int index)
convenience getters
|
void |
reset(OutputStream outputStream,
boolean includeMvccVersion) |
void |
write(Cell 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 long[] timestamps
protected long[] mvccVersions
protected byte[] typeBytes
protected int[] valueOffsets
protected byte[] values
protected PrefixTreeBlockMeta blockMeta
protected LongEncoder timestampEncoder
protected LongEncoder mvccVersionEncoder
protected CellTypeEncoder cellTypeEncoder
protected ByteRangeSet familyDeduplicator
protected ByteRangeSet qualifierDeduplicator
protected Tokenizer rowTokenizer
protected Tokenizer familyTokenizer
protected Tokenizer qualifierTokenizer
protected RowSectionWriter rowWriter
protected ColumnSectionWriter familyWriter
protected ColumnSectionWriter qualifierWriter
protected int totalCells
protected int totalUnencodedBytes
protected int totalValueBytes
protected int maxValueLength
protected int totalBytes
public PrefixTreeEncoder(OutputStream outputStream, boolean includeMvccVersion)
public void reset(OutputStream outputStream, boolean includeMvccVersion)
protected void ensurePerCellCapacities()
public void writeWithRepeatRow(Cell cell)
public void write(Cell cell)
write
in interface CellOutputStream
public void flush() throws IOException
flush
in interface CellOutputStream
IOException
protected void compile()
protected void compileTypes()
protected void compileMvccVersions()
protected void compileTimestamps()
protected void compileQualifiers()
protected void compileFamilies()
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 ColumnSectionWriter getFamilyWriter()
public ColumnSectionWriter getQualifierWriter()
public RowSectionWriter getRowWriter()
public ByteRange getValueByteRange()
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.