mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
hadoop, nixos/hadoop, nixosTests/hadoop: nixfmt
This commit is contained in:
parent
999e8c7ff0
commit
c62ec80d1f
3 changed files with 37 additions and 20 deletions
|
@ -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 = [
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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 \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue