Updated Branches:
  refs/heads/trunk b452db7de -> 574dfad4d

AMBARI-2765. Capacity Scheduler changes not persisted. (ncole)


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/574dfad4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/574dfad4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/574dfad4

Branch: refs/heads/trunk
Commit: 574dfad4d35430b9c18ea54f78103f32f489456a
Parents: b452db7
Author: Nate Cole <[email protected]>
Authored: Tue Jul 30 08:48:10 2013 -0400
Committer: Nate Cole <[email protected]>
Committed: Tue Jul 30 15:57:16 2013 -0400

----------------------------------------------------------------------
 .../puppet/modules/hdp-yarn/manifests/init.pp   | 24 ++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/574dfad4/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/init.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/init.pp 
b/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/init.pp
index 3cc122d..20e83d4 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/init.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/init.pp
@@ -55,12 +55,12 @@ define hdp-yarn::generate_common_configs() {
       module => 'hdp-yarn',
       configuration => $::configuration['mapred-site'],
       owner => $hdp-yarn::params::yarn_user,
-      mode => 755
+      mode => 644
     }
   } else { # Manually overriding ownership of file installed by hadoop package
     file { "${yarn_config_dir}/mapred-site.xml":
       owner => $hdp-yarn::params::yarn_user,
-      mode => 755
+      mode => 644
     }
   }
   
@@ -71,12 +71,28 @@ define hdp-yarn::generate_common_configs() {
       module => 'hdp-yarn',
       configuration => $::configuration['yarn-site'],
       owner => $hdp-yarn::params::yarn_user,
-      mode => 755
+      mode => 644
     }
   } else { # Manually overriding ownership of file installed by hadoop package
     file { "${yarn_config_dir}/yarn-site.xml":
       owner => $hdp-yarn::params::yarn_user,
-      mode => 755
+      mode => 644
+    }
+  }
+
+  if has_key($::configuration, 'capacity-scheduler') {
+    configgenerator::configfile{'capacity-scheduler': 
+      modulespath => $yarn_config_dir,
+      filename => 'capacity-scheduler.xml',
+      module => 'hdp-yarn',
+      configuration => $::configuration['capacity-scheduler'],
+      owner => $hdp-yarn::params::yarn_user,
+      mode => 644
+    }
+  } else { # Manually overriding ownership of file installed by hadoop package
+    file { "${yarn_config_dir}/capacity-scheduler.xml":
+      owner => $hdp-yarn::params::yarn_user,
+      mode => 644
     }
   }
 

Reply via email to