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 "Eric Payne (JIRA)" <ji...@apache.org> on 2018/02/19 21:30:04 UTC

[jira] [Comment Edited] (YARN-7947) Capacity Scheduler intra-queue preemption can NPE for non-schedulable apps

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

Eric Payne edited comment on YARN-7947 at 2/19/18 9:29 PM:
-----------------------------------------------------------

YARN-7051 added the following code. Instead of passing {{amUsed}} to the {{TempUserPerPartition}} constructor, it passes the intermediate variable {{userSpecificAmUsed}}, which can sometimes be null.

{{userSpecificAmUsed}} is only null when a user has no schedulable apps but does have non-schedulable apps, such as when the AM limit has been reached, for example. 
{code:title=FifoIntraQueuePreemptionPlugin#createTempAppForResCalculation}
        Resource userSpecificAmUsed = perUserAMUsed.get(userName);
        amUsed = (userSpecificAmUsed == null)
            ? Resources.none() : userSpecificAmUsed;

        TempUserPerPartition tmpUser = new TempUserPerPartition(
            tq.leafQueue.getUser(userName), tq.queueName,
            Resources.clone(userResourceUsage.getUsed(partition)),
            Resources.clone(userSpecificAmUsed),
            Resources.clone(userResourceUsage.getReserved(partition)),
            Resources.none());
{code}


was (Author: eepayne):
YARN-7051 added the following code. Instead of passing {{amUsed}} to the {{TempUserPerPartition}} constructor, it passes the intermediate variable {{userSpecificAmUsed}}, which can sometimes be null.

{{userSpecificAmUsed}} is only null when a user has no schedulable apps but does have non-schedulable apps, such as when the AM limit has been reached, for example. 
{code:title=FifoIntraQueuePreemptionPlugin#getAlreadySelectedPreemptionCandidatesResource}
        Resource userSpecificAmUsed = perUserAMUsed.get(userName);
        amUsed = (userSpecificAmUsed == null)
            ? Resources.none() : userSpecificAmUsed;

        TempUserPerPartition tmpUser = new TempUserPerPartition(
            tq.leafQueue.getUser(userName), tq.queueName,
            Resources.clone(userResourceUsage.getUsed(partition)),
            Resources.clone(userSpecificAmUsed),
            Resources.clone(userResourceUsage.getReserved(partition)),
            Resources.none());
{code}

> Capacity Scheduler intra-queue preemption can NPE for non-schedulable apps
> --------------------------------------------------------------------------
>
>                 Key: YARN-7947
>                 URL: https://issues.apache.org/jira/browse/YARN-7947
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: capacity scheduler, scheduler preemption
>            Reporter: Eric Payne
>            Priority: Major
>
> Intra-queue preemption policy can cause NPE for pending users with no schedulable apps.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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