[ https://issues.apache.org/jira/browse/FLINK-13754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
zhijiang updated FLINK-13754: ----------------------------- Description: The current OperatorChain is heavy-weight to take some unrelated roles like StreamStatusMaintainer. If other components only rely on the StreamStatusMaintainer, we have to pass the whole OperatorChain. From the design aspect of single function, we need to decouple The solution is to refactor the creation of StreamStatusMaintainer and RecordWriterOutput in StreamTask level, and then break the implementation cycle dependency between them. The array of RecordWriters which has close relationship with RecordWriterOutput is created in StreamTask, so it is reasonable to create them together. The created StreamStatusMaintainer in StreamTask can be directly referenced by subclasses like OneInputStreamTask/TwoInputStreamTask. was: There are two motivations for this refactoring: * It is the precondition for the following work of decoupling the dependency between two inputs status in ForwardingValveOutputHandler. * From the aspect of design rule, the current OperatorChain takes many unrelated roles like StreamStatusMaintainer to make it unmaintainable. The root reason for this case is from the cycle dependency between RecordWriterOutput (created by OperatorChain) and StreamStatusMaintainer. The solution is to refactor the creation of StreamStatusMaintainer and RecordWriterOutput in StreamTask level, and then break the implementation cycle dependency between them. The array of RecordWriters which has close relationship with RecordWriterOutput is created in StreamTask, so it is reasonable to create them together. The created StreamStatusMaintainer in StreamTask can be directly referenced by subclasses like OneInputStreamTask/TwoInputStreamTask. > Decouple OperatorChain from StreamStatusMaintainer > -------------------------------------------------- > > Key: FLINK-13754 > URL: https://issues.apache.org/jira/browse/FLINK-13754 > Project: Flink > Issue Type: Sub-task > Components: Runtime / Task > Reporter: zhijiang > Assignee: zhijiang > Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > The current OperatorChain is heavy-weight to take some unrelated roles like > StreamStatusMaintainer. If other components only rely on the > StreamStatusMaintainer, we have to pass the whole OperatorChain. From the > design aspect of single function, we need to decouple > The solution is to refactor the creation of StreamStatusMaintainer and > RecordWriterOutput in StreamTask level, and then break the implementation > cycle dependency between them. The array of RecordWriters which has close > relationship with RecordWriterOutput is created in StreamTask, so it is > reasonable to create them together. The created StreamStatusMaintainer in > StreamTask can be directly referenced by subclasses like > OneInputStreamTask/TwoInputStreamTask. -- This message was sent by Atlassian Jira (v8.3.2#803003)