Github user fhueske commented on the pull request:

    https://github.com/apache/flink/pull/1903#issuecomment-213399764
  
    Hi @fpompermaier, I thought about this again. I don't think it is a good 
idea to tie `closeInputFormat()` to `configure()` because `configure()` is 
called at different places such as the JobManager and in the optimizer to 
retrieve statistics. Hence, it is not a good idea to open resources in 
`configure()`.
    
    We should rather add a `openInputFormat()` method to `RichInputFormat()` 
which is called directly before `open()`. Would you add such a method and 
remove the unnecessary `closeInputFormat()` calls, and tests that check that 
`openInputFormat()` and `closeInputFormat()` are correctly called in the life 
cycle of a RichInputFormat? 
    
    Sorry for not thinking about this earlier. Thanks, Fabian


---
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