[ https://issues.apache.org/jira/browse/FLINK-17012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17084135#comment-17084135 ]
Wenlong Lyu edited comment on FLINK-17012 at 4/15/20, 2:37 PM: --------------------------------------------------------------- Treating initialization as part of deploying is also a reasonable idea. How about we continue FLINK-4714: add an `initialize()` in AbstractInvokable and call initialize in task before task transfer to running? Currently there are similar functionalities in both StreamTask and BatchTask: StreamTask#beforeInvoke and BatchTask#initialize which is called in invoke(), the different is that; there are some common initialization in BatchTask#invoke instead of BatchTask#initialize. we may need a bit more refactor for BatchTask was (Author: wenlong.lwl): Treating initialization as part of deploying is also a reasonable idea. How about we continue FLINK-1474: add an `initialize()` in AbstractInvokable and call initialize in task before task transfer to running? Currently there are similar functionalities in both StreamTask and BatchTask: StreamTask#beforeInvoke and BatchTask#initialize which is called in invoke(), the different is that; there are some common initialization in BatchTask#invoke instead of BatchTask#initialize. we may need a bit more refactor for BatchTask > Expose stage of task initialization > ----------------------------------- > > Key: FLINK-17012 > URL: https://issues.apache.org/jira/browse/FLINK-17012 > Project: Flink > Issue Type: Improvement > Components: Runtime / Metrics, Runtime / Task > Reporter: Wenlong Lyu > Priority: Major > > Currently a task switches to running before fully initialized, does not take > state initialization and operator initialization(#open ) in to account, which > may take long time to finish. As a result, there would be a weird phenomenon > that all tasks are running but throughput is 0. > I think it could be good if we can expose the initialization stage of tasks. > What to you think? -- This message was sent by Atlassian Jira (v8.3.4#803005)