Package io.trino.orc
Class OrcWriter
- java.lang.Object
-
- io.trino.orc.OrcWriter
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class OrcWriter extends Object implements Closeable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOrcWriter.OrcOperation
-
Constructor Summary
Constructors Constructor Description OrcWriter(OrcDataSink orcDataSink, List<String> columnNames, List<Type> types, ColumnMetadata<OrcType> orcTypes, CompressionKind compression, OrcWriterOptions options, Map<String,String> userMetadata, boolean validate, OrcWriteValidation.OrcWriteValidationMode validationMode, OrcWriterStats stats)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intgetBufferedBytes()Number of pending bytes not yet flushed.longgetFileRowCount()Optional<ColumnMetadata<ColumnStatistics>>getFileStats()longgetRetainedBytes()intgetStripeRowCount()longgetWrittenBytes()Number of bytes already flushed to the data sink.voidupdateUserMetadata(Map<String,String> updatedProperties)voidvalidate(OrcDataSource input)voidwrite(Page page)
-
-
-
Constructor Detail
-
OrcWriter
public OrcWriter(OrcDataSink orcDataSink, List<String> columnNames, List<Type> types, ColumnMetadata<OrcType> orcTypes, CompressionKind compression, OrcWriterOptions options, Map<String,String> userMetadata, boolean validate, OrcWriteValidation.OrcWriteValidationMode validationMode, OrcWriterStats stats)
-
-
Method Detail
-
getWrittenBytes
public long getWrittenBytes()
Number of bytes already flushed to the data sink.
-
getBufferedBytes
public int getBufferedBytes()
Number of pending bytes not yet flushed.
-
getStripeRowCount
public int getStripeRowCount()
-
getRetainedBytes
public long getRetainedBytes()
-
write
public void write(Page page) throws IOException
- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
validate
public void validate(OrcDataSource input) throws OrcCorruptionException
- Throws:
OrcCorruptionException
-
getFileRowCount
public long getFileRowCount()
-
getFileStats
public Optional<ColumnMetadata<ColumnStatistics>> getFileStats()
-
-