Skip to content

Conversation

afchung
Copy link
Contributor

@afchung afchung commented Dec 9, 2021

Description of PR

  • Adds queueing policies BY_RESOURCES and BY_QUEUE_LEN at the NM
  • If BY_RESOURCES is specified, the NM will queue as long as it has
    enough resources to run all pending + running containers, otherwise, it
    will reject the OPPORTUNISTIC container
  • If BY_QUEUE_LEN is specified, the NM will only accept as many
    containers as its queue capacity is configured
  • Restructure TestContainerSchedulerQueueing to accommodate different
    queueing policies at the NM

How was this patch tested?

  • Unit tests
  • Deployment to a production cluster of 300+ nodes and observed the expected behavior via logs for each setting of both NM queueing policies: For BY_QUEUE_LEN, the behavior is the same as before and for BY_RESOURCES, we observe that the NM does not accept more containers than its resources can handle

* Adds queueing policies `BY_RESOURCES` and `BY_QUEUE_LEN` at the NM
* If `BY_RESOURCES` is specified, the NM will queue as long as it has
enough resources to run all pending + running containers, otherwise, it
will reject the OPPORTUNISTIC container
* If BY_QUEUE_LEN is specified, the NM will only accept as many
containers as its queue capacity is configured
* Restructure `TestContainerSchedulerQueueing` to accommodate different
queueing policies at the NM
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 15s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 4 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 13m 30s Maven dependency ordering for branch
+1 💚 mvninstall 27m 24s trunk passed
+1 💚 compile 13m 6s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 compile 10m 7s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 checkstyle 1m 46s trunk passed
+1 💚 mvnsite 3m 9s trunk passed
+1 💚 javadoc 2m 51s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 2m 41s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 spotbugs 5m 56s trunk passed
+1 💚 shadedclient 26m 54s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 26s Maven dependency ordering for patch
+1 💚 mvninstall 2m 9s the patch passed
+1 💚 compile 11m 39s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javac 11m 39s the patch passed
+1 💚 compile 10m 42s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 javac 10m 42s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 1m 47s /results-checkstyle-hadoop-yarn-project_hadoop-yarn.txt hadoop-yarn-project/hadoop-yarn: The patch generated 7 new + 193 unchanged - 1 fixed = 200 total (was 194)
+1 💚 mvnsite 2m 52s the patch passed
+1 💚 xml 0m 2s The patch has no ill-formed XML file.
+1 💚 javadoc 2m 37s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 2m 27s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 spotbugs 6m 17s the patch passed
+1 💚 shadedclient 26m 8s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 1m 3s hadoop-yarn-api in the patch passed.
+1 💚 unit 4m 54s hadoop-yarn-common in the patch passed.
+1 💚 unit 23m 36s hadoop-yarn-server-nodemanager in the patch passed.
+1 💚 asflicense 0m 45s The patch does not generate ASF License warnings.
208m 10s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/1/artifact/out/Dockerfile
GITHUB PR #3779
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell xml
uname Linux 7fab8b659e8d 4.15.0-163-generic #171-Ubuntu SMP Fri Nov 5 11:55:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 313d43b
Default Java Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/1/testReport/
Max. process+thread count 578 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

queuePolicy = YarnConfiguration
.DEFAULT_NM_OPPORTUNISTIC_CONTAINERS_QUEUE_POLICY;
} else {
queuePolicy = context.getConf().get(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Configuration#getEnum() could be an option

(int) (pMemBytes >> 20) >
(int) (getContainersMonitor()
.getPmemAllocatedForContainers() >> 20)) {
(int) convertBytesToMB(pMemBytes) >
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to cast?


@Override
public void preTransition(ContainerImpl op,
org.apache.hadoop.yarn.server.nodemanager.containermanager.container.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didnt you import this? ContainerState should be correct.

}

private static boolean isSuccessfulRun(final ContainerStatus containerStatus) {
return containerStatus.getContainerSubState() == ContainerSubState.RUNNING
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we split this?
if (containerStatus.getContainerSubState() == ContainerSubState.RUNNING) {
return true;
}
...


// Wait for the OContainer to get killed
BaseContainerManagerTest.waitForNMContainerState(containerManager,
createContainerId(1), ContainerState.DONE,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single line instead of dropping the 40

@afchung
Copy link
Contributor Author

afchung commented Dec 13, 2021

@goiri thanks for the review! I've updated the PR to address your comments, please have another look.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 12s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 4 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 46m 29s Maven dependency ordering for branch
+1 💚 mvninstall 30m 55s trunk passed
+1 💚 compile 12m 53s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 compile 9m 31s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 checkstyle 1m 42s trunk passed
+1 💚 mvnsite 2m 37s trunk passed
+1 💚 javadoc 2m 23s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 2m 11s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 spotbugs 5m 22s trunk passed
+1 💚 shadedclient 24m 8s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 22s Maven dependency ordering for patch
+1 💚 mvninstall 1m 55s the patch passed
+1 💚 compile 9m 50s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javac 9m 50s the patch passed
+1 💚 compile 8m 40s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 javac 8m 40s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 1m 34s /results-checkstyle-hadoop-yarn-project_hadoop-yarn.txt hadoop-yarn-project/hadoop-yarn: The patch generated 7 new + 193 unchanged - 1 fixed = 200 total (was 194)
+1 💚 mvnsite 2m 25s the patch passed
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 javadoc 2m 10s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 2m 2s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 spotbugs 5m 45s the patch passed
+1 💚 shadedclient 24m 16s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 1m 0s hadoop-yarn-api in the patch passed.
+1 💚 unit 4m 40s hadoop-yarn-common in the patch passed.
+1 💚 unit 24m 57s hadoop-yarn-server-nodemanager in the patch passed.
+1 💚 asflicense 0m 45s The patch does not generate ASF License warnings.
231m 26s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/2/artifact/out/Dockerfile
GITHUB PR #3779
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell xml
uname Linux cbfe8da26d26 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 12ab649
Default Java Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/2/testReport/
Max. process+thread count 523 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

@aajisaka aajisaka changed the title Decouple queue capacity with ability to run OPPORTUNISTIC container YARN-11015. Decouple queue capacity with ability to run OPPORTUNISTIC container Dec 23, 2021
}

private static OpportunisticContainersQueuePolicy
getOppContainersQueuePolicyFromConf(final Context context) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getOppContainersQueuePolicyFromConf(final Context context) {: 'getOppContainersQueuePolicyFromConf' has incorrect indentation level 2, expected level should be 6. [Indentation]


// Wait for the OContainer to get killed
BaseContainerManagerTest.waitForNMContainerState(containerManager,
createContainerId(1), ContainerState.DONE,40);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createContainerId(1), ContainerState.DONE,40);:50: ',' is not followed by whitespace. [WhitespaceAfter]

@afchung
Copy link
Contributor Author

afchung commented Jan 6, 2022

@goiri updated to fix the checkstyle violations, thanks for the review!

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 57s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 4 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 12m 36s Maven dependency ordering for branch
+1 💚 mvninstall 24m 28s trunk passed
+1 💚 compile 10m 31s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 compile 8m 36s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 checkstyle 1m 41s trunk passed
+1 💚 mvnsite 2m 38s trunk passed
+1 💚 javadoc 2m 23s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 2m 13s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 spotbugs 5m 22s trunk passed
+1 💚 shadedclient 24m 7s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 23s Maven dependency ordering for patch
+1 💚 mvninstall 1m 53s the patch passed
+1 💚 compile 9m 43s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javac 9m 43s the patch passed
+1 💚 compile 8m 38s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 javac 8m 38s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 37s hadoop-yarn-project/hadoop-yarn: The patch generated 0 new + 193 unchanged - 1 fixed = 193 total (was 194)
+1 💚 mvnsite 2m 25s the patch passed
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 javadoc 2m 12s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 2m 1s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 spotbugs 5m 44s the patch passed
+1 💚 shadedclient 24m 4s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 1m 1s hadoop-yarn-api in the patch passed.
+1 💚 unit 4m 42s hadoop-yarn-common in the patch passed.
+1 💚 unit 23m 16s hadoop-yarn-server-nodemanager in the patch passed.
+1 💚 asflicense 0m 45s The patch does not generate ASF License warnings.
185m 30s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/3/artifact/out/Dockerfile
GITHUB PR #3779
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell xml
uname Linux 493f3188be00 4.15.0-142-generic #146-Ubuntu SMP Tue Apr 13 01:11:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 262330e
Default Java Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/3/testReport/
Max. process+thread count 578 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/3/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

Copy link
Member

@GauthamBanasandra GauthamBanasandra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afchung could you please provide details on the testing that was done apart from the unit tests? It would be great if you could add the details to the How was this patch tested section in description of this PR.

@afchung
Copy link
Contributor Author

afchung commented Jan 8, 2022

@GauthamBanasandra thanks for taking a look! In addition to unit tests, we also deployed the change to a production cluster. I've added more details on what we observed in our deployment to the description of the PR. Thanks!

@GauthamBanasandra
Copy link
Member

Thanks @afchung. Please allow me 2-3 days for reviewing this PR.

*/
BY_QUEUE_LEN,
/**
* Determines wheether or not to run a container based on the amount of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo "wheether"

if (subState == ContainerSubState.DONE) {
return state ==
org.apache.hadoop.yarn.api.records.ContainerState.COMPLETE;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The if check here is redundant, since the condition is already satisfied by switch-case. You can just have

case DONE:
  return state == org.apache.hadoop.yarn.api.records.ContainerState.COMPLETE;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily, the subState can be COMPLETING, in which case we should not check state == org.apache.hadoop.yarn.api.records.ContainerState.COMPLETE

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks for clarifying. It seems a bit convoluted at first 😅. How about this?

case RUNNING:
case COMPLETING:
  return true;
case DONE:
  return state == org.apache.hadoop.yarn.api.records.ContainerState.COMPLETE;
default:
  return false;

@Test
public void testOpportunisticRunsWhenResourcesAvailable() throws Exception {
containerManager.start();
List<StartContainerRequest> list = new ArrayList<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename the variable with a more specific one. The name list is quite generic.


/**
* Tests that newly arrived containers after the resources are filled up
* get killed and never get killed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please the part get killed and never get killed a little more?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this was a typo.

@Test
public void testKillOpportunisticWhenNoResourcesAvailable() throws Exception {
containerManager.start();
List<StartContainerRequest> list = new ArrayList<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a more specific variable name here.

*/
@Test
public void testOpportunisticRunsWhenResourcesAvailable() throws Exception {
containerManager.start();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is repeated in both the tests and can be moved to @before (the test setup method in junit).

@afchung
Copy link
Contributor Author

afchung commented Jan 12, 2022

@GauthamBanasandra thanks for the review! I've updated the PR to address your comments, please have another pass.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 51s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 4 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 13m 43s Maven dependency ordering for branch
+1 💚 mvninstall 22m 30s trunk passed
+1 💚 compile 9m 47s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 compile 9m 42s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 checkstyle 1m 52s trunk passed
+1 💚 mvnsite 3m 10s trunk passed
+1 💚 javadoc 2m 35s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 2m 35s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 5m 38s trunk passed
+1 💚 shadedclient 21m 29s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 31s Maven dependency ordering for patch
+1 💚 mvninstall 1m 59s the patch passed
+1 💚 compile 9m 1s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javac 9m 1s the patch passed
+1 💚 compile 8m 21s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 8m 21s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 39s hadoop-yarn-project/hadoop-yarn: The patch generated 0 new + 193 unchanged - 1 fixed = 193 total (was 194)
+1 💚 mvnsite 2m 46s the patch passed
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 javadoc 2m 32s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 2m 26s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 5m 51s the patch passed
+1 💚 shadedclient 21m 14s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 1m 8s hadoop-yarn-api in the patch passed.
+1 💚 unit 5m 0s hadoop-yarn-common in the patch passed.
+1 💚 unit 23m 48s hadoop-yarn-server-nodemanager in the patch passed.
+1 💚 asflicense 0m 54s The patch does not generate ASF License warnings.
183m 35s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/4/artifact/out/Dockerfile
GITHUB PR #3779
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell xml
uname Linux 11a13776f985 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / f7625e8
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/4/testReport/
Max. process+thread count 543 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/4/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

return this.utilizationTracker.hasResourcesAvailable(container);
}

private boolean resourceAvailableToQueueOppContainer(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, we are doing this check after localization is done. Shouldn't this check be done at the time of container start to avoid wasting NM resources.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC I didn't do that since it's much more complicated and requires the ContainerScheduler to expose internal state.
Could you point me to where this can be done cleanly?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked code and looks like it is same case with existing code also. I think there is scope of improvement there and that can be handle as separate jira. @goiri what do you think ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this JIRA we can leave it as is for consistency with the rest.
We can open a JIRA to move it everywhere (it might have side effects).

@afchung
Copy link
Contributor Author

afchung commented Jan 13, 2022

@minni31 thanks for the review! Have replied to your comments, please have a look.

if (subState == ContainerSubState.DONE) {
return state ==
org.apache.hadoop.yarn.api.records.ContainerState.COMPLETE;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks for clarifying. It seems a bit convoluted at first 😅. How about this?

case RUNNING:
case COMPLETING:
  return true;
case DONE:
  return state == org.apache.hadoop.yarn.api.records.ContainerState.COMPLETE;
default:
  return false;

@afchung
Copy link
Contributor Author

afchung commented Jan 18, 2022

@GauthamBanasandra have updated the PR to address your latest comments. Please have a look.
Also, it looks like the build is failed with an unrelated error, would you or @goiri happen to know what's causing the error or how to fix the build? Thanks!

@GauthamBanasandra
Copy link
Member

@afchung I think the build failure is temporary and unrelated. I've retriggered the CI run now.

@GauthamBanasandra
Copy link
Member

It has got past the failed stage now.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 0s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 4 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 38m 17s Maven dependency ordering for branch
+1 💚 mvninstall 24m 53s trunk passed
+1 💚 compile 10m 43s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 compile 9m 37s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 checkstyle 1m 43s trunk passed
+1 💚 mvnsite 2m 39s trunk passed
+1 💚 javadoc 2m 24s trunk passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 2m 14s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 6m 17s trunk passed
+1 💚 shadedclient 25m 14s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 27s Maven dependency ordering for patch
+1 💚 mvninstall 2m 34s the patch passed
+1 💚 compile 12m 4s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javac 12m 4s the patch passed
+1 💚 compile 9m 38s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 9m 38s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 59s hadoop-yarn-project/hadoop-yarn: The patch generated 0 new + 193 unchanged - 1 fixed = 193 total (was 194)
+1 💚 mvnsite 3m 14s the patch passed
+1 💚 xml 0m 2s The patch has no ill-formed XML file.
+1 💚 javadoc 2m 47s the patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚 javadoc 2m 16s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 spotbugs 7m 16s the patch passed
+1 💚 shadedclient 28m 26s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 1m 23s hadoop-yarn-api in the patch passed.
+1 💚 unit 5m 8s hadoop-yarn-common in the patch passed.
+1 💚 unit 23m 44s hadoop-yarn-server-nodemanager in the patch passed.
+1 💚 asflicense 0m 48s The patch does not generate ASF License warnings.
227m 59s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/7/artifact/out/Dockerfile
GITHUB PR #3779
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell xml
uname Linux 2313c44ac0f5 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / e57d5c9
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/7/testReport/
Max. process+thread count 596 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3779/7/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

@GauthamBanasandra
Copy link
Member

@afchung the code looks fine by me. I'll wait for @minni31 to approve this PR before we merge this.

return this.utilizationTracker.hasResourcesAvailable(container);
}

private boolean resourceAvailableToQueueOppContainer(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this JIRA we can leave it as is for consistency with the rest.
We can open a JIRA to move it everywhere (it might have side effects).

@goiri goiri merged commit 3ed3c74 into apache:trunk Jan 24, 2022
HarshitGupta11 pushed a commit to HarshitGupta11/hadoop that referenced this pull request Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants