You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by of...@apache.org on 2015/11/19 21:52:28 UTC

[3/3] bigtop git commit: BIGTOP-2153: Simplify and complete storage dir creation

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>


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/9eda5133
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/9eda5133
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/9eda5133

Branch: refs/heads/master
Commit: 9eda5133c81c331f5e9def9d7995231ce68d0a92
Parents: ec741b0
Author: Michael Weiser <m....@science-computing.de>
Authored: Thu Nov 19 16:38:38 2015 +0100
Committer: Olaf Flebbe <of...@ofleb.be>
Committed: Thu Nov 19 21:50:26 2015 +0100

----------------------------------------------------------------------
 bigtop-deploy/puppet/modules/hadoop/manifests/init.pp | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/9eda5133/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp
----------------------------------------------------------------------
diff --git a/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp b/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp
index a548975..5703db9 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,