diff options
author | illustris <rharikrishnan95@gmail.com> | 2022-02-27 10:41:05 +0530 |
---|---|---|
committer | illustris <rharikrishnan95@gmail.com> | 2022-03-11 14:18:44 +0530 |
commit | d39056d165c9dc480284f3bd1e63b6213f0e518d (patch) | |
tree | 2b791f926c0af8c688df5e49442a960b4f57e02a /nixos/modules | |
parent | 8aeb60f034d7581245bdcb3f26e5bc3078dfe0ea (diff) | |
download | nixpkgs-d39056d165c9dc480284f3bd1e63b6213f0e518d.tar nixpkgs-d39056d165c9dc480284f3bd1e63b6213f0e518d.tar.gz nixpkgs-d39056d165c9dc480284f3bd1e63b6213f0e518d.tar.bz2 nixpkgs-d39056d165c9dc480284f3bd1e63b6213f0e518d.tar.lz nixpkgs-d39056d165c9dc480284f3bd1e63b6213f0e518d.tar.xz nixpkgs-d39056d165c9dc480284f3bd1e63b6213f0e518d.tar.zst nixpkgs-d39056d165c9dc480284f3bd1e63b6213f0e518d.zip |
nixos/hadoop: fix tests for hadoop 2 and 3.2
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/cluster/hadoop/default.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/cluster/hadoop/hdfs.nix | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/nixos/modules/services/cluster/hadoop/default.nix b/nixos/modules/services/cluster/hadoop/default.nix index 9968706d5a9..636bb406727 100644 --- a/nixos/modules/services/cluster/hadoop/default.nix +++ b/nixos/modules/services/cluster/hadoop/default.nix @@ -25,6 +25,7 @@ with lib; hdfsSite = mkOption { default = { "dfs.namenode.rpc-bind-host" = "0.0.0.0"; + "dfs.namenode.http-address" = "0.0.0.0:9870"; }; type = types.attrsOf types.anything; example = literalExpression '' diff --git a/nixos/modules/services/cluster/hadoop/hdfs.nix b/nixos/modules/services/cluster/hadoop/hdfs.nix index 451e74df712..61d9941298a 100644 --- a/nixos/modules/services/cluster/hadoop/hdfs.nix +++ b/nixos/modules/services/cluster/hadoop/hdfs.nix @@ -100,7 +100,8 @@ in allowedTCPPorts = [ 9870 # namenode.http-address 8020 # namenode.rpc-address - 8022 # namenode. servicerpc-address + 8022 # namenode.servicerpc-address + 8019 # dfs.ha.zkfc.port ]; preStart = (mkIf cfg.hdfs.namenode.formatOnInit "${cfg.package}/bin/hdfs --config ${hadoopConf} namenode -format -nonInteractive || true" @@ -109,10 +110,15 @@ in (hadoopServiceConfig { name = "DataNode"; - allowedTCPPorts = [ + # port numbers for datanode changed between hadoop 2 and 3 + allowedTCPPorts = if versionAtLeast cfg.package.version "3" then [ 9864 # datanode.http.address 9866 # datanode.address 9867 # datanode.ipc.address + ] else [ + 50075 # datanode.http.address + 50010 # datanode.address + 50020 # datanode.ipc.address ]; }) |