Package org.apache.orc.impl.writer
Class DecimalTreeWriter
java.lang.Object
org.apache.orc.impl.writer.TreeWriterBase
org.apache.orc.impl.writer.DecimalTreeWriter
- All Implemented Interfaces:
TreeWriter
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.orc.impl.writer.TreeWriter
TreeWriter.Factory
-
Field Summary
Fields inherited from class org.apache.orc.impl.writer.TreeWriterBase
bloomFilter, bloomFilterEntry, bloomFilterUtf8, context, createBloomFilter, encryption, fileStatistics, id, indexStatistics, isPresent, rowIndexPosition, schema, stripeColStatistics
-
Constructor Summary
ConstructorDescriptionDecimalTreeWriter
(TypeDescription schema, WriterEncryptionVariant encryption, WriterContext context) -
Method Summary
Modifier and TypeMethodDescriptionlong
Estimate how much memory the writer is consuming excluding the streams.void
Flush the TreeWriter streamlong
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
(org.apache.hadoop.hive.ql.exec.vector.ColumnVector vector, int offset, int length) Write the values from the given vector from offset for length elements.void
writeStripe
(int requiredIndexEntries) Write the stripe out to the file.Methods inherited from class org.apache.orc.impl.writer.TreeWriterBase
addStripeStatistics, createRowIndexEntry, getCurrentStatistics, getRowIndex, getRowIndexEntry, getStripeStatistics, writeFileStatistics, writeRootBatch
-
Constructor Details
-
DecimalTreeWriter
public DecimalTreeWriter(TypeDescription schema, WriterEncryptionVariant encryption, WriterContext context) throws IOException - Throws:
IOException
-
-
Method Details
-
writeBatch
public void writeBatch(org.apache.hadoop.hive.ql.exec.vector.ColumnVector vector, int offset, int length) throws IOException Description copied from class:TreeWriterBase
Write the values from the given vector from offset for length elements.- Specified by:
writeBatch
in interfaceTreeWriter
- Overrides:
writeBatch
in classTreeWriterBase
- Parameters:
vector
- the vector to write fromoffset
- the first value from the vector to writelength
- the number of values from the vector to write- Throws:
IOException
-
writeStripe
Description copied from interface:TreeWriter
Write the stripe out to the file.- Specified by:
writeStripe
in interfaceTreeWriter
- Overrides:
writeStripe
in classTreeWriterBase
- Parameters:
requiredIndexEntries
- the number of index entries that are required. this is to check to make sure the row index is well formed.- Throws:
IOException
-
estimateMemory
public long estimateMemory()Description copied from class:TreeWriterBase
Estimate how much memory the writer is consuming excluding the streams.- Specified by:
estimateMemory
in interfaceTreeWriter
- Overrides:
estimateMemory
in classTreeWriterBase
- Returns:
- the number of bytes.
-
getRawDataSize
public long getRawDataSize()Description copied from interface:TreeWriter
Estimate the memory used if the file was read into Hive's Writable types. This is used as an estimate for the query optimizer.- Returns:
- the number of bytes
-
flushStreams
Description copied from interface:TreeWriter
Flush the TreeWriter stream- Specified by:
flushStreams
in interfaceTreeWriter
- Overrides:
flushStreams
in classTreeWriterBase
- Throws:
IOException
-
prepareStripe
public void prepareStripe(int stripeId) Description copied from interface:TreeWriter
Set up for the next stripe.- Specified by:
prepareStripe
in interfaceTreeWriter
- Overrides:
prepareStripe
in classTreeWriterBase
- Parameters:
stripeId
- the next stripe id
-