@Internal public class PhysicalWriterImpl extends Object implements org.apache.orc.PhysicalWriter
PhysicalFsWriter.
Whereas PhysicalFsWriter implementation works on the basis of a Path, this implementation
leverages Flink's FSDataOutputStream to write the compressed data.
NOTE: If the ORC dependency version is updated, this file may have to be updated as well to be in sync with the new version's PhysicalFsWriter.
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.orc.impl.OutStream |
writer |
| Constructor and Description |
|---|
PhysicalWriterImpl(org.apache.flink.core.fs.FSDataOutputStream out,
org.apache.orc.OrcFile.WriterOptions opts) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendRawStripe(ByteBuffer buffer,
org.apache.orc.OrcProto.StripeInformation.Builder dirEntry) |
void |
close() |
org.apache.orc.PhysicalWriter.OutputReceiver |
createDataStream(org.apache.orc.impl.StreamName name) |
void |
finalizeStripe(org.apache.orc.OrcProto.StripeFooter.Builder footerBuilder,
org.apache.orc.OrcProto.StripeInformation.Builder dirEntry) |
void |
flush() |
org.apache.orc.CompressionCodec |
getCompressionCodec() |
long |
getFileBytes(int column) |
void |
writeBloomFilter(org.apache.orc.impl.StreamName name,
org.apache.orc.OrcProto.BloomFilterIndex.Builder bloom,
org.apache.orc.CompressionCodec codec) |
void |
writeFileFooter(org.apache.orc.OrcProto.Footer.Builder builder) |
protected void |
writeFileFooter(org.apache.orc.OrcProto.Footer footer) |
void |
writeFileMetadata(org.apache.orc.OrcProto.Metadata.Builder builder) |
void |
writeHeader() |
void |
writeIndex(org.apache.orc.impl.StreamName name,
org.apache.orc.OrcProto.RowIndex.Builder index,
org.apache.orc.CompressionCodec codec) |
protected void |
writeMetadata(org.apache.orc.OrcProto.Metadata metadata) |
long |
writePostScript(org.apache.orc.OrcProto.PostScript.Builder builder) |
protected void |
writeStripeFooter(org.apache.orc.OrcProto.StripeFooter footer) |
public PhysicalWriterImpl(org.apache.flink.core.fs.FSDataOutputStream out,
org.apache.orc.OrcFile.WriterOptions opts)
throws IOException
IOExceptionpublic void writeHeader()
throws IOException
writeHeader in interface org.apache.orc.PhysicalWriterIOExceptionpublic org.apache.orc.PhysicalWriter.OutputReceiver createDataStream(org.apache.orc.impl.StreamName name)
throws IOException
createDataStream in interface org.apache.orc.PhysicalWriterIOExceptionpublic void writeIndex(org.apache.orc.impl.StreamName name,
org.apache.orc.OrcProto.RowIndex.Builder index,
org.apache.orc.CompressionCodec codec)
throws IOException
writeIndex in interface org.apache.orc.PhysicalWriterIOExceptionpublic void writeBloomFilter(org.apache.orc.impl.StreamName name,
org.apache.orc.OrcProto.BloomFilterIndex.Builder bloom,
org.apache.orc.CompressionCodec codec)
throws IOException
writeBloomFilter in interface org.apache.orc.PhysicalWriterIOExceptionpublic void finalizeStripe(org.apache.orc.OrcProto.StripeFooter.Builder footerBuilder,
org.apache.orc.OrcProto.StripeInformation.Builder dirEntry)
throws IOException
finalizeStripe in interface org.apache.orc.PhysicalWriterIOExceptionpublic void writeFileMetadata(org.apache.orc.OrcProto.Metadata.Builder builder)
throws IOException
writeFileMetadata in interface org.apache.orc.PhysicalWriterIOExceptionpublic void writeFileFooter(org.apache.orc.OrcProto.Footer.Builder builder)
throws IOException
writeFileFooter in interface org.apache.orc.PhysicalWriterIOExceptionpublic long writePostScript(org.apache.orc.OrcProto.PostScript.Builder builder)
throws IOException
writePostScript in interface org.apache.orc.PhysicalWriterIOExceptionpublic void close()
close in interface org.apache.orc.PhysicalWriterpublic void flush()
throws IOException
flush in interface org.apache.orc.PhysicalWriterIOExceptionpublic void appendRawStripe(ByteBuffer buffer, org.apache.orc.OrcProto.StripeInformation.Builder dirEntry) throws IOException
appendRawStripe in interface org.apache.orc.PhysicalWriterIOExceptionpublic org.apache.orc.CompressionCodec getCompressionCodec()
getCompressionCodec in interface org.apache.orc.PhysicalWriterpublic long getFileBytes(int column)
getFileBytes in interface org.apache.orc.PhysicalWriterprotected void writeMetadata(org.apache.orc.OrcProto.Metadata metadata)
throws IOException
IOExceptionprotected void writeFileFooter(org.apache.orc.OrcProto.Footer footer)
throws IOException
IOExceptionprotected void writeStripeFooter(org.apache.orc.OrcProto.StripeFooter footer)
throws IOException
IOExceptionCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.