Sangjin Lee commented on YARN-3836:

I tend to think that using type + id is probably a slightly better idea. 
Currently the type is between single data vs. time series. For the most part, 
the id should be unique across the board. One interesting scenario is if a 
metric changes from a single data to a time series (or vice versa). Again, this 
is probably not something that should happen often, if ever. But if it should 
happen, I happen to think that they need to be considered two different 
metrics. My 2 cents.

> 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