public abstract class StringBaseTreeWriter extends TreeWriterBase
TreeWriter.Factory
Modifier and Type | Field and Description |
---|---|
protected StringRedBlackTree |
dictionary |
protected PositionedOutputStream |
directStreamOutput |
protected IntegerWriter |
lengthOutput |
protected DynamicIntArray |
rows |
protected boolean |
useDictionaryEncoding |
bloomFilter, bloomFilterEntry, bloomFilterUtf8, createBloomFilter, fileStatistics, id, indexStatistics, isPresent, rowIndexPosition, stripeColStatistics
Modifier and Type | Method and Description |
---|---|
void |
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.
|
long |
estimateMemory()
Estimate how much memory the writer is consuming excluding the streams.
|
void |
flushStreams()
Flush the TreeWriter stream
|
long |
getRawDataSize()
Estimate the memory used if the file was read into Hive's Writable
types.
|
void |
writeStripe(OrcProto.StripeFooter.Builder builder,
OrcProto.StripeStatistics.Builder stats,
int requiredIndexEntries)
Write the stripe out to the file.
|
getRowIndex, getRowIndexEntry, getStripeStatistics, updateFileStatistics, writeBatch, writeFileStatistics, writeRootBatch
protected final IntegerWriter lengthOutput
protected final StringRedBlackTree dictionary
protected final DynamicIntArray rows
protected final PositionedOutputStream directStreamOutput
protected boolean useDictionaryEncoding
public void writeStripe(OrcProto.StripeFooter.Builder builder, OrcProto.StripeStatistics.Builder stats, int requiredIndexEntries) throws IOException
TreeWriter
writeStripe
in interface TreeWriter
writeStripe
in class TreeWriterBase
builder
- 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.IOException
public void createRowIndexEntry() throws IOException
createRowIndexEntry
in interface TreeWriter
createRowIndexEntry
in class TreeWriterBase
IOException
public long estimateMemory()
TreeWriterBase
estimateMemory
in interface TreeWriter
estimateMemory
in class TreeWriterBase
public long getRawDataSize()
TreeWriter
public void flushStreams() throws IOException
TreeWriter
flushStreams
in interface TreeWriter
flushStreams
in class TreeWriterBase
IOException
Copyright © 2013–2018 The Apache Software Foundation. All rights reserved.