Seth Wiesman created FLINK-18073:
------------------------------------ Summary: AvroRowDataSerializationSchema is not always serializable Key: FLINK-18073 URL: https://issues.apache.org/jira/browse/FLINK-18073 Project: Flink Issue Type: Improvement Components: Formats (JSON, Avro, Parquet, ORC, SequenceFile) Reporter: Seth Wiesman Fix For: 1.11.0, 1.12.0 AvroRowDeserializationSchema member runtimeConverter may hold a reference to non serializable avro schema fields. This value should be transient and generated inside of open. {code:java} Caused by: java.io.NotSerializableException: org.apache.avro.Schema$RecordSchema at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) ~[?:1.8.0_252] at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1378) ~[?:1.8.0_252] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174) ~[?:1.8.0_252] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) ~[?:1.8.0_252] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) ~[?:1.8.0_252] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) ~[?:1.8.0_252] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) ~[?:1.8.0_252] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) ~[?:1.8.0_252] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) ~[?:1.8.0_252] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) ~[?:1.8.0_252] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) ~[?:1.8.0_252] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) ~[?:1.8.0_252] at org.apache.flink.util.InstantiationUtil.serializeObject(InstantiationUtil.java:586) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:133) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:71) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer.<init>(FlinkKafkaProducer.java:632) ~[flink-sql-connector-kafka_2.12-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer.<init>(FlinkKafkaProducer.java:522) ~[flink-sql-connector-kafka_2.12-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer.<init>(FlinkKafkaProducer.java:483) ~[flink-sql-connector-kafka_2.12-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at org.apache.flink.streaming.connectors.kafka.table.KafkaDynamicSink.createKafkaProducer(KafkaDynamicSink.java:60) ~[flink-sql-connector-kafka_2.12-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at org.apache.flink.streaming.connectors.kafka.table.KafkaDynamicSinkBase.getSinkRuntimeProvider(KafkaDynamicSinkBase.java:84) ~[flink-sql-connector-kafka_2.12-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at org.apache.flink.table.planner.plan.nodes.common.CommonPhysicalSink.createSinkTransformation(CommonPhysicalSink.scala:69) ~[flink-table-blink_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.table.planner.plan.nodes.physical.stream.StreamExecSink.translateToPlanInternal(StreamExecSink.scala:108) ~[flink-table-blink_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.table.planner.plan.nodes.physical.stream.StreamExecSink.translateToPlanInternal(StreamExecSink.scala:43) ~[flink-table-blink_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.table.planner.plan.nodes.exec.ExecNode.translateToPlan(ExecNode.scala:58) ~[flink-table-blink_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.table.planner.plan.nodes.exec.ExecNode.translateToPlan$(ExecNode.scala:56) ~[flink-table-blink_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.table.planner.plan.nodes.physical.stream.StreamExecSink.translateToPlan(StreamExecSink.scala:43) ~[flink-table-blink_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.table.planner.delegation.StreamPlanner.$anonfun$translateToPlan$1(StreamPlanner.scala:67) ~[flink-table-blink_2.12-1.11-stream.jar:1.11-stream] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at scala.collection.Iterator.foreach(Iterator.scala:937) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at scala.collection.Iterator.foreach$(Iterator.scala:937) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at scala.collection.AbstractIterator.foreach(Iterator.scala:1425) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at scala.collection.IterableLike.foreach(IterableLike.scala:70) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at scala.collection.IterableLike.foreach$(IterableLike.scala:69) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at scala.collection.AbstractIterable.foreach(Iterable.scala:54) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at scala.collection.TraversableLike.map(TraversableLike.scala:233) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at scala.collection.TraversableLike.map$(TraversableLike.scala:226) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at scala.collection.AbstractTraversable.map(Traversable.scala:104) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.table.planner.delegation.StreamPlanner.translateToPlan(StreamPlanner.scala:66) ~[flink-table-blink_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.table.planner.delegation.PlannerBase.translate(PlannerBase.scala:162) ~[flink-table-blink_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.table.api.internal.TableEnvironmentImpl.translate(TableEnvironmentImpl.java:1217) ~[flink-table-blink_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeInternal(TableEnvironmentImpl.java:663) ~[flink-table-blink_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeOperation(TableEnvironmentImpl.java:750) ~[flink-table-blink_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeSql(TableEnvironmentImpl.java:653) ~[flink-table-blink_2.12-1.11-stream.jar:1.11-stream] at com.ververica.StreamingJob.main(StreamingJob.java:50) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252] at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:288) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:198) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:148) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] at org.apache.flink.client.deployment.application.ApplicationDispatcherBootstrap.runApplicationEntryPoint(ApplicationDispatcherBootstrap.java:230) ~[flink-dist_2.12-1.11-stream.jar:1.11-stream] {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) |
Free forum by Nabble | Edit this page |