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

    https://github.com/apache/flink/pull/2174#discussion_r69100533
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/ContinuousFileReaderOperator.java
 ---
    @@ -334,9 +342,11 @@ public void run() {
                                this.pendingSplits.remove();
                        }
     
    -                   if (this.format instanceof CheckpointableInputFormat && 
this.isSplitOpen) {
    -                           S formatState = (S) 
((CheckpointableInputFormat) format).getCurrentState();
    -                           return new Tuple3<>(snapshot, currentSplit, 
currentSplit == null ? null : formatState);
    +                   if (this.format instanceof CheckpointableInputFormat && 
this.currentSplit != null) {
    +                           S formatState = this.isSplitOpen ?
    +                                   (S) ((CheckpointableInputFormat) 
format).getCurrentState() :
    +                                   restoredFormatState;
    +                           return new Tuple3<>(snapshot, currentSplit, 
formatState);
                        } else {
                                LOG.info("The format used is not 
checkpointable. The current input split will be restarted upon recovery.");
    --- End diff --
    
    I think this log message is wrong for `this.currentSplit != null`. It leads 
to pollution of log files.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to