private abstract static class OrcFlowFileWriter.TreeWriter extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.hive.ql.io.filters.BloomFilterIO |
bloomFilter |
private org.apache.hadoop.hive.ql.io.orc.OrcProto.BloomFilter.Builder |
bloomFilterEntry |
private org.apache.hadoop.hive.ql.io.orc.OrcProto.BloomFilterIndex.Builder |
bloomFilterIndex |
private org.apache.hadoop.hive.ql.io.orc.PositionedOutputStream |
bloomFilterStream |
protected OrcFlowFileWriter.TreeWriter[] |
childrenWriters |
protected boolean |
createBloomFilter |
private org.apache.hadoop.hive.ql.io.orc.ColumnStatisticsImpl |
fileStatistics |
private boolean |
foundNulls |
protected int |
id |
protected org.apache.hadoop.hive.ql.io.orc.ColumnStatisticsImpl |
indexStatistics |
protected org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector |
inspector |
private boolean |
isCompressed |
private org.apache.hadoop.hive.ql.io.orc.BitFieldWriter |
isPresent |
private org.apache.hadoop.hive.ql.io.orc.OutStream |
isPresentOutStream |
private org.apache.hadoop.hive.ql.io.orc.OrcProto.RowIndex.Builder |
rowIndex |
private org.apache.hadoop.hive.ql.io.orc.OrcProto.RowIndexEntry.Builder |
rowIndexEntry |
protected OrcFlowFileWriter.RowIndexPositionRecorder |
rowIndexPosition |
private org.apache.hadoop.hive.ql.io.orc.PositionedOutputStream |
rowIndexStream |
protected org.apache.hadoop.hive.ql.io.orc.ColumnStatisticsImpl |
stripeColStatistics |
private List<org.apache.hadoop.hive.ql.io.orc.OrcProto.StripeStatistics.Builder> |
stripeStatsBuilders |
| Constructor and Description |
|---|
TreeWriter(int columnId,
org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector inspector,
OrcFlowFileWriter.StreamFactory streamFactory,
boolean nullable)
Create a tree writer.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addBloomFilterEntry() |
(package private) org.apache.hadoop.hive.ql.io.orc.IntegerWriter |
createIntegerWriter(org.apache.hadoop.hive.ql.io.orc.PositionedOutputStream output,
boolean signed,
boolean isDirectV2,
OrcFlowFileWriter.StreamFactory writer) |
(package private) void |
createRowIndexEntry()
Create a row index entry with the previous location and the current
index statistics.
|
(package private) long |
estimateMemory()
Estimate how much memory the writer is consuming excluding the streams.
|
(package private) OrcFlowFileWriter.TreeWriter[] |
getChildrenWriters() |
(package private) org.apache.hadoop.hive.ql.io.orc.OrcProto.ColumnEncoding |
getEncoding()
Get the encoding for this column.
|
protected org.apache.hadoop.hive.ql.io.orc.ColumnStatisticsImpl |
getFileStatistics() |
protected org.apache.hadoop.hive.ql.io.orc.OrcProto.RowIndex.Builder |
getRowIndex() |
protected org.apache.hadoop.hive.ql.io.orc.OrcProto.RowIndexEntry.Builder |
getRowIndexEntry() |
protected org.apache.hadoop.hive.ql.io.orc.ColumnStatisticsImpl |
getStripeStatistics() |
(package private) boolean |
isNewWriteFormat(OrcFlowFileWriter.StreamFactory writer) |
(package private) void |
recordPosition(org.apache.hadoop.hive.ql.io.orc.PositionRecorder recorder)
Record the current position in each of this column's streams.
|
private void |
removeIsPresentPositions() |
(package private) void |
write(Object obj)
Add a new value to the column.
|
(package private) 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.
|
(package private) void |
writeRootBatch(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch,
int offset,
int length)
Handle the top level object write.
|
(package private) void |
writeStripe(org.apache.hadoop.hive.ql.io.orc.OrcProto.StripeFooter.Builder builder,
int requiredIndexEntries)
Write the stripe out to the file.
|
private void |
writeStripeStatistics(org.apache.hadoop.hive.ql.io.orc.OrcProto.StripeStatistics.Builder builder,
OrcFlowFileWriter.TreeWriter treeWriter) |
protected final int id
protected final org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector inspector
private final org.apache.hadoop.hive.ql.io.orc.BitFieldWriter isPresent
private final boolean isCompressed
protected final org.apache.hadoop.hive.ql.io.orc.ColumnStatisticsImpl indexStatistics
protected final org.apache.hadoop.hive.ql.io.orc.ColumnStatisticsImpl stripeColStatistics
private final org.apache.hadoop.hive.ql.io.orc.ColumnStatisticsImpl fileStatistics
protected OrcFlowFileWriter.TreeWriter[] childrenWriters
protected final OrcFlowFileWriter.RowIndexPositionRecorder rowIndexPosition
private final org.apache.hadoop.hive.ql.io.orc.OrcProto.RowIndex.Builder rowIndex
private final org.apache.hadoop.hive.ql.io.orc.OrcProto.RowIndexEntry.Builder rowIndexEntry
private final org.apache.hadoop.hive.ql.io.orc.PositionedOutputStream rowIndexStream
private final org.apache.hadoop.hive.ql.io.orc.PositionedOutputStream bloomFilterStream
protected final org.apache.hadoop.hive.ql.io.filters.BloomFilterIO bloomFilter
protected final boolean createBloomFilter
private final org.apache.hadoop.hive.ql.io.orc.OrcProto.BloomFilterIndex.Builder bloomFilterIndex
private final org.apache.hadoop.hive.ql.io.orc.OrcProto.BloomFilter.Builder bloomFilterEntry
private boolean foundNulls
private org.apache.hadoop.hive.ql.io.orc.OutStream isPresentOutStream
private final List<org.apache.hadoop.hive.ql.io.orc.OrcProto.StripeStatistics.Builder> stripeStatsBuilders
TreeWriter(int columnId,
org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector inspector,
OrcFlowFileWriter.StreamFactory streamFactory,
boolean nullable)
throws IOException
columnId - the column id of the column to writeinspector - the object inspector to usestreamFactory - limited access to the Writer's data.nullable - can the value be null?IOException - if an error occurs during creationprotected org.apache.hadoop.hive.ql.io.orc.OrcProto.RowIndex.Builder getRowIndex()
protected org.apache.hadoop.hive.ql.io.orc.ColumnStatisticsImpl getStripeStatistics()
protected org.apache.hadoop.hive.ql.io.orc.ColumnStatisticsImpl getFileStatistics()
protected org.apache.hadoop.hive.ql.io.orc.OrcProto.RowIndexEntry.Builder getRowIndexEntry()
org.apache.hadoop.hive.ql.io.orc.IntegerWriter createIntegerWriter(org.apache.hadoop.hive.ql.io.orc.PositionedOutputStream output,
boolean signed,
boolean isDirectV2,
OrcFlowFileWriter.StreamFactory writer)
boolean isNewWriteFormat(OrcFlowFileWriter.StreamFactory writer)
void write(Object obj) throws IOException
obj - The value to write to the columnIOException - if an error occurs during addprivate void removeIsPresentPositions()
void writeStripe(org.apache.hadoop.hive.ql.io.orc.OrcProto.StripeFooter.Builder builder,
int requiredIndexEntries)
throws IOException
builder - 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 writeStripeStatistics(org.apache.hadoop.hive.ql.io.orc.OrcProto.StripeStatistics.Builder builder,
OrcFlowFileWriter.TreeWriter treeWriter)
OrcFlowFileWriter.TreeWriter[] getChildrenWriters()
org.apache.hadoop.hive.ql.io.orc.OrcProto.ColumnEncoding getEncoding()
void createRowIndexEntry()
throws IOException
IOException - if an error occurs during createvoid addBloomFilterEntry()
void recordPosition(org.apache.hadoop.hive.ql.io.orc.PositionRecorder recorder)
throws IOException
recorder - where should the locations be recordedIOException - if an error occurs during position recordinglong estimateMemory()
void writeRootBatch(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch,
int offset,
int length)
throws IOException
batch - the batch to write fromoffset - the row to start onlength - the number of rows to writeIOException - if an error occurs during writevoid writeBatch(org.apache.hadoop.hive.ql.exec.vector.ColumnVector vector,
int offset,
int length)
throws IOException
vector - the vector to write fromoffset - the first value from the vector to writelength - the number of values from the vector to writeIOException - if an error occurs during writeCopyright © 2023 Apache NiFi Project. All rights reserved.