Sangjin Lee commented on YARN-3051:

I'd like to discuss {{KeyValuePair}}. We're using {{Set<KeyValuePair>}} for 
config and info. However, in {{TimelineEntity}}, we have 

info: HashMap<String,Object>
config: HashMap<String,String>

Wouldn't it be better to use these types (i.e. maps v. sets) for info and 
config instead of using {{KeyValuePair}}? That would also naturally resolve any 
issues with duplicate keys, etc. The way it stands, since {{KeyValuePair}} does 
not override {{hashCode()}} or {{equals()}}, {{Set<KeyValuePair>}} would allow 
entries with duplicate keys. I just think it'd be better to stick with the same 
types used by {{TimelineEntity}}.

BTW, we also noticed that neither {{TimelineEntity}} nor 
{{TimelineEntity.Identifier}} implements {{equals()}} or {{hashCode()}}. This 
will be problematic whenever we put them in a collection such as a set. We 
should define the equality semantics on them and add those methods for them to 
be used safely in a set or in a map as keys. I'll probably file a separate JIRA 
on this point. Thoughts?

> [Storage abstraction] Create backing storage read interface for ATS readers
> ---------------------------------------------------------------------------
>                 Key: YARN-3051
>                 URL: https://issues.apache.org/jira/browse/YARN-3051
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>    Affects Versions: YARN-2928
>            Reporter: Sangjin Lee
>            Assignee: Varun Saxena
>         Attachments: YARN-3051-YARN-2928.003.patch, 
> YARN-3051-YARN-2928.03.patch, YARN-3051-YARN-2928.04.patch, 
> YARN-3051.Reader_API.patch, YARN-3051.Reader_API_1.patch, 
> YARN-3051.Reader_API_2.patch, YARN-3051.Reader_API_3.patch, 
> YARN-3051.wip.02.YARN-2928.patch, YARN-3051.wip.patch, YARN-3051_temp.patch
> Per design in YARN-2928, create backing storage read interface that can be 
> implemented by multiple backing storage implementations.

This message was sent by Atlassian JIRA

Reply via email to