Github user StephanEwen commented on the issue:

    https://github.com/apache/flink/pull/3474
  
    I would suggest to do the change differently. Right now, all the task logic 
is pretty complex as it is, and this makes it even more complex.
    
    My suggestion would be to
      1. Change the `AbstractInvokable` to not have a zero-argument 
constructor, but only one which takes an `Environment`
      2. Change the creation of the invokables to call that constructor, update 
all the tests
      3. Change the `StreamTask` to do its initialization of everything in the 
constructor. That way, we also avoid all the `NullPointerException`
    
    That way, transitioning to `RUNNING` just before calling `invoke()` will 
fix the issue.
    
    If you want to follow up on this, I would suggest to make individual pull 
requests for (1,2) and (3)


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