Anthony Pounds-Cornish created FLINK-29324:
----------------------------------------------
Summary: Calling Kinesis connector close method before subtask
starts running results in NPE
Key: FLINK-29324
URL: https://issues.apache.org/jira/browse/FLINK-29324
Project: Flink
Issue Type: Bug
Components: Connectors / Kinesis
Affects Versions: 1.15.2
Reporter: Anthony Pounds-Cornish
When a Flink application is stopped before a Kinesis connector subtask has been
started, the following exception is thrown:
{noformat}
java.lang.NullPointerException
at
org.apache.flink.streaming.connectors.kinesis.FlinkKinesisConsumer.close(FlinkKinesisConsumer.java:421)
...{noformat}
This appears to be related to the fact that [fetcher
creation|https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumer.java#L307]
may not occur by [the time it is referenced when the consumer is
closed|https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumer.java#L421].
The fix should be to make the {{close()}} method null safe [as it has been in
the {{cancel()}}
method|https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumer.java#L407].
--
This message was sent by Atlassian Jira
(v8.20.10#820010)