python313Packages.traits: fix build (#373698)
[NixPkgs.git] / nixos / tests / hadoop / yarn.nix
blob3c3db2d52a9566a01f618cece1c90d612d59c9ea
1 # This only tests if YARN is able to start its services
2 import ../make-test-python.nix (
3   { package, ... }:
4   {
5     name = "hadoop-yarn";
7     nodes = {
8       resourcemanager =
9         { ... }:
10         {
11           services.hadoop = {
12             inherit package;
13             yarn.resourcemanager = {
14               enable = true;
15               openFirewall = true;
16             };
17           };
18         };
19       nodemanager =
20         { options, lib, ... }:
21         {
22           services.hadoop = {
23             inherit package;
24             yarn.nodemanager = {
25               enable = true;
26               openFirewall = true;
27               useCGroups = false;
28             };
29             yarnSite = {
30               "yarn.resourcemanager.hostname" = "resourcemanager";
31               "yarn.nodemanager.log-dirs" = "/tmp/userlogs";
32             };
33           };
34         };
35     };
37     testScript = ''
38       start_all()
40       resourcemanager.wait_for_unit("yarn-resourcemanager")
41       resourcemanager.wait_for_unit("network.target")
42       resourcemanager.wait_for_open_port(8031)
43       resourcemanager.wait_for_open_port(8088)
45       nodemanager.wait_for_unit("yarn-nodemanager")
46       nodemanager.wait_for_unit("network.target")
47       nodemanager.wait_for_open_port(8042)
49       resourcemanager.succeed("curl -f http://localhost:8088")
50       nodemanager.succeed("curl -f http://localhost:8042")
51     '';
52   }