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

Xuan Gong commented on YARN-3545:
---------------------------------

[~gtCarrera9], Thanks for the patch. I have a question about the patch. I am 
not sure why we need this check
{code}
        TimelineCollector prevCollectorInTable =
                    collectors.putIfAbsent(appId, collector);
                // if a previous (as in synchronization order) collector 
exists, we
                // should shut down the newly created collector since it will 
not be
                // published.
                if (prevCollectorInTable != null) {
                  collector.stop();
                  collectorInTable = prevCollectorInTable;
                  initializationBarrier(collectorInTable);
                } else {
{code} ?

I think that the question is whether it is possible that we will have multiple 
threads to call putIfAbsent at the same time? 
Looks like it will be only called if the container is AM.

> Investigate the concurrency issue with the map of timeline collector
> --------------------------------------------------------------------
>
>                 Key: YARN-3545
>                 URL: https://issues.apache.org/jira/browse/YARN-3545
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Zhijie Shen
>            Assignee: Li Lu
>         Attachments: YARN-3545-YARN-2928.000.patch
>
>
> See the discussion in YARN-3390 for details. Let's continue the discussion 
> here.



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

Reply via email to