diff --git a/nixos/modules/services/cluster/hadoop/yarn.nix b/nixos/modules/services/cluster/hadoop/yarn.nix index cae6d9c1ad4f..2072171262bb 100644 --- a/nixos/modules/services/cluster/hadoop/yarn.nix +++ b/nixos/modules/services/cluster/hadoop/yarn.nix @@ -196,14 +196,18 @@ in "yarn.nodemanager.resource.cpu-vcores" = resource.cpuVCores; "yarn.nodemanager.resource.memory-mb" = resource.memoryMB; }) - (lib.mkIf useCGroups { + (lib.mkIf useCGroups ( lib.warnIf (lib.versionOlder cfg.package.version "3.5.0") '' + hadoop < 3.5.0 does not support cgroup v2 + setting `services.hadoop.yarn.nodemanager.useCGroups = false` is recommended + see: https://issues.apache.org/jira/browse/YARN-11669 + '' { "yarn.nodemanager.linux-container-executor.cgroups.hierarchy" = "/hadoop-yarn"; "yarn.nodemanager.linux-container-executor.resources-handler.class" = "org.apache.hadoop.yarn.server.nodemanager.util.CgroupsLCEResourcesHandler"; "yarn.nodemanager.linux-container-executor.cgroups.mount" = "true"; "yarn.nodemanager.linux-container-executor.cgroups.mount-path" = "/run/wrappers/yarn-nodemanager/cgroup"; - }) + })) ]; networking.firewall.allowedTCPPortRanges = [ diff --git a/nixos/tests/hadoop/hadoop.nix b/nixos/tests/hadoop/hadoop.nix index e4db1953d369..3f2b41bbd2c8 100644 --- a/nixos/tests/hadoop/hadoop.nix +++ b/nixos/tests/hadoop/hadoop.nix @@ -173,6 +173,7 @@ import ../make-test-python.nix ( yarn.nodemanager = { enable = true; openFirewall = true; + useCGroups = false; }; }; }; diff --git a/nixos/tests/hadoop/yarn.nix b/nixos/tests/hadoop/yarn.nix index c1a03e7ec7bd..3c3db2d52a95 100644 --- a/nixos/tests/hadoop/yarn.nix +++ b/nixos/tests/hadoop/yarn.nix @@ -24,6 +24,7 @@ import ../make-test-python.nix ( yarn.nodemanager = { enable = true; openFirewall = true; + useCGroups = false; }; yarnSite = { "yarn.resourcemanager.hostname" = "resourcemanager";