diff options
author | Michael Weiser <m.weiser@science-computing.de> | 2015-11-19 16:38:38 +0100 |
---|---|---|
committer | Olaf Flebbe <of@ofleb.be> | 2015-11-19 21:50:26 +0100 |
commit | 9eda5133c81c331f5e9def9d7995231ce68d0a92 (patch) | |
tree | 7dfcfb968794558a6954a2500847f248d28fd043 /bigtop-deploy/puppet | |
parent | ec741b0203793036f2830444d38fe9879966844d (diff) |
BIGTOP-2153: Simplify and complete storage dir creation
Handle storage dir creation in their respective role classes. Use the
actual data dir variables which are by default derived from
hadoop_data_dirs but might be set to something completely differeny by
the user. Handle some more directories such as the journalnode edits dir.
Signed-off-by: Olaf Flebbe <of@ofleb.be>
Diffstat (limited to 'bigtop-deploy/puppet')
-rw-r--r-- | bigtop-deploy/puppet/modules/hadoop/manifests/init.pp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp b/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp index a5489753..5703db9a 100644 --- a/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp @@ -29,11 +29,6 @@ class hadoop ($hadoop_security_authentication = "simple", class deploy ($roles) { - if (!empty(intersection($roles , ["datanode","namenode","nodemanager", "mapred-app"]))) { - include hadoop - hadoop::create_storage_dir { $hadoop::hadoop_storage_dirs: } - } - if ("datanode" in $roles) { include hadoop::datanode } @@ -440,6 +435,7 @@ class hadoop ($hadoop_security_authentication = "simple", Kerberos::Host_keytab <| title == "hdfs" |> -> Service["hadoop-hdfs-datanode"] Service<| title == 'hadoop-hdfs-namenode' |> -> Service['hadoop-hdfs-datanode'] + hadoop::create_storage_dir { $hadoop::common_hdfs::hdfs_data_dirs: } -> file { $hadoop::common_hdfs::hdfs_data_dirs: ensure => directory, owner => hdfs, @@ -585,6 +581,7 @@ class hadoop ($hadoop_security_authentication = "simple", } if (! ('qjournal://' in $hadoop::common_hdfs::shared_edits_dir)) { + hadoop::create_storage_dir { $hadoop::common_hdfs::shared_edits_dir: } -> file { $hadoop::common_hdfs::shared_edits_dir: ensure => directory, } @@ -694,7 +691,8 @@ class hadoop ($hadoop_security_authentication = "simple", content => template('hadoop/hadoop-hdfs'), require => [Package["hadoop-hdfs-namenode"]], } - + + hadoop::create_storage_dir { $hadoop::common_hdfs::namenode_data_dirs: } -> file { $hadoop::common_hdfs::namenode_data_dirs: ensure => directory, owner => hdfs, @@ -762,6 +760,7 @@ class hadoop ($hadoop_security_authentication = "simple", require => [ Package["hadoop-hdfs-journalnode"], File[$journalnode_cluster_journal_dir] ], } + hadoop::create_storage_dir { [$hadoop::common_hdfs::journalnode_edits_dir, $journalnode_cluster_journal_dir]: } -> file { [ "${hadoop::common_hdfs::journalnode_edits_dir}", "$journalnode_cluster_journal_dir" ]: ensure => directory, owner => 'hdfs', @@ -844,6 +843,7 @@ class hadoop ($hadoop_security_authentication = "simple", } Kerberos::Host_keytab <| tag == "mapreduce" |> -> Service["hadoop-yarn-nodemanager"] + hadoop::create_storage_dir { $hadoop::common_yarn::yarn_data_dirs: } -> file { $hadoop::common_yarn::yarn_data_dirs: ensure => directory, owner => yarn, @@ -856,6 +856,7 @@ class hadoop ($hadoop_security_authentication = "simple", class mapred-app { include common_mapred_app + hadoop::create_storage_dir { $hadoop::common_mapred_app::mapred_data_dirs: } -> file { $hadoop::common_mapred_app::mapred_data_dirs: ensure => directory, owner => yarn, |