Github user StephanEwen commented on the issue:
https://github.com/apache/flink/pull/3474
@tony810430 That's a good idea, let's have a two argument constructor with
`Environment` and `TaskStateHandles `.
The `AbstractInvokable` and its subclasses are a very low level internal
API. It is okay if we make this a "contract" that they need this constructor -
runtime will fail the task otherwise.
In fact, there are only two main implementations of the
`AbstractInvokable`: ``StreamTask` and `BatchTask`, with some subclasses. That
is okay to manage.
The benefit of having eager initialization of fields and state is much
higher than the burden to add the constructor.
---
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.
---