Hi Weihua,

Thanks for the suggestion on keeping the host field. However, I think the 
location field can serve the needs for finding host-aggregative tasks as well 
and I'm not sure if a separate host field is still needed. The fields in REST 
API are mainly used under two scenarios, UI & code processing using the REST 
API:

  1.  For direct use on UI. One can find host-aggregative tasks by sorting on 
the location field as well, tasks on the same tasks will be placed close to 
each other after sorting.
  2.  For code processing using the REST API, it is easy to extract the host 
info by simple parsing of the location field as well.

Looking forward to hearing other's thoughts on this well.

Finally, even if the consensus is that the host field is still needed, since 
the semantics of the host field is inconsistent at this point, we'll still 
leave the field as it is for now and change it to contain host info only in the 
next major version only.

Best,
Zhanghao Chen
________________________________
发件人: Weihua Hu <huweihua....@gmail.com>
发送时间: 2023年9月11日 11:08
收件人: dev@flink.apache.org <dev@flink.apache.org>
抄送: ches...@apache.org <ches...@apache.org>
主题: Re: [DISCUSS] FLIP-363: Unify the Representation of TaskManager Location in 
REST API and Web UI

Hi, Zhanghao

Thanks for bringing this proposal.

I have a concern:

I prefer to keep the "host" field and add a "location" field in future
versions.
Consider a scenario where a machine (host) with multiple TaskManagers has
poor processing performance due to some problems.
By using a host field aggregation, I can identify the problems with this
machine and take it offline.

Best,
Weihua


On Mon, Sep 11, 2023 at 10:34 AM Chen Zhanghao <zhanghao.c...@outlook.com>
wrote:

> Hi Shammon,
>
> I think all REST API response messages (e.g.
> SubtaskExecutionAttemptDetailsInfo) should be considered as part of the
> public APIs and therefore be marked as @Public. It is true though none of
> them are marked as @public yet. Maybe we should do that. ccing
> @chesnay<mailto:ches...@apache.org> for confirmation.
>
> Best,
> Zhanghao Chen
> ________________________________
> 发件人: Shammon FY <zjur...@gmail.com>
> 发送时间: 2023年9月11日 10:22
> 收件人: dev@flink.apache.org <dev@flink.apache.org>
> 主题: Re: [DISCUSS] FLIP-363: Unify the Representation of TaskManager
> Location in REST API and Web UI
>
> Thanks Zhanghao for initialing this discussion, I have just one comment:
>
> I checked the classes `SubtasksAllAccumulatorsHandler`,
> `SubtasksTimesHandler`, `SubtaskCurrentAttemptDetailsHandler`,
> `JobVertexTaskManagersHandler` and `JobExceptionsHandler` you mentioned in
> `Public Interfaces` and they are not annotated as `Public`. So do you want
> to annotate them as `Plublic`? If not, I think you may need to move them
> from `Public Interfaces` to `Proposed Changes`.
>
> Best,
> Shammon FY
>
> On Sat, Sep 9, 2023 at 12:11 PM Chen Zhanghao <zhanghao.c...@outlook.com>
> wrote:
>
> > Hi Devs,
> >
> > I would like to start a discussion on FLIP-363: Unify the Representation
> > of TaskManager Location in REST API and Web UI [1].
> >
> > The TaskManager location of subtasks is important for identifying
> > TM-related problems. There are a number of places in REST API and Web UI
> > where TaskManager location is returned/displayed.
> >
> > Problems:
> >
> >   *   Only hostname is provided to represent TaskManager location in some
> > places (e.g. SubtaskCurrentAttemptDetailsHandler). However, in a
> > containerized era, it is common to have multiple TMs on the same host,
> and
> > port info is crucial to distinguish different TMs.
> >   *   Inconsistent naming of the field to represent TaskManager location:
> > "host" is used in most places but "location" is also used in
> > JobExceptions-related places.
> >   *   Inconsistent semantics of the "host" field: The semantics of the
> > host field are inconsistent, sometimes it denotes hostname only while in
> > other times it denotes hostname + port (which is also inconsistent with
> the
> > name of "host").
> >
> > We propose to improve the current situation by:
> >
> >   *   Use a field named "location" that represents TaskManager location
> in
> > the form of "${hostname}:${port}" in a consistent manner across REST APIs
> > and the front-end.
> >   *   Rename the column name from "Host" to "Location" on the Web UI to
> > reflect the change that both hostname and port are displayed.
> >   *   Keep the old "host" fields untouched for compatibility. They can be
> > removed in the next major version.
> >
> > Looking forward to your feedback.
> >
> > [1] FLIP-363: Unify the Representation of TaskManager Location in REST
> API
> > and Web UI - Apache Flink - Apache Software Foundation<
> >
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-363%3A+Unify+the+Representation+of+TaskManager+Location+in+REST+API+and+Web+UI
> > >
> >
> > Best,
> > Zhanghao Chen
> >
>

Reply via email to