[
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: [email protected]
For additional commands, e-mail: [email protected]