9 lib.optionalString (value != null) ''
12 <value>${builtins.toString value}</value>
17 pkgs.writeTextDir fileName ''
18 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
19 <!-- generated by NixOS -->
21 ${builtins.concatStringsSep "\n" (pkgs.lib.mapAttrsToList propertyXml properties)}
24 cfgLine = name: value: ''
25 ${name}=${builtins.toString value}
29 pkgs.writeTextDir fileName ''
31 ${builtins.concatStringsSep "" (pkgs.lib.mapAttrsToList cfgLine properties)}
34 hadoop_verify_logdir() {
35 echo Skipping verification of log directory
39 export HADOOP_LOG_DIR=/tmp/hadoop/$USER
42 pkgs.runCommand "hadoop-conf" { } (
46 cp ${siteXml "core-site.xml" (coreSite // coreSiteInternal)}/* $out/
47 cp ${siteXml "hdfs-site.xml" (hdfsSiteDefault // hdfsSite // hdfsSiteInternal)}/* $out/
48 cp ${siteXml "hbase-site.xml" (hbaseSiteDefault // hbaseSite // hbaseSiteInternal)}/* $out/
49 cp ${siteXml "mapred-site.xml" (mapredSiteDefault // mapredSite)}/* $out/
50 cp ${siteXml "yarn-site.xml" (yarnSiteDefault // yarnSite // yarnSiteInternal)}/* $out/
51 cp ${siteXml "httpfs-site.xml" httpfsSite}/* $out/
52 cp ${cfgFile "container-executor.cfg" containerExecutorCfg}/* $out/
53 cp ${pkgs.writeTextDir "hadoop-user-functions.sh" userFunctions}/* $out/
54 cp ${pkgs.writeTextDir "hadoop-env.sh" hadoopEnv}/* $out/
55 cp ${log4jProperties} $out/log4j.properties
56 ${lib.concatMapStringsSep "\n" (dir: "cp -f -r ${dir}/* $out/") extraConfDirs}