public interface PhysicalWriter
Modifier and Type | Interface and Description |
---|---|
static interface |
PhysicalWriter.OutputReceiver
The target of an output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
appendRawStripe(ByteBuffer stripe,
OrcProto.StripeInformation.Builder dirEntry)
Appends raw stripe data (e.g.
|
void |
close()
Closes the writer.
|
PhysicalWriter.OutputReceiver |
createDataStream(StreamName name)
Create an OutputReceiver for the given name.
|
void |
finalizeStripe(OrcProto.StripeFooter.Builder footer,
OrcProto.StripeInformation.Builder dirEntry)
Flushes the data in all the streams, spills them to disk, write out stripe
footer.
|
void |
flush()
Flushes the writer so that readers can see the preceding postscripts.
|
long |
getFileBytes(int column,
WriterEncryptionVariant variant)
Get the number of bytes for a file in a given column.
|
StreamOptions |
getStreamOptions()
Get the unencrypted stream options for this file.
|
void |
writeBloomFilter(StreamName name,
OrcProto.BloomFilterIndex.Builder bloom)
Write a bloom filter index in the given stream name.
|
void |
writeFileFooter(OrcProto.Footer.Builder builder)
Writes out the file footer.
|
void |
writeFileMetadata(OrcProto.Metadata.Builder builder)
Writes out the file metadata.
|
void |
writeHeader()
Writes the header of the file, which consists of the magic "ORC" bytes.
|
void |
writeIndex(StreamName name,
OrcProto.RowIndex.Builder index)
Write an index in the given stream name.
|
long |
writePostScript(OrcProto.PostScript.Builder builder)
Writes out the postscript (including the size byte if needed).
|
void |
writeStatistics(StreamName name,
OrcProto.ColumnStatistics.Builder statistics)
Write a stripe or file statistics to the file.
|
void writeHeader() throws IOException
IOException
PhysicalWriter.OutputReceiver createDataStream(StreamName name) throws IOException
name
- the name of the streamIOException
void writeIndex(StreamName name, OrcProto.RowIndex.Builder index) throws IOException
name
- the name of the streamindex
- the bloom filter to writeIOException
void writeBloomFilter(StreamName name, OrcProto.BloomFilterIndex.Builder bloom) throws IOException
name
- the name of the streambloom
- the bloom filter to writeIOException
void finalizeStripe(OrcProto.StripeFooter.Builder footer, OrcProto.StripeInformation.Builder dirEntry) throws IOException
footer
- Stripe footer to be updated with relevant data and written out.dirEntry
- File metadata entry for the stripe, to be updated with
relevant data.IOException
void writeStatistics(StreamName name, OrcProto.ColumnStatistics.Builder statistics) throws IOException
name
- the name of the streamstatistics
- the statistics to writeIOException
void writeFileMetadata(OrcProto.Metadata.Builder builder) throws IOException
builder
- Metadata builder to finalize and write.IOException
void writeFileFooter(OrcProto.Footer.Builder builder) throws IOException
builder
- Footer builder to finalize and write.IOException
long writePostScript(OrcProto.PostScript.Builder builder) throws IOException
builder
- Postscript builder to finalize and write.IOException
void close() throws IOException
IOException
void flush() throws IOException
IOException
void appendRawStripe(ByteBuffer stripe, OrcProto.StripeInformation.Builder dirEntry) throws IOException
stripe
- Stripe data buffer.dirEntry
- File metadata entry for the stripe, to be updated with
relevant data.IOException
long getFileBytes(int column, WriterEncryptionVariant variant)
column
- column from which to get file sizevariant
- the encryption variant to checkStreamOptions getStreamOptions()
Copyright © 2013–2022 The Apache Software Foundation. All rights reserved.