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.