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

Yufei Gu commented on YARN-7513:
--------------------------------

By looking at the callers of {{getWeight()}}, they are in sorting schedulable 
and computing fair share, both require queue lock. The demand update also 
requires queue lock. In that sense, it is safe to remove the lock. Even for the 
new callers in the future, we mighty need lock of {{FSAppAttempt}} instead of 
the lock of {{FairScheduler}}.  
So, +1. 

> FindBugs in FSAppAttempt.getWeight()
> ------------------------------------
>
>                 Key: YARN-7513
>                 URL: https://issues.apache.org/jira/browse/YARN-7513
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: fairscheduler
>    Affects Versions: 3.1.0
>            Reporter: Wilfred Spiegelenburg
>            Assignee: Wilfred Spiegelenburg
>            Priority: Minor
>         Attachments: YARN-7513.001.patch
>
>
> With the change from YARN-7414 a new FindBugs warning was introduced.
> The code that was moved from the FairScheduler to the FSAppAttempt can also 
> be simplified by removing the unneeded locking.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to