@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(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(FSDataOutputStream out, org.apache.orc.OrcFile.WriterOptions opts) throws IOException
IOException
public void writeHeader() throws IOException
writeHeader
in interface org.apache.orc.PhysicalWriter
IOException
public org.apache.orc.PhysicalWriter.OutputReceiver createDataStream(org.apache.orc.impl.StreamName name) throws IOException
createDataStream
in interface org.apache.orc.PhysicalWriter
IOException
public 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.PhysicalWriter
IOException
public 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.PhysicalWriter
IOException
public void finalizeStripe(org.apache.orc.OrcProto.StripeFooter.Builder footerBuilder, org.apache.orc.OrcProto.StripeInformation.Builder dirEntry) throws IOException
finalizeStripe
in interface org.apache.orc.PhysicalWriter
IOException
public void writeFileMetadata(org.apache.orc.OrcProto.Metadata.Builder builder) throws IOException
writeFileMetadata
in interface org.apache.orc.PhysicalWriter
IOException
public void writeFileFooter(org.apache.orc.OrcProto.Footer.Builder builder) throws IOException
writeFileFooter
in interface org.apache.orc.PhysicalWriter
IOException
public long writePostScript(org.apache.orc.OrcProto.PostScript.Builder builder) throws IOException
writePostScript
in interface org.apache.orc.PhysicalWriter
IOException
public void close()
close
in interface org.apache.orc.PhysicalWriter
public void flush() throws IOException
flush
in interface org.apache.orc.PhysicalWriter
IOException
public void appendRawStripe(ByteBuffer buffer, org.apache.orc.OrcProto.StripeInformation.Builder dirEntry) throws IOException
appendRawStripe
in interface org.apache.orc.PhysicalWriter
IOException
public org.apache.orc.CompressionCodec getCompressionCodec()
getCompressionCodec
in interface org.apache.orc.PhysicalWriter
public long getFileBytes(int column)
getFileBytes
in interface org.apache.orc.PhysicalWriter
protected void writeMetadata(org.apache.orc.OrcProto.Metadata metadata) throws IOException
IOException
protected void writeFileFooter(org.apache.orc.OrcProto.Footer footer) throws IOException
IOException
protected void writeStripeFooter(org.apache.orc.OrcProto.StripeFooter footer) throws IOException
IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.