private static class OrcFlowFileWriter.StringTreeWriter extends OrcFlowFileWriter.TreeWriter
| Modifier and Type | Field and Description |
|---|---|
private boolean |
buildIndex |
private org.apache.hadoop.hive.ql.io.orc.StringRedBlackTree |
dictionary |
private float |
dictionaryKeySizeThreshold |
private org.apache.hadoop.hive.ql.io.orc.IntegerWriter |
directLengthOutput |
private org.apache.hadoop.hive.ql.io.orc.PositionedOutputStream |
directStreamOutput |
private boolean |
doneDictionaryCheck |
private static int |
INITIAL_DICTIONARY_SIZE |
private boolean |
isDirectV2 |
private org.apache.hadoop.hive.ql.io.orc.IntegerWriter |
lengthOutput |
private List<Long> |
rowIndexValueCount |
private org.apache.hadoop.hive.ql.io.orc.IntegerWriter |
rowOutput |
private org.apache.hadoop.hive.ql.io.orc.DynamicIntArray |
rows |
private List<org.apache.hadoop.hive.ql.io.orc.OrcProto.RowIndexEntry> |
savedRowIndex |
private boolean |
strideDictionaryCheck |
private org.apache.hadoop.hive.ql.io.orc.OutStream |
stringOutput |
private boolean |
useDictionaryEncoding |
bloomFilter, childrenWriters, createBloomFilter, id, indexStatistics, inspector, rowIndexPosition, stripeColStatistics| Constructor and Description |
|---|
StringTreeWriter(int columnId,
org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector inspector,
OrcFlowFileWriter.StreamFactory writer,
boolean nullable) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
checkDictionaryEncoding() |
(package private) 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.
|
(package private) long |
estimateMemory()
Estimate how much memory the writer is consuming excluding the streams.
|
private void |
flushDictionary() |
(package private) org.apache.hadoop.hive.ql.io.orc.OrcProto.ColumnEncoding |
getEncoding()
Get the encoding for this column.
|
(package private) org.apache.hadoop.io.Text |
getTextValue(Object obj)
Method to retrieve text values from the value object, which can be overridden
by subclasses.
|
private void |
recordDirectStreamPosition() |
(package private) void |
write(Object obj)
Add a new value to the column.
|
(package private) void |
writeStripe(org.apache.hadoop.hive.ql.io.orc.OrcProto.StripeFooter.Builder builder,
int requiredIndexEntries)
Write the stripe out to the file.
|
addBloomFilterEntry, createIntegerWriter, getChildrenWriters, getFileStatistics, getRowIndex, getRowIndexEntry, getStripeStatistics, isNewWriteFormat, recordPosition, writeBatch, writeRootBatchprivate static final int INITIAL_DICTIONARY_SIZE
private final org.apache.hadoop.hive.ql.io.orc.OutStream stringOutput
private final org.apache.hadoop.hive.ql.io.orc.IntegerWriter lengthOutput
private final org.apache.hadoop.hive.ql.io.orc.IntegerWriter rowOutput
private final org.apache.hadoop.hive.ql.io.orc.StringRedBlackTree dictionary
private final org.apache.hadoop.hive.ql.io.orc.DynamicIntArray rows
private final org.apache.hadoop.hive.ql.io.orc.PositionedOutputStream directStreamOutput
private final org.apache.hadoop.hive.ql.io.orc.IntegerWriter directLengthOutput
private final List<org.apache.hadoop.hive.ql.io.orc.OrcProto.RowIndexEntry> savedRowIndex
private final boolean buildIndex
private final float dictionaryKeySizeThreshold
private boolean useDictionaryEncoding
private boolean isDirectV2
private boolean doneDictionaryCheck
private final boolean strideDictionaryCheck
StringTreeWriter(int columnId,
org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector inspector,
OrcFlowFileWriter.StreamFactory writer,
boolean nullable)
throws IOException
IOExceptionorg.apache.hadoop.io.Text getTextValue(Object obj)
obj - valuevoid write(Object obj) throws IOException
OrcFlowFileWriter.TreeWriterwrite in class OrcFlowFileWriter.TreeWriterobj - The value to write to the columnIOException - if an error occurs during addprivate boolean checkDictionaryEncoding()
void writeStripe(org.apache.hadoop.hive.ql.io.orc.OrcProto.StripeFooter.Builder builder,
int requiredIndexEntries)
throws IOException
OrcFlowFileWriter.TreeWriterwriteStripe in class OrcFlowFileWriter.TreeWriterbuilder - the stripe footer that contains the information about the
layout of the stripe. The TreeWriter is required to update
the footer with its information.requiredIndexEntries - the number of index entries that are
required. this is to check to make sure the
row index is well formed.IOException - if an error occurs during writeprivate void flushDictionary()
throws IOException
IOExceptionorg.apache.hadoop.hive.ql.io.orc.OrcProto.ColumnEncoding getEncoding()
OrcFlowFileWriter.TreeWritergetEncoding in class OrcFlowFileWriter.TreeWritervoid createRowIndexEntry()
throws IOException
createRowIndexEntry in class OrcFlowFileWriter.TreeWriterIOException - if an error occurs on createprivate void recordDirectStreamPosition()
throws IOException
IOExceptionlong estimateMemory()
OrcFlowFileWriter.TreeWriterestimateMemory in class OrcFlowFileWriter.TreeWriterCopyright © 2023 Apache NiFi Project. All rights reserved.