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

Clarify testcase documentation for TestServiceAM#testContainersReleasedWhenPreLaunchFails

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • test
    • None
    • Reviewed

    Description

      There's a small comment added to testcase: org.apache.hadoop.yarn.service.TestServiceAM#testContainersReleasedWhenPreLaunchFails:

        // Test to verify that the containers are released and the
        // component instance is added to the pending queue when building the launch
        // context fails.
      

      However, it was not clear for me why the "launch context" would fail.
      While the test passes, it throws an Exception that tells the story.

      2021-07-06 18:31:04,438 ERROR [pool-275-thread-1] containerlaunch.ContainerLaunchService (ContainerLaunchService.java:run(122)) - [COMPINSTANCE compa-0 : container_1625589063422_0001_01_000001]: Failed to launch container.
      java.lang.IllegalArgumentException: Can not create a Path from a null string
      	at org.apache.hadoop.fs.Path.checkPathArg(Path.java:164)
      	at org.apache.hadoop.fs.Path.<init>(Path.java:180)
      	at org.apache.hadoop.yarn.service.provider.tarball.TarballProviderService.processArtifact(TarballProviderService.java:39)
      	at org.apache.hadoop.yarn.service.provider.AbstractProviderService.buildContainerLaunchContext(AbstractProviderService.java:144)
      	at org.apache.hadoop.yarn.service.containerlaunch.ContainerLaunchService$ContainerLauncher.run(ContainerLaunchService.java:107)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

      This exception is thrown because the id of the Artifact object is unset (null) and TarballProviderService.processArtifact verifies it and it does not allow such artifacts.
      The aim of this jira is to add a clarification comment or javadoc to this method.

      Attachments

        1. YARN-10849.001.patch
          2 kB
          Szilard Nemeth
        2. YARN-10849.002.patch
          2 kB
          Szilard Nemeth
        3. YARN-10849.003.patch
          2 kB
          Szilard Nemeth

        Activity

          People

            snemeth Szilard Nemeth
            snemeth Szilard Nemeth
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: