public interface TreeWriter
| Modifier and Type | Interface and Description |
|---|---|
static class |
TreeWriter.Factory |
| Modifier and Type | Method and Description |
|---|---|
void |
createRowIndexEntry()
Create a row index entry at the current point in the stripe.
|
long |
estimateMemory()
Estimate the memory currently used to buffer the stripe.
|
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 stripeStatistics)
During a stripe append, we need to update the file statistics.
|
void |
writeBatch(ColumnVector vector,
int offset,
int length)
Write a ColumnVector to the file.
|
void |
writeFileStatistics(OrcProto.Footer.Builder footer)
Add the file statistics to the file footer.
|
void |
writeRootBatch(VectorizedRowBatch batch,
int offset,
int length)
Write a VectorizedRowBath to the file.
|
void |
writeStripe(OrcProto.StripeFooter.Builder stripeFooter,
OrcProto.StripeStatistics.Builder stats,
int requiredIndexEntries)
Write the stripe out to the file.
|
long estimateMemory()
long getRawDataSize()
void writeRootBatch(VectorizedRowBatch batch, int offset, int length) throws IOException
batch - the list of all of the columnsoffset - the first row from the batch to writelength - the number of rows to writeIOExceptionvoid writeBatch(ColumnVector vector, int offset, int length) throws IOException
vector - the data to writeoffset - the first value offset to write.length - the number of values to writeIOExceptionvoid createRowIndexEntry()
throws IOException
IOExceptionvoid flushStreams()
throws IOException
IOExceptionvoid writeStripe(OrcProto.StripeFooter.Builder stripeFooter, OrcProto.StripeStatistics.Builder stats, int requiredIndexEntries) throws IOException
stripeFooter - 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.IOExceptionvoid updateFileStatistics(OrcProto.StripeStatistics stripeStatistics)
stripeStatistics - the statistics for the new stripevoid writeFileStatistics(OrcProto.Footer.Builder footer)
footer - the file footer builderCopyright © 2013–2018 The Apache Software Foundation. All rights reserved.