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
TreeWriter
writeRootBatch
in interface TreeWriter
batch
- the list of all of the columnsoffset
- the first row from the batch to writelength
- the number of rows to writeIOException
public void writeBatch(ColumnVector vector, int offset, int length) throws IOException
TreeWriter
writeBatch
in interface TreeWriter
vector
- the data to writeoffset
- the first value offset to write.length
- the number of values to writeIOException
public void createRowIndexEntry() throws IOException
TreeWriter
createRowIndexEntry
in interface TreeWriter
IOException
public void flushStreams() throws IOException
TreeWriter
flushStreams
in interface TreeWriter
IOException
public void writeStripe(int requiredIndexEntries) throws IOException
TreeWriter
writeStripe
in interface TreeWriter
requiredIndexEntries
- the number of index entries that are
required. this is to check to make sure the
row index is well formed.IOException
public void addStripeStatistics(StripeStatistics[] stripeStatistics) throws IOException
TreeWriter
addStripeStatistics
in interface TreeWriter
stripeStatistics
- the statistics for the new stripe across the
encryption variantsIOException
public long estimateMemory()
TreeWriter
estimateMemory
in interface TreeWriter
public long getRawDataSize()
TreeWriter
getRawDataSize
in interface TreeWriter
public void prepareStripe(int stripeId)
TreeWriter
prepareStripe
in interface TreeWriter
stripeId
- the next stripe idpublic void writeFileStatistics() throws IOException
TreeWriter
writeFileStatistics
in interface TreeWriter
IOException
public void getCurrentStatistics(ColumnStatistics[] output)
TreeWriter
getCurrentStatistics
in interface TreeWriter
output
- an array that is filled in with the resultsCopyright © 2013–2022 The Apache Software Foundation. All rights reserved.