nixos/hadoop: replace enable = mkoption bools with mkEnableOption

main
illustris 3 years ago
parent c3d147f507
commit 42e14ff69f
  1. 40
      nixos/modules/services/cluster/hadoop/hdfs.nix
  2. 16
      nixos/modules/services/cluster/hadoop/yarn.nix

@ -17,13 +17,7 @@ in
{
options.services.hadoop.hdfs = {
namenode = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the HDFS NameNode
'';
};
enable = mkEnableOption "Whether to run the HDFS NameNode";
formatOnInit = mkOption {
type = types.bool;
default = false;
@ -43,13 +37,7 @@ in
};
};
datanode = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the HDFS DataNode
'';
};
enable = mkEnableOption "Whether to run the HDFS DataNode";
inherit restartIfChanged;
openFirewall = mkOption {
type = types.bool;
@ -60,13 +48,7 @@ in
};
};
journalnode = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the HDFS JournalNode
'';
};
enable = mkEnableOption "Whether to run the HDFS JournalNode";
inherit restartIfChanged;
openFirewall = mkOption {
type = types.bool;
@ -77,23 +59,11 @@ in
};
};
zkfc = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the HDFS ZooKeeper failover controller
'';
};
enable = mkEnableOption "Whether to run the HDFS ZooKeeper failover controller";
inherit restartIfChanged;
};
httpfs = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the HDFS httpfs failover controller
'';
};
enable = mkEnableOption "Whether to run the HDFS HTTPfs server";
tempPath = mkOption {
type = types.path;
default = "/tmp/hadoop/httpfs";

@ -17,13 +17,7 @@ in
{
options.services.hadoop.yarn = {
resourcemanager = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the Hadoop YARN ResourceManager
'';
};
enable = mkEnableOption "Whether to run the Hadoop YARN ResourceManager";
inherit restartIfChanged;
openFirewall = mkOption {
type = types.bool;
@ -34,13 +28,7 @@ in
};
};
nodemanager = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the Hadoop YARN NodeManager
'';
};
enable = mkEnableOption "Whether to run the Hadoop YARN NodeManager";
inherit restartIfChanged;
addBinBash = mkOption {
type = types.bool;

Loading…
Cancel
Save