Hi Prashant,I think the warn is given when callingreturn TypeInformation.of(Trace.APITrace::class.java) Currently flink does not have the native supportfor the protobuf types yet[1], thus it would use ageneric serializer created by kryo.This should not affect the rightness of the programand should only affect its performance. One possiblesolution might be register custom serializer into the kryoserializer framework for protobuf classes, like the example in [2].Best,Yun------------------Original Mail ------------------Sender:Prashant Deva <[hidden email]>Send Date:Sat Apr 24 11:00:17 2021Recipients:User <[hidden email]>Subject:pojo warning when using auto generated protobuf classI am seeing this warning msg when trying to use a custom protobuf de/serializer with kafka source with auto generated java protobuf class:18:41:31.164 [main] INFO org.apache. flink. api. java. typeutils. TypeExtractor - Class class com.xx.APITrace cannot be used as a POJO type because not all fields are valid POJO fields, and must be processed as GenericType. Please read the Flink documentation on "Data Types & Serialization" for details of the effect on performance. here is my serializer. What am i doing wrong?class ApiTraceSchema: DeserializationSchema<Trace.APITrace>, SerializationSchema<Trace.APITrace> {
override fun getProducedType(): TypeInformation<Trace.APITrace> {
return TypeInformation.of(Trace.APITrace::class.java)
}
override fun deserialize(message: ByteArray): Trace.APITrace {
return Trace.APITrace.parseFrom(message)
}
override fun isEndOfStream(nextElement: Trace.APITrace): Boolean {
return false
}
override fun serialize(element: Trace.APITrace): ByteArray {
return element.toByteArray()
}
}
Free forum by Nabble | Edit this page |