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 addIOExceptionvoid close()
throws IOException
IOExceptionlong getRawDataSize()
long getNumberOfRows()
long writeIntermediateFooter()
throws IOException
IOExceptionvoid 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)IOExceptionvoid appendUserMetadata(List<OrcProto.UserMetadataItem> userMetadata)
userMetadata - - user metadataCopyright © 2017 The Apache Software Foundation. All rights reserved.