zhihai xu commented on YARN-3204:

Some comments:
1. about the comment for Inconsistent sync warning fsOpDurations
Inconsistent sync warning - callDurationMetrics is only initialized once and 
never changed
It looks like not accurate. Each method from fsOpDurations is only called in 
one thread, all these methods access different fields and are independent.

2.Can we define reloadListener as volatile?
since reloadListener is accessed by two threads, it will be safer to use 

3.Can we move the check to the beginning of the functions of reserveResource?
It will be better to check error earlier than later to avoid unnecessary 
if (!(application instanceof FSAppAttempt)) {
Can we use YarnRuntimeException instead of IllegalArgumentException?
This looks like an unexpected runtime exception.

4.adding lock for getAllocationConfiguration is dangerous.
A lot of codes(Queue, FairReservationSystem... ) are calling 
getAllocationConfiguration, which can introduce potential deadlock situation 
and performance issue.
For example, QueueManager#getQueue lock queues then call 
QueueManager#createQueue then call scheduler.getAllocationConfiguration.
This will have two layer locks if we add lock in getAllocationConfiguration.
Can we define allocConf as volatile?  since allocConf will only be updated by 
AllocationReloadListener.onReload which is called from 
AllocationFileLoaderService#reloadThread after initialization. 

> Fix new findbug warnings in 
> hadoop-yarn-server-resourcemanager(resourcemanager.scheduler.fair)
> ----------------------------------------------------------------------------------------------
>                 Key: YARN-3204
>                 URL: https://issues.apache.org/jira/browse/YARN-3204
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Brahma Reddy Battula
>            Assignee: Brahma Reddy Battula
>            Priority: Blocker
>         Attachments: YARN-3204-001.patch, YARN-3204-002.patch, 
> YARN-3204-003.patch
> Please check following findbug report..
> https://builds.apache.org/job/PreCommit-YARN-Build/6644//artifact/patchprocess/newPatchFindbugsWarningshadoop-yarn-server-resourcemanager.html

This message was sent by Atlassian JIRA

Reply via email to