public class EncryptionTreeWriter extends Object implements TreeWriter
TreeWriter.Factory| Modifier and Type | Method and Description |
|---|---|
void |
addStripeStatistics(StripeStatistics[] stripeStatistics)
During a stripe append, we need to handle the stripe statistics.
|
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
|
void |
getCurrentStatistics(ColumnStatistics[] output)
Get the current file statistics for each column.
|
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 |
writeBatch(ColumnVector vector,
int offset,
int length)
Write a ColumnVector to the file.
|
void |
writeFileStatistics()
Write the FileStatistics for each column in each encryption variant.
|
void |
writeRootBatch(VectorizedRowBatch batch,
int offset,
int length)
Write a VectorizedRowBatch to the file.
|
void |
writeStripe(int requiredIndexEntries)
Write the stripe out to the file.
|
public void writeRootBatch(VectorizedRowBatch batch, int offset, int length) throws IOException
TreeWriterwriteRootBatch in interface TreeWriterbatch - the list of all of the columnsoffset - the first row from the batch to writelength - the number of rows to writeIOExceptionpublic void writeBatch(ColumnVector vector, int offset, int length) throws IOException
TreeWriterwriteBatch in interface TreeWritervector - the data to writeoffset - the first value offset to write.length - the number of values to writeIOExceptionpublic void createRowIndexEntry()
throws IOException
TreeWritercreateRowIndexEntry in interface TreeWriterIOExceptionpublic 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 addStripeStatistics(StripeStatistics[] stripeStatistics) throws IOException
TreeWriteraddStripeStatistics in interface TreeWriterstripeStatistics - the statistics for the new stripe across the
encryption variantsIOExceptionpublic long estimateMemory()
TreeWriterestimateMemory in interface TreeWriterpublic long getRawDataSize()
TreeWritergetRawDataSize in interface TreeWriterpublic void prepareStripe(int stripeId)
TreeWriterprepareStripe in interface TreeWriterstripeId - the next stripe idpublic 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–2022 The Apache Software Foundation. All rights reserved.