Hi Lijie, Thank you for the response and for supporting the proposal.
Regarding your suggestions: 1. While the getTaskNameWithIndexAndAttemptNumber may seem redundant initially, this concatenated string, for example "MyTask (3/6)#1", serves as an identifier used to denote a specific Task across multiple components including TaskExecutor, Task, ChangelogStateBackend, StreamTask, etc. Hence, offering a dedicated method for this representation is quite practical. WDYT? 2. Good point. I will indicate the replacement methods in the note of deprecated methods to provide clearer guidance. Please let me know if you have any further questions. Best regards, Wencong At 2023-12-12 14:57:53, "Lijie Wang" <wangdachui9...@gmail.com> wrote: >Hi Wencong > >Thanks for driving the discussion, +1 for the proposal. I left two minor >questions/suggestions: > >1. Is the getTaskNameWithIndexAndAttemptNumber method a bit redundant? It >can be replaced by getTaskName + getTaskIndex + getAttemptNumber. >2. I think it would be better if we can explicitly specify the alternative >(based on TaskInfo/JobInfo) for each deprecated method > >Best, >Lijie > >Wencong Liu <liuwencle...@163.com> 于2023年11月30日周四 14:50写道: > >> Hi devs, >> >> I would like to start a discussion on FLIP-382: Unify the Provision >> of Diverse Metadata for Context-like APIs [1]. >> >> In the Flink project, the context-like APIs are interfaces annotated by >> @Public and supply runtime metadata and functionalities to its modules and >> components. RuntimeContext is such an interface with 27 methods for >> accessing metadata and framework functionalities. Currently, any >> addition of metadata requires updating the RuntimeContext interface >> and all 12 of its implementation classes, leading to high code >> maintenance costs. To improve this, we propose to a categorize all >> metadata into some metadata classes and provide it through dedicated >> methods in context-like APIs. The newly provided metadata in context-like >> API will only require to update the metadata classes, not context-like API >> itself or it's implementations. >> >> Looking forward to your feedback. >> >> [1] >> https://cwiki.apache.org/confluence/display/FLINK/FLIP-382%3A+Unify+the+Provision+of+Diverse+Metadata+for+Context-like+APIs >> >> Best regards, >> Wencong Liu