Search code examples
apache-flinkflink-streaming

Facing SequenceNumber is treated as a generic type exception with flink-connector-kinesis-4.1.0 jar


I am trying to use flink-connector-kinesis-4.1.0 jar[https://mvnrepository.com/artifact/org.apache.flink/flink-connector-kinesis/4.1.0-1.17] with flink 1.17 for integrating kinesis stream connector but I am getting following exception on flink job start. This seems like the following JIRA fix is not added to latest flink-connector-kinesis-4.1.0-1.17 jar. I confirmed the same by decompiling the jar

https://issues.apache.org/jira/browse/FLINK-24943

Commit for fix: https://github.com/apache/flink/pull/20257/commits/610c2420b09f7fd05039ccdb9d8a810bb5d7daf7

Can you please suggest what is the alternative here?

Exception log

java.lang.UnsupportedOperationException: Generic types have been disabled in the ExecutionConfig and type org.apache.flink.streaming.connectors.kinesis.model.SequenceNumber is treated as a generic type.
    at org.apache.flink.api.java.typeutils.GenericTypeInfo.createSerializer(GenericTypeInfo.java:87)
    at org.apache.flink.api.java.typeutils.TupleTypeInfo.createSerializer(TupleTypeInfo.java:104)
    at org.apache.flink.api.java.typeutils.TupleTypeInfo.createSerializer(TupleTypeInfo.java:49)
    at org.apache.flink.api.java.typeutils.ListTypeInfo.createSerializer(ListTypeInfo.java:99)
    at org.apache.flink.api.common.state.StateDescriptor.initializeSerializerUnlessSet(StateDescriptor.java:311)

Solution

  • The state of that ticket (at the moment of replying) is that it's still unresolved. That means it's a known bug but there is no fix available for this problem at this time. The only solution is not upgrade at this moment.