public interface PhysicalWriter
This API is limited to being used by LLAP.
| Modifier and Type | Interface and Description | 
|---|---|
| static interface  | PhysicalWriter.OutputReceiverThe 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
IOExceptionPhysicalWriter.OutputReceiver createDataStream(StreamName name) throws IOException
name - the name of the streamIOExceptionvoid writeIndex(StreamName name, OrcProto.RowIndex.Builder index) throws IOException
name - the name of the streamindex - the bloom filter to writeIOExceptionvoid writeBloomFilter(StreamName name, OrcProto.BloomFilterIndex.Builder bloom) throws IOException
name - the name of the streambloom - the bloom filter to writeIOExceptionvoid 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.IOExceptionvoid writeStatistics(StreamName name, OrcProto.ColumnStatistics.Builder statistics) throws IOException
name - the name of the streamstatistics - the statistics to writeIOExceptionvoid writeFileMetadata(OrcProto.Metadata.Builder builder) throws IOException
builder - Metadata builder to finalize and write.IOExceptionvoid writeFileFooter(OrcProto.Footer.Builder builder) throws IOException
builder - Footer builder to finalize and write.IOExceptionlong writePostScript(OrcProto.PostScript.Builder builder) throws IOException
builder - Postscript builder to finalize and write.IOExceptionvoid close()
    throws IOException
IOExceptionvoid flush()
    throws IOException
IOExceptionvoid 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.IOExceptionlong getFileBytes(int column,
                  WriterEncryptionVariant variant)
column - column from which to get file sizevariant - the encryption variant to checkStreamOptions getStreamOptions()
Copyright © 2013–2023 The Apache Software Foundation. All rights reserved.