Li Lu commented on YARN-3836:

bq. Regarding metric, can't id uniquely identify a metric ? Do we expect two 
metrics to share same id for different types ?
This is a tricky point. and I'm thinking out loud... Under normal circumstances 
it's fine to only check the id of metrics. However, since we're making 
different assumptions on the internal data of different types, is it possible 
that under some use cases users may mistakenly or accidentally confuse them? If 
this is possible we may want to check both types and ids. 

> add equals and hashCode to TimelineEntity and other classes in the data model
> -----------------------------------------------------------------------------
>                 Key: YARN-3836
>                 URL: https://issues.apache.org/jira/browse/YARN-3836
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>    Affects Versions: YARN-2928
>            Reporter: Sangjin Lee
>            Assignee: Li Lu
>         Attachments: YARN-3836-YARN-2928.001.patch, 
> YARN-3836-YARN-2928.002.patch
> Classes in the data model API (e.g. {{TimelineEntity}}, 
> {{TimelineEntity.Identifer}}, etc.) do not override {{equals()}} or 
> {{hashCode()}}. This can cause problems when these objects are used in a 
> collection such as a {{HashSet}}. We should implement these methods wherever 
> appropriate.

This message was sent by Atlassian JIRA

Reply via email to