public abstract class StringBaseTreeWriter extends TreeWriterBase
TreeWriter.Factory| Modifier and Type | Field and Description |
|---|---|
protected Dictionary |
dictionary |
protected PositionedOutputStream |
directStreamOutput |
protected IntegerWriter |
lengthOutput |
protected DynamicIntArray |
rows |
protected boolean |
useDictionaryEncoding |
bloomFilter, bloomFilterEntry, bloomFilterUtf8, context, createBloomFilter, encryption, fileStatistics, id, indexStatistics, isPresent, rowIndexPosition, schema, stripeColStatistics| Modifier and Type | Method and Description |
|---|---|
void |
createRowIndexEntry()
This method doesn't call the super method, because unlike most of the
other TreeWriters, this one can't record the position in the streams
until the stripe is being flushed.
|
long |
estimateMemory()
Estimate how much memory the writer is consuming excluding the streams.
|
void |
flushStreams()
Flush the TreeWriter stream
|
long |
getRawDataSize()
Estimate the memory used if the file was read into Hive's Writable
types.
|
void |
prepareStripe(int stripeId)
Set up for the next stripe.
|
void |
writeStripe(int requiredIndexEntries)
Write the stripe out to the file.
|
addStripeStatistics, getCurrentStatistics, getRowIndex, getRowIndexEntry, getStripeStatistics, writeBatch, writeFileStatistics, writeRootBatchprotected final IntegerWriter lengthOutput
protected final DynamicIntArray rows
protected final PositionedOutputStream directStreamOutput
protected Dictionary dictionary
protected boolean useDictionaryEncoding
public void writeStripe(int requiredIndexEntries)
throws IOException
TreeWriterwriteStripe in interface TreeWriterwriteStripe in class TreeWriterBaserequiredIndexEntries - the number of index entries that are
required. this is to check to make sure the
row index is well formed.IOExceptionpublic void createRowIndexEntry()
throws IOException
createRowIndexEntry in interface TreeWritercreateRowIndexEntry in class TreeWriterBaseIOExceptionpublic long estimateMemory()
TreeWriterBaseestimateMemory in interface TreeWriterestimateMemory in class TreeWriterBasepublic long getRawDataSize()
TreeWriterpublic void flushStreams()
throws IOException
TreeWriterflushStreams in interface TreeWriterflushStreams in class TreeWriterBaseIOExceptionpublic void prepareStripe(int stripeId)
TreeWriterprepareStripe in interface TreeWriterprepareStripe in class TreeWriterBasestripeId - the next stripe idCopyright © 2013–2022 The Apache Software Foundation. All rights reserved.