diff options
author | illustris <rharikrishnan95@gmail.com> | 2021-11-02 18:34:04 +0530 |
---|---|---|
committer | illustris <rharikrishnan95@gmail.com> | 2021-11-03 22:44:25 +0530 |
commit | 9ca4363191f05147d0bd23ffb61838d9c1ee890e (patch) | |
tree | a0919cc91f4b815d4288a30e6756833164ccb489 /nixos/tests/hadoop/hdfs.nix | |
parent | 39c007ce9cc3f46db70bde794323b6cbfccfe62a (diff) | |
download | nixpkgs-9ca4363191f05147d0bd23ffb61838d9c1ee890e.tar nixpkgs-9ca4363191f05147d0bd23ffb61838d9c1ee890e.tar.gz nixpkgs-9ca4363191f05147d0bd23ffb61838d9c1ee890e.tar.bz2 nixpkgs-9ca4363191f05147d0bd23ffb61838d9c1ee890e.tar.lz nixpkgs-9ca4363191f05147d0bd23ffb61838d9c1ee890e.tar.xz nixpkgs-9ca4363191f05147d0bd23ffb61838d9c1ee890e.tar.zst nixpkgs-9ca4363191f05147d0bd23ffb61838d9c1ee890e.zip |
nixos/hadoop: add HTTPFS
Diffstat (limited to 'nixos/tests/hadoop/hdfs.nix')
-rw-r--r-- | nixos/tests/hadoop/hdfs.nix | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/nixos/tests/hadoop/hdfs.nix b/nixos/tests/hadoop/hdfs.nix index 9bc32cc7f8a..e2cef32d05d 100644 --- a/nixos/tests/hadoop/hdfs.nix +++ b/nixos/tests/hadoop/hdfs.nix @@ -2,19 +2,20 @@ import ../make-test-python.nix ({...}: { nodes = { namenode = {pkgs, ...}: { + virtualisation.memorySize = 1024; services.hadoop = { package = pkgs.hadoop; - hdfs.namenode = { - enabled = true; - formatOnInit = true; + hdfs = { + namenode = { + enabled = true; + formatOnInit = true; + }; + httpfs.enabled = true; }; coreSite = { "fs.defaultFS" = "hdfs://namenode:8020"; - }; - hdfsSite = { - "dfs.replication" = 1; - "dfs.namenode.rpc-bind-host" = "0.0.0.0"; - "dfs.namenode.http-bind-host" = "0.0.0.0"; + "hadoop.proxyuser.httpfs.groups" = "*"; + "hadoop.proxyuser.httpfs.hosts" = "*"; }; }; }; @@ -24,6 +25,8 @@ import ../make-test-python.nix ({...}: { hdfs.datanode.enabled = true; coreSite = { "fs.defaultFS" = "hdfs://namenode:8020"; + "hadoop.proxyuser.httpfs.groups" = "*"; + "hadoop.proxyuser.httpfs.hosts" = "*"; }; }; }; @@ -49,5 +52,9 @@ import ../make-test-python.nix ({...}: { datanode.succeed("sudo -u hdfs hdfs dfsadmin -safemode wait") datanode.succeed("echo testfilecontents | sudo -u hdfs hdfs dfs -put - /testfile") assert "testfilecontents" in datanode.succeed("sudo -u hdfs hdfs dfs -cat /testfile") + + namenode.wait_for_unit("hdfs-httpfs") + namenode.wait_for_open_port(14000) + assert "testfilecontents" in datanode.succeed("curl -f \"http://namenode:14000/webhdfs/v1/testfile?user.name=hdfs&op=OPEN\" 2>&1") ''; }) |