public class UnionTreeWriter extends TreeWriterBase
TreeWriter.Factory
bloomFilter, bloomFilterEntry, bloomFilterUtf8, createBloomFilter, fileStatistics, id, indexStatistics, isPresent, rowIndexPosition, stripeColStatistics
Modifier and Type | Method and Description |
---|---|
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
|
long |
getRawDataSize()
Estimate the memory used if the file was read into Hive's Writable
types.
|
void |
updateFileStatistics(OrcProto.StripeStatistics stats)
During a stripe append, we need to update the file statistics.
|
void |
writeBatch(ColumnVector vector,
int offset,
int length)
Write the values from the given vector from offset for length elements.
|
void |
writeFileStatistics(OrcProto.Footer.Builder footer)
Add the file statistics to the file footer.
|
void |
writeStripe(OrcProto.StripeFooter.Builder builder,
OrcProto.StripeStatistics.Builder stats,
int requiredIndexEntries)
Write the stripe out to the file.
|
getRowIndex, getRowIndexEntry, getStripeStatistics, writeRootBatch
public void writeBatch(ColumnVector vector, int offset, int length) throws IOException
TreeWriterBase
writeBatch
in interface TreeWriter
writeBatch
in class TreeWriterBase
vector
- the vector to write fromoffset
- the first value from the vector to writelength
- the number of values from the vector to writeIOException
public void createRowIndexEntry() throws IOException
TreeWriterBase
createRowIndexEntry
in interface TreeWriter
createRowIndexEntry
in class TreeWriterBase
IOException
public void writeStripe(OrcProto.StripeFooter.Builder builder, OrcProto.StripeStatistics.Builder stats, int requiredIndexEntries) throws IOException
TreeWriter
writeStripe
in interface TreeWriter
writeStripe
in class TreeWriterBase
builder
- the stripe footer that contains the information about the
layout of the stripe. The TreeWriterBase is required to update
the footer with its information.stats
- the stripe statistics informationrequiredIndexEntries
- the number of index entries that are
required. this is to check to make sure the
row index is well formed.IOException
public void updateFileStatistics(OrcProto.StripeStatistics stats)
TreeWriter
updateFileStatistics
in interface TreeWriter
updateFileStatistics
in class TreeWriterBase
stats
- the statistics for the new stripepublic long estimateMemory()
TreeWriterBase
estimateMemory
in interface TreeWriter
estimateMemory
in class TreeWriterBase
public long getRawDataSize()
TreeWriter
public void writeFileStatistics(OrcProto.Footer.Builder footer)
TreeWriter
writeFileStatistics
in interface TreeWriter
writeFileStatistics
in class TreeWriterBase
footer
- the file footer builderpublic void flushStreams() throws IOException
TreeWriter
flushStreams
in interface TreeWriter
flushStreams
in class TreeWriterBase
IOException
Copyright © 2013–2018 The Apache Software Foundation. All rights reserved.