public interface Writer
Modifier and Type | Method and Description |
---|---|
void |
addRow(Object row)
Add a row 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 |
appendUserMetadata(List<OrcProto.UserMetadataItem> userMetadata)
When fast stripe append is used for merging ORC stripes, after appending
the last stripe from a file, this interface must be used to merge any
user metadata.
|
void |
close()
Flush all of the buffers and close the file.
|
long |
getNumberOfRows()
Return the number of rows in file.
|
long |
getRawDataSize()
Return the deserialized data size.
|
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.
|
void addUserMetadata(String key, ByteBuffer value)
key
- a key to label the data with.value
- the contents of the metadata.void addRow(Object row) throws IOException
row
- the row to addIOException
void close() throws IOException
IOException
long getRawDataSize()
long getNumberOfRows()
long writeIntermediateFooter() throws IOException
IOException
void appendStripe(byte[] stripe, int offset, int length, StripeInformation stripeInfo, OrcProto.StripeStatistics stripeStatistics) throws IOException
stripe
- - stripe as byte arrayoffset
- - offset within byte arraylength
- - length of stripe within byte arraystripeInfo
- - stripe informationstripeStatistics
- - stripe statistics (Protobuf objects can be
merged directly)IOException
void appendUserMetadata(List<OrcProto.UserMetadataItem> userMetadata)
userMetadata
- - user metadataCopyright © 2017 The Apache Software Foundation. All rights reserved.