public interface Writer extends Closeable
| Modifier and Type | Method and Description | 
|---|---|
| void | addRowBatch(VectorizedRowBatch batch)Add a row batch to the ORC file. | 
| void | addUserMetadata(String key,
               ByteBuffer value)Add arbitrary meta-data to the ORC file. | 
| void | appendStripe(byte[] stripe,
            int offset,
            int length,
            StripeInformation stripeInfo,
            OrcProto.StripeStatistics stripeStatistics)Fast stripe append to ORC file. | 
| void | appendStripe(byte[] stripe,
            int offset,
            int length,
            StripeInformation stripeInfo,
            StripeStatistics[] stripeStatistics)Fast stripe append to ORC file. | 
| void | appendUserMetadata(List<OrcProto.UserMetadataItem> userMetadata)Deprecated. 
 use  addUserMetadata(String, ByteBuffer)instead | 
| void | close()Flush all of the buffers and close the file. | 
| long | estimateMemory()Estimate the memory currently used by the writer to buffer the stripe. | 
| long | getNumberOfRows()Return the number of rows in file. | 
| long | getRawDataSize()Return the deserialized data size. | 
| TypeDescription | getSchema()Get the schema for this writer | 
| ColumnStatistics[] | getStatistics()Get the statistics about the columns in the file. | 
| List<StripeInformation> | getStripes()Get the stripe information about the file. | 
| long | writeIntermediateFooter()Write an intermediate footer on the file such that if the file is
 truncated to the returned offset, it would be a valid ORC file. | 
TypeDescription getSchema()
void addUserMetadata(String key, ByteBuffer value)
key - a key to label the data with.value - the contents of the metadata.void addRowBatch(VectorizedRowBatch batch) throws IOException
batch - the rows to addIOExceptionvoid close()
    throws IOException
close in interface AutoCloseableclose in interface CloseableIOExceptionlong getRawDataSize()
long getNumberOfRows()
long writeIntermediateFooter()
                      throws IOException
IOExceptionvoid appendStripe(byte[] stripe,
                  int offset,
                  int length,
                  StripeInformation stripeInfo,
                  OrcProto.StripeStatistics stripeStatistics)
           throws IOException
appendStripe(byte[], int, int, StripeInformation, StripeStatistics[])
 for files with encryption.stripe - - stripe as byte arrayoffset - - offset within byte arraylength - - length of stripe within byte arraystripeInfo - - stripe informationstripeStatistics - - unencrypted stripe statisticsIOExceptionvoid appendStripe(byte[] stripe,
                  int offset,
                  int length,
                  StripeInformation stripeInfo,
                  StripeStatistics[] stripeStatistics)
           throws IOException
addUserMetadata(String,
 ByteBuffer) to append any user metadata.stripe - - stripe as byte arrayoffset - - offset within byte arraylength - - length of stripe within byte arraystripeInfo - - stripe informationstripeStatistics - - stripe statistics with the last one being
                         for the unencrypted data and the others being for
                         each encryption variant.IOExceptionvoid appendUserMetadata(List<OrcProto.UserMetadataItem> userMetadata)
addUserMetadata(String, ByteBuffer) insteaduserMetadata - - user metadataColumnStatistics[] getStatistics() throws IOException
IOExceptionList<StripeInformation> getStripes() throws IOException
IOExceptionlong estimateMemory()
Copyright © 2013–2023 The Apache Software Foundation. All rights reserved.