[ 
https://issues.apache.org/jira/browse/YARN-5101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15287206#comment-15287206
 ] 

Sunil G commented on YARN-5101:
-------------------------------

HI [~xgong]
pls correct me if I am wrong. 
{code}
} else if (event.getEventType().equals(
            ApplicationMetricsConstants.UPDATED_EVENT_TYPE)) {
          Map<String, Object> eventInfo = event.getEventInfo();
          if (eventInfo == null) {
            continue;
          }
          applicationPriority = Integer
              .parseInt(eventInfo.get(
                  ApplicationMetricsConstants.APPLICATION_PRIORITY_INFO)
                  .toString());
          queue = eventInfo.get(ApplicationMetricsConstants.QUEUE_ENTITY_INFO)
              .toString();
}
{code}

>From {{UPDATED_EVENT_TYPE}}, we were only fetching {{applicationPriority}} and 
>{{queueName}}. And the assumption was that we were fetching the 
>LAST_EVENT_ONLY event. Had few discussions on this earlier 
>[link|https://issues.apache.org/jira/browse/YARN-4044?focusedCommentId=14728938&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14728938].
> As per current code, we will consider all events as sorted in timestamp 
>order. And I agree that this will cause last changed event to overwrite with 
>old value.

So we can look in to that last updated time for event, and then skip until we 
update for last event. This seems a viable option, and if no objections, I can 
help to share a patch. [~xgong]/[~rohithsharma] Thoughts?



> YARN_APPLICATION_UPDATED event is parsed in 
> ApplicationHistoryManagerOnTimelineStore#convertToApplicationReport with 
> reversed order
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-5101
>                 URL: https://issues.apache.org/jira/browse/YARN-5101
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 2.8.0
>            Reporter: Xuan Gong
>
> Right now, the application events are parsed in in 
> ApplicationHistoryManagerOnTimelineStore#convertToApplicationReport with 
> timestamp descending order, which means the later events would be parsed 
> first, and the previous same type of events would override the information. In
> https://issues.apache.org/jira/browse/YARN-4044, we have introduced 
> YARN_APPLICATION_UPDATED events which might be submitted by RM multiple times 
> in one application life cycle. This could cause problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to