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 AvroSchemais not actually serializable, even though it implementsSerializableinterface.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.avro.generic.GenericRecordapply(org.apache.flink.table.data.RowData rowData)static RowDataToAvroGenericRecordConverterfromAvroSchema(org.apache.avro.Schema avroSchema)Create a mapper based on Avro schemastatic RowDataToAvroGenericRecordConverterfromIcebergSchema(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:
applyin 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
-
-