Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-7689

TestRMContainerAllocator fails after YARN-6124

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.0
    • 3.1.0
    • scheduler
    • None
    • Reviewed

    Description

      After the change that was made for YARN-6124 multiple tests in the TestRMContainerAllocator from MapReduce fail with the following NPE:

      java.lang.NullPointerException
      	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler.reinitialize(AbstractYarnScheduler.java:1437)
      	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler.reinitialize(FifoScheduler.java:320)
      	at org.apache.hadoop.mapreduce.v2.app.rm.TestRMContainerAllocator$ExcessReduceContainerAllocateScheduler.<init>(TestRMContainerAllocator.java:1808)
      	at org.apache.hadoop.mapreduce.v2.app.rm.TestRMContainerAllocator$MyResourceManager2.createScheduler(TestRMContainerAllocator.java:970)
      	at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$RMActiveServices.serviceInit(ResourceManager.java:659)
      	at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
      	at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.createAndInitActiveServices(ResourceManager.java:1133)
      	at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceInit(ResourceManager.java:316)
      	at org.apache.hadoop.yarn.server.resourcemanager.MockRM.serviceInit(MockRM.java:1334)
      	at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
      	at org.apache.hadoop.yarn.server.resourcemanager.MockRM.<init>(MockRM.java:162)
      	at org.apache.hadoop.yarn.server.resourcemanager.MockRM.<init>(MockRM.java:141)
      	at org.apache.hadoop.yarn.server.resourcemanager.MockRM.<init>(MockRM.java:137)
      	at org.apache.hadoop.mapreduce.v2.app.rm.TestRMContainerAllocator$MyResourceManager.<init>(TestRMContainerAllocator.java:928)
      

      In the test we just call reinitiaize on a scheduler and never call init.
      The stop of the service is guarded and so should the start and the re-init.

      Attachments

        1. YARN-7689.002.patch
          6 kB
          wilfreds#1
        2. YARN-7689.001.patch
          2 kB
          wilfreds#1

        Issue Links

          Activity

            People

              wilfreds Wilfred Spiegelenburg
              wilfreds Wilfred Spiegelenburg
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: