public abstract class TreeWriterBase extends Object implements TreeWriter
TreeWriter.Factory| Modifier and Type | Field and Description |
|---|---|
protected BloomFilter |
bloomFilter |
protected OrcProto.BloomFilter.Builder |
bloomFilterEntry |
protected BloomFilterUtf8 |
bloomFilterUtf8 |
protected WriterContext |
context |
protected boolean |
createBloomFilter |
protected WriterEncryptionVariant |
encryption |
protected ColumnStatisticsImpl |
fileStatistics |
protected int |
id |
protected ColumnStatisticsImpl |
indexStatistics |
protected BitFieldWriter |
isPresent |
protected org.apache.orc.impl.writer.TreeWriterBase.RowIndexPositionRecorder |
rowIndexPosition |
protected TypeDescription |
schema |
protected ColumnStatisticsImpl |
stripeColStatistics |
| Modifier and Type | Method and Description |
|---|---|
void |
addStripeStatistics(StripeStatistics[] stats)
During a stripe append, we need to handle the stripe statistics.
|
void |
createRowIndexEntry()
Create a row index entry with the previous location and the current
index statistics.
|
long |
estimateMemory()
Estimate how much memory the writer is consuming excluding the streams.
|
void |
flushStreams()
Flush the TreeWriter stream
|
void |
getCurrentStatistics(ColumnStatistics[] output)
Get the current file statistics for each column.
|
protected OrcProto.RowIndex.Builder |
getRowIndex() |
protected OrcProto.RowIndexEntry.Builder |
getRowIndexEntry() |
protected ColumnStatisticsImpl |
getStripeStatistics() |
void |
prepareStripe(int stripeId)
Set up for the next stripe.
|
void |
writeBatch(ColumnVector vector,
int offset,
int length)
Write the values from the given vector from offset for length elements.
|
void |
writeFileStatistics()
Write the FileStatistics for each column in each encryption variant.
|
void |
writeRootBatch(VectorizedRowBatch batch,
int offset,
int length)
Handle the top level object write.
|
void |
writeStripe(int requiredIndexEntries)
Write the stripe out to the file.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRawDataSizeprotected final int id
protected final BitFieldWriter isPresent
protected final TypeDescription schema
protected final WriterEncryptionVariant encryption
protected final ColumnStatisticsImpl indexStatistics
protected final ColumnStatisticsImpl stripeColStatistics
protected final ColumnStatisticsImpl fileStatistics
protected final org.apache.orc.impl.writer.TreeWriterBase.RowIndexPositionRecorder rowIndexPosition
protected final BloomFilter bloomFilter
protected final BloomFilterUtf8 bloomFilterUtf8
protected final boolean createBloomFilter
protected final OrcProto.BloomFilter.Builder bloomFilterEntry
protected final WriterContext context
protected OrcProto.RowIndex.Builder getRowIndex()
protected ColumnStatisticsImpl getStripeStatistics()
protected OrcProto.RowIndexEntry.Builder getRowIndexEntry()
public void writeRootBatch(VectorizedRowBatch batch, int offset, int length) throws IOException
writeRootBatch in interface TreeWriterbatch - the batch to write fromoffset - the row to start onlength - the number of rows to writeIOExceptionpublic void writeBatch(ColumnVector vector, int offset, int length) throws IOException
writeBatch in interface TreeWritervector - the vector to write fromoffset - the first value from the vector to writelength - the number of values from the vector to writeIOExceptionpublic void prepareStripe(int stripeId)
TreeWriterprepareStripe in interface TreeWriterstripeId - the next stripe idpublic void flushStreams()
throws IOException
TreeWriterflushStreams in interface TreeWriterIOExceptionpublic void writeStripe(int requiredIndexEntries)
throws IOException
TreeWriterwriteStripe in interface TreeWriterrequiredIndexEntries - 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 TreeWriterIOExceptionpublic void addStripeStatistics(StripeStatistics[] stats) throws IOException
TreeWriteraddStripeStatistics in interface TreeWriterstats - the statistics for the new stripe across the
encryption variantsIOExceptionpublic long estimateMemory()
estimateMemory in interface TreeWriterpublic void writeFileStatistics()
throws IOException
TreeWriterwriteFileStatistics in interface TreeWriterIOExceptionpublic void getCurrentStatistics(ColumnStatistics[] output)
TreeWritergetCurrentStatistics in interface TreeWriteroutput - an array that is filled in with the resultsCopyright © 2013–2023 The Apache Software Foundation. All rights reserved.