You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Karthik Kambatla (JIRA)" <ji...@apache.org> on 2017/05/11 00:51:04 UTC

[jira] [Updated] (YARN-6582) FSAppAttempt demand can be updated atomically in updateDemand()

     [ https://issues.apache.org/jira/browse/YARN-6582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karthik Kambatla updated YARN-6582:
-----------------------------------
    Attachment: YARN-6582.001.patch

Uploading patch to improve this:
# Use a new variable tmpDemand to build the value of demand.
# App's schedulerKeys are in a ConcurrentSkipList, so there is no need for a lock.
# Assign tmpDemand to demand in one go. This is safe: a previous access to demand is stale, but that is expected. And, there are no locks held on demand.

> FSAppAttempt demand can be updated atomically in updateDemand()
> ---------------------------------------------------------------
>
>                 Key: YARN-6582
>                 URL: https://issues.apache.org/jira/browse/YARN-6582
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>         Attachments: YARN-6582.001.patch
>
>
> FSAppAttempt#updateDemand first sets demand to 0, and then adds up all the outstanding requests. Instead, we could use another variable tmpDemand to build the new value and atomically replace the demand.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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