Package org.apache.iceberg.flink.source
Class RowDataToAvroGenericRecordConverter
- java.lang.Object
-
- org.apache.iceberg.flink.source.RowDataToAvroGenericRecordConverter
-
- All Implemented Interfaces:
java.util.function.Function<org.apache.flink.table.data.RowData,org.apache.avro.generic.GenericRecord>
@Internal public class RowDataToAvroGenericRecordConverter extends java.lang.Object implements java.util.function.Function<org.apache.flink.table.data.RowData,org.apache.avro.generic.GenericRecord>
This is not serializable because AvroSchema
is not actually serializable, even though it implementsSerializable
interface.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.avro.generic.GenericRecord
apply(org.apache.flink.table.data.RowData rowData)
static RowDataToAvroGenericRecordConverter
fromAvroSchema(org.apache.avro.Schema avroSchema)
Create a mapper based on Avro schemastatic RowDataToAvroGenericRecordConverter
fromIcebergSchema(java.lang.String tableName, Schema icebergSchema)
Create a converter based on Iceberg schema
-
-
-
Method Detail
-
apply
public org.apache.avro.generic.GenericRecord apply(org.apache.flink.table.data.RowData rowData)
- Specified by:
apply
in interfacejava.util.function.Function<org.apache.flink.table.data.RowData,org.apache.avro.generic.GenericRecord>
-
fromIcebergSchema
public static RowDataToAvroGenericRecordConverter fromIcebergSchema(java.lang.String tableName, Schema icebergSchema)
Create a converter based on Iceberg schema
-
fromAvroSchema
public static RowDataToAvroGenericRecordConverter fromAvroSchema(org.apache.avro.Schema avroSchema)
Create a mapper based on Avro schema
-
-