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

Szilard Nemeth commented on YARN-9537:
--------------------------------------

Hi [~cane]!

Just a minor comment: In FSAppAttempt: Maybe don't need to initialize the 
boolean field as: 

{code:java}
 private boolean enableAMPreemption =
          FairSchedulerConfiguration.DEFAULT_AM_PREEMPTION;
{code}

Since in the constructor, you have this code block: 

{code:java}
 if (scheduler.getConf() != null) {
      this.enableAMPreemption = scheduler.getConf()
              .getAMPreemptionEnabled(getQueue().getQueueName());
    }
{code}

[~cane], [~yufeigu]: Can you guys think of any case when scheduler.getConf() is 
null? 
If not, then we can remove the null check and the default value for the 
enableAMPreemption boolean field and rely on the 
value coming from 
{code:java}
scheduler.getConf()
              .getAMPreemptionEnabled(getQueue().getQueueName());
{code}, completely.

Thanks!


> Add configuration to disable AM preemption
> ------------------------------------------
>
>                 Key: YARN-9537
>                 URL: https://issues.apache.org/jira/browse/YARN-9537
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: fairscheduler
>    Affects Versions: 3.2.0, 3.1.2
>            Reporter: zhoukang
>            Assignee: zhoukang
>            Priority: Major
>         Attachments: YARN-9537-002.patch, YARN-9537.001.patch, 
> YARN-9537.003.patch, YARN-9537.004.patch
>
>
> In this issue, i will add a configuration to support disable AM preemption.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
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