Package org.apache.iceberg.avro
Class AvroFormatModel<D,S>
java.lang.Object
org.apache.iceberg.formats.BaseFormatModel<D,S,org.apache.avro.io.DatumWriter<D>,org.apache.avro.io.DatumReader<D>,org.apache.avro.Schema>
org.apache.iceberg.avro.AvroFormatModel<D,S>
- All Implemented Interfaces:
FormatModel<D,S>
public class AvroFormatModel<D,S>
extends BaseFormatModel<D,S,org.apache.avro.io.DatumWriter<D>,org.apache.avro.io.DatumReader<D>,org.apache.avro.Schema>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.iceberg.formats.BaseFormatModel
BaseFormatModel.ReaderFunction<R,S, F>, BaseFormatModel.WriterFunction<W, S, F> -
Method Summary
Modifier and TypeMethodDescriptionstatic <D,S> AvroFormatModel <D, S> create(Class<D> type, Class<S> schemaType, BaseFormatModel.WriterFunction<org.apache.avro.io.DatumWriter<D>, S, org.apache.avro.Schema> writerFunction, BaseFormatModel.ReaderFunction<org.apache.avro.io.DatumReader<D>, S, org.apache.avro.Schema> readerFunction) format()The file format which is read/written by the object model.static <D> AvroFormatModel<PositionDelete<D>, Void> readBuilder(InputFile inputFile) Creates a file reader builder for the specified input file.writeBuilder(EncryptedOutputFile outputFile) Creates a writer builder for data files.Methods inherited from class org.apache.iceberg.formats.BaseFormatModel
readerFunction, schemaType, type, writerFunction
-
Method Details
-
forPositionDeletes
-
create
public static <D,S> AvroFormatModel<D,S> create(Class<D> type, Class<S> schemaType, BaseFormatModel.WriterFunction<org.apache.avro.io.DatumWriter<D>, S, org.apache.avro.Schema> writerFunction, BaseFormatModel.ReaderFunction<org.apache.avro.io.DatumReader<D>, S, org.apache.avro.Schema> readerFunction) -
format
Description copied from interface:FormatModelThe file format which is read/written by the object model. -
writeBuilder
Description copied from interface:FormatModelCreates a writer builder for data files.The returned
ModelWriteBuilderconfigures and creates a writer that converts input objects into the file format supported by this factory.- Parameters:
outputFile- destination for the written data- Returns:
- configured writer builder
-
readBuilder
Description copied from interface:FormatModelCreates a file reader builder for the specified input file.The returned
ReadBuilderconfigures and creates a reader that converts data from the file format into output objects supported by this factory.- Parameters:
inputFile- source file to read from- Returns:
- configured reader builder for the specified input
-