Package org.apache.orc.impl.writer
Class StringBaseTreeWriter
java.lang.Object
org.apache.orc.impl.writer.TreeWriterBase
org.apache.orc.impl.writer.StringBaseTreeWriter
- All Implemented Interfaces:
TreeWriter
- Direct Known Subclasses:
CharTreeWriter,StringTreeWriter,VarcharTreeWriter
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.orc.impl.writer.TreeWriter
TreeWriter.Factory -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Dictionaryprotected final PositionedOutputStreamprotected final IntegerWriterprotected final DynamicIntArrayprotected booleanFields inherited from class org.apache.orc.impl.writer.TreeWriterBase
bloomFilter, bloomFilterEntry, bloomFilterUtf8, context, createBloomFilter, encryption, fileStatistics, id, indexStatistics, isPresent, rowIndexPosition, schema, stripeColStatistics -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method doesn't call the super method, because unlike most of the other TreeWriters, this one can't record the position in the streams until the stripe is being flushed.longEstimate how much memory the writer is consuming excluding the streams.voidFlush the TreeWriter streamlongEstimate the memory used if the file was read into Hive's Writable types.voidprepareStripe(int stripeId) Set up for the next stripe.voidwriteStripe(int requiredIndexEntries) Write the stripe out to the file.Methods inherited from class org.apache.orc.impl.writer.TreeWriterBase
addStripeStatistics, getCurrentStatistics, getRowIndex, getRowIndexEntry, getStripeStatistics, writeBatch, writeFileStatistics, writeRootBatch
-
Field Details
-
lengthOutput
-
rows
-
directStreamOutput
-
dictionary
-
useDictionaryEncoding
protected boolean useDictionaryEncoding
-
-
Method Details
-
writeStripe
Description copied from interface:TreeWriterWrite the stripe out to the file.- Specified by:
writeStripein interfaceTreeWriter- Overrides:
writeStripein 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
-
createRowIndexEntry
This method doesn't call the super method, because unlike most of the other TreeWriters, this one can't record the position in the streams until the stripe is being flushed. Therefore it saves all of the entries and augments them with the final information as the stripe is written.- Specified by:
createRowIndexEntryin interfaceTreeWriter- Overrides:
createRowIndexEntryin classTreeWriterBase- Throws:
IOException
-
estimateMemory
public long estimateMemory()Description copied from class:TreeWriterBaseEstimate how much memory the writer is consuming excluding the streams.- Specified by:
estimateMemoryin interfaceTreeWriter- Overrides:
estimateMemoryin classTreeWriterBase- Returns:
- the number of bytes.
-
getRawDataSize
public long getRawDataSize()Description copied from interface:TreeWriterEstimate 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:TreeWriterFlush the TreeWriter stream- Specified by:
flushStreamsin interfaceTreeWriter- Overrides:
flushStreamsin classTreeWriterBase- Throws:
IOException
-
prepareStripe
public void prepareStripe(int stripeId) Description copied from interface:TreeWriterSet up for the next stripe.- Specified by:
prepareStripein interfaceTreeWriter- Overrides:
prepareStripein classTreeWriterBase- Parameters:
stripeId- the next stripe id
-