GitHub user tony810430 opened a pull request: https://github.com/apache/flink/pull/3633
[FLINK-5982] [runtime] Refactor AbstractInvokable and StatefulTask This PR wants to merge `AbstractInvokable` and `StatefulTask` to eliminate "lazy initialization" in `Task`. The following are what I did in this PR: 1. Merge `AbstractInvokable` and `StatefulTask` and use constructor to initialize `Environment` and `TaskStateHandles` in `AbstractInvokable`. 2. Update all subclasses and corresponding tests. For now, batch tasks are still not stateful, so I added `IllegalStateException()` in constructor and `UnsupportedOperationException()` in the methods for supporting stateful task. 3. Update the behavior of `AbstractInvokable` in `Task`, including `loadAndInstantiateInvokable()`, `triggerCheckpointBarrier()` and `notifyCheckpointComplete()`. 4. Add tests for modification in `Task` and tests the constructors' behavior for all concrete subclasses which inherit `AbstractInvokable`. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tony810430/flink FLINK-5982 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3633.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3633 ---- commit 31748905eaa3b4897f0b02473526b7fa05c2304e Author: Tony Wei <tony19920...@gmail.com> Date: 2017-03-15T03:13:41Z [FLINK-5982] Refactor AbstractInvokable and StatefulTask ---- --- 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. ---