[ 
https://issues.apache.org/jira/browse/FLINK-4024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15331545#comment-15331545
 ] 

ASF GitHub Bot commented on FLINK-4024:
---------------------------------------

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

    https://github.com/apache/flink/pull/2100#discussion_r67142811
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/ContinuousFileReaderOperator.java
 ---
    @@ -233,10 +236,20 @@ public void run() {
                                while (this.isRunning) {
     
                                        synchronized (checkpointLock) {
    +
    +                                           if (!this.isFormatOpen) {
    +                                                   
this.format.openInputFormat();
    +                                                   this.isFormatOpen = 
true;
    +                                           }
    +
                                                if (this.currentSplit != null) {
     
                                                        if 
(currentSplit.equals(EOS)) {
                                                                isRunning = 
false;
    +                                                           if 
(this.isFormatOpen) {
    --- End diff --
    
    is this necessary? Wouldn't we directly go into the `finally` clause 
because of the `break` where the IF is closed anyway?


> FileSourceFunction not adjusted to new IF lifecycle
> ---------------------------------------------------
>
>                 Key: FLINK-4024
>                 URL: https://issues.apache.org/jira/browse/FLINK-4024
>             Project: Flink
>          Issue Type: Bug
>          Components: Streaming
>    Affects Versions: 1.1.0
>            Reporter: Chesnay Schepler
>            Assignee: Kostas Kloudas
>            Priority: Critical
>             Fix For: 1.1.0
>
>
> The InputFormat lifecycle was extended in 
> ac2137cfa5e63bd4f53a4b7669dc591ab210093f, adding additional 
> open-/closeInputFormat() methods.
> The streaming FileSourceFunction was not adjusted for this change, and thus 
> will fail for every InputFormat that leverages these new methods.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to