2021-12-06 16:07:01 +00:00
|
|
|
# This only tests if YARN is able to start its services
|
2022-03-30 09:31:56 +00:00
|
|
|
import ../make-test-python.nix ({ package, ... }: {
|
|
|
|
name = "hadoop-yarn";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nodes = {
|
2022-03-30 09:31:56 +00:00
|
|
|
resourcemanager = { ... }: {
|
|
|
|
services.hadoop = {
|
|
|
|
inherit package;
|
|
|
|
yarn.resourcemanager = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
2022-03-30 09:31:56 +00:00
|
|
|
nodemanager = { options, lib, ... }: {
|
|
|
|
services.hadoop = {
|
|
|
|
inherit package;
|
|
|
|
yarn.nodemanager = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
2022-08-12 12:06:08 +00:00
|
|
|
yarnSite = {
|
2022-03-30 09:31:56 +00:00
|
|
|
"yarn.resourcemanager.hostname" = "resourcemanager";
|
|
|
|
"yarn.nodemanager.log-dirs" = "/tmp/userlogs";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
start_all()
|
|
|
|
|
|
|
|
resourcemanager.wait_for_unit("yarn-resourcemanager")
|
|
|
|
resourcemanager.wait_for_unit("network.target")
|
|
|
|
resourcemanager.wait_for_open_port(8031)
|
|
|
|
resourcemanager.wait_for_open_port(8088)
|
|
|
|
|
|
|
|
nodemanager.wait_for_unit("yarn-nodemanager")
|
|
|
|
nodemanager.wait_for_unit("network.target")
|
|
|
|
nodemanager.wait_for_open_port(8042)
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
resourcemanager.succeed("curl -f http://localhost:8088")
|
|
|
|
nodemanager.succeed("curl -f http://localhost:8042")
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
})
|