Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3738#discussion_r112302446
  
    --- Diff: 
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/KinesisDataFetcher.java
 ---
    @@ -408,12 +408,15 @@ public void runFetcher() throws Exception {
         */
        public void shutdownFetcher() {
                running = false;
    -           mainThread.interrupt(); // the main thread may be sleeping for 
the discovery interval
    -
    +           if (mainThread != null) {
    +                   mainThread.interrupt(); // the main thread may be 
sleeping for the discovery interval
    +           }
                if (LOG.isInfoEnabled()) {
                        LOG.info("Shutting down the shard consumer threads of 
subtask {} ...", indexOfThisConsumerSubtask);
                }
    -           shardConsumersExecutor.shutdownNow();
    +           if (shardConsumersExecutor != null) {
    --- End diff --
    
    Actually I think this is a redundant `null` check, because 
`shardConsumersExecutor` is final.
    It should never be null, so this null check might actually be confusing to 
other readers.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to