diff --git a/nixos/modules/services/cluster/hadoop/yarn.nix b/nixos/modules/services/cluster/hadoop/yarn.nix index 2072171262bb..b21a4ca5c277 100644 --- a/nixos/modules/services/cluster/hadoop/yarn.nix +++ b/nixos/modules/services/cluster/hadoop/yarn.nix @@ -196,18 +196,22 @@ in "yarn.nodemanager.resource.cpu-vcores" = resource.cpuVCores; "yarn.nodemanager.resource.memory-mb" = resource.memoryMB; }) - (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"; - })) + (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/default.nix b/nixos/tests/hadoop/default.nix index 479690adc064..aef5bd79e359 100644 --- a/nixos/tests/hadoop/default.nix +++ b/nixos/tests/hadoop/default.nix @@ -1,8 +1,16 @@ { handleTestOn, package, ... }: { - all = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hadoop.nix { inherit package; }; - hdfs = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hdfs.nix { inherit package; }; - yarn = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./yarn.nix { inherit package; }; - hbase = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hbase.nix { inherit package; }; + all = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hadoop.nix { + inherit package; + }; + hdfs = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hdfs.nix { + inherit package; + }; + yarn = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./yarn.nix { + inherit package; + }; + hbase = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hbase.nix { + inherit package; + }; } diff --git a/pkgs/applications/networking/cluster/hadoop/default.nix b/pkgs/applications/networking/cluster/hadoop/default.nix index 98275c25798d..47cd3764a77a 100644 --- a/pkgs/applications/networking/cluster/hadoop/default.nix +++ b/pkgs/applications/networking/cluster/hadoop/default.nix @@ -46,7 +46,9 @@ let "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}" + lib.optionalString stdenv.hostPlatform.isAarch64 "-aarch64" + ".tar.gz"; - inherit (platformAttrs.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}")) hash; + inherit (platformAttrs.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}")) + hash + ; }; doCheck = true; @@ -101,9 +103,12 @@ let # hadoop 3.3+ depends on protobuf 3.18, 3.2 depends on 3.8 find $out/lib/native -name 'libhdfspp.so*' | \ xargs -r -n1 patchelf --replace-needed libprotobuf.so.${ - if (lib.versionAtLeast finalAttrs.version "3.4.1") then "32" - else if (lib.versionAtLeast finalAttrs.version "3.3") then "18" - else "8" + if (lib.versionAtLeast finalAttrs.version "3.4.1") then + "32" + else if (lib.versionAtLeast finalAttrs.version "3.3") then + "18" + else + "8" } libprotobuf.so patchelf --replace-needed libcrypto.so.1.1 libcrypto.so \