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