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

Sunil G commented on YARN-4846:
-------------------------------

{code}
  public TempQueuePerPartition getQueueByPartition(String queueName,
      String partition) {
    Map<String, TempQueuePerPartition> partitionToQueues;
    if (null == (partitionToQueues = queueToPartitions.get(queueName))) {
      return null;
    }
    return partitionToQueues.get(partition);
  }
{code}
{{getQueueByPartition}} can return null by code. But chances of this is very 
unlikely. However I am seeing this error for second time as we are getting a 
NPE in similar code like below.

{code}
      if (context.getQueueByPartition(queueName,
          RMNodeLabelsManager.NO_LABEL).preemptionDisabled) {
{code}

I am not seeing a chance to see {{context}} as null. So a chance is to get 
queueName null.  similar piece of code is present in {{FiFoCandidatesSelector}} 
also. If this is to be handled with a null check, such queues has to be skipped 
for that round of preemption.

> Random failures for 
> TestCapacitySchedulerPreemption#testPreemptionPolicyShouldRespectAlreadyMarkedKillableContainers
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-4846
>                 URL: https://issues.apache.org/jira/browse/YARN-4846
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Bibin A Chundatt
>            Assignee: Bibin A Chundatt
>         Attachments: 0001-YARN-4846.patch
>
>
> {noformat}
> java.lang.AssertionError: expected:<1> but was:<0>
>       at org.junit.Assert.fail(Assert.java:88)
>       at org.junit.Assert.failNotEquals(Assert.java:743)
>       at org.junit.Assert.assertEquals(Assert.java:118)
>       at org.junit.Assert.assertEquals(Assert.java:555)
>       at org.junit.Assert.assertEquals(Assert.java:542)
>       at 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerPreemption.testPreemptionPolicyShouldRespectAlreadyMarkedKillableContainers(TestCapacitySchedulerPreemption.java:473)
> {noformat}
> https://builds.apache.org/job/PreCommit-YARN-Build/10826/testReport/org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity/TestCapacitySchedulerPreemption/testPreemptionPolicyShouldRespectAlreadyMarkedKillableContainers/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to