You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2013/08/11 21:18:07 UTC
git commit: AMBARI-2868. YARN NodeManager directories when passes as
comma separated directories - agent create a single directory including
comma. (swagle)
Updated Branches:
refs/heads/trunk d5a04c730 -> 779879f87
AMBARI-2868. YARN NodeManager directories when passes as comma separated directories - agent create a single directory including comma. (swagle)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/779879f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/779879f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/779879f8
Branch: refs/heads/trunk
Commit: 779879f8744c199412536f587ce611267b220100
Parents: d5a04c7
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Sun Aug 11 12:03:38 2013 -0700
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Sun Aug 11 12:03:38 2013 -0700
----------------------------------------------------------------------
.../modules/hdp-yarn/manifests/nodemanager.pp | 21 ++++++++++++++------
.../puppet/modules/hdp-yarn/manifests/params.pp | 2 +-
2 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/779879f8/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/nodemanager.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/nodemanager.pp b/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/nodemanager.pp
index 7f40ff3..3bf1eaa 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/nodemanager.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/nodemanager.pp
@@ -39,11 +39,8 @@ class hdp-yarn::nodemanager(
include hdp-yarn::initialize
- hdp::directory_recursive_create { $nm_local_dirs:
- owner => $yarn_user,
- context_tag => 'yarn_service',
- service_state => $service_state,
- force => true
+ hdp-yarn::nodemanager::create_nm_dirs { $nm_local_dirs:
+ service_state => $service_state
}
hdp::directory_recursive_create { $nm_log_dirs:
@@ -58,9 +55,21 @@ class hdp-yarn::nodemanager(
user => $yarn_user
}
- anchor{"hdp-yarn::nodemanager::begin":} -> Hdp::Directory_recursive_create[$nm_local_dirs] -> Hdp-yarn::Service['nodemanager'] -> anchor{"hdp-yarn::nodemanager::end":}
+ anchor{"hdp-yarn::nodemanager::begin":} ->
+ Hdp-yarn::Nodemanager::Create_nm_dirs<||> ->
+ Hdp-yarn::Service['nodemanager'] -> anchor{"hdp-yarn::nodemanager::end":}
} else {
hdp_fail("TODO not implemented yet: service_state = ${service_state}")
}
}
+
+define hdp-yarn::nodemanager::create_nm_dirs($service_state) {
+ $dirs = hdp_array_from_comma_list($name)
+ hdp::directory_recursive_create { $dirs :
+ owner => $hdp-yarn::params::yarn_user,
+ context_tag => 'yarn_service',
+ service_state => $service_state,
+ force => true
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/779879f8/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/params.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/params.pp b/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/params.pp
index b6e9781..d09483b 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/params.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/params.pp
@@ -46,7 +46,7 @@ class hdp-yarn::params(
$nm_webui_address = hdp_default("yarn-site/yarn.nodemanager.webapp.address", "0.0.0.0:8042")
$hs_webui_address = hdp_default("mapred-site/mapreduce.jobhistory.webapp.address", "0.0.0.0:19888")
- $nm_local_dirs = hdp_default("yarn-site/yarn.nodemanager.local-dirs", "$hadoop_tmp_dir/nm-local-dir")
+ $nm_local_dirs = hdp_default("yarn-site/yarn.nodemanager.local-dirs", "${hadoop_tmp_dir}/nm-local-dir")
$nm_log_dirs = hdp_default("yarn-site/yarn.nodemanager.log-dirs", "/var/log/hadoop-yarn/yarn")
##smoke test configs