p-szucs commented on code in PR #7222:
URL: https://github.com/apache/hadoop/pull/7222#discussion_r1890069838
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/resources/ResourceHandlerModule.java:
##########
@@ -76,10 +76,10 @@ public class ResourceHandlerModule {
private static volatile CpuResourceHandler
cGroupsCpuResourceHandler;
- private static void initializeCGroupHandlers(Configuration conf)
- throws ResourceHandlerException {
+ private static void initializeCGroupHandlers(Configuration conf,
+ CGroupsHandler.CGroupController controller) throws
ResourceHandlerException {
initializeCGroupV1Handler(conf);
- if (cgroupsV2Enabled) {
+ if (cgroupsV2Enabled && !isMountedInCGroupsV1(controller)) {
initializeCGroupV2Handler(conf);
Review Comment:
Thanks for the review @brumi1024! With the current logic we use the v1
handler to get the v1 controller paths and init v2 handler only if the given
controller is not mounted in v1. But with a pure v2 setup I don't think we will
use v1 handler after that check, there may be a cleaner way to determine this.
It's not the clean v2 setup, but with the resource plugins we still use only
the v1 handler in [this](https://github.com/apache/hadoop/pull/7222) codepart,
so probably additional checks would be needed there as well if we decide not to
init the v1 handler.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]