summaryrefslogtreecommitdiff
path: root/ambari-agent
diff options
context:
space:
mode:
authorMahadev Konar <mahadev@apache.org>2012-10-24 06:24:20 +0000
committerMahadev Konar <mahadev@apache.org>2012-10-24 06:24:20 +0000
commit32b1a0cb24b102ad3b38fdde80f216616615d251 (patch)
tree8cbafcf999d609a10c1b4746542c0d4961f1df72 /ambari-agent
parent030ef999f141152ef567bb930ad57ae55e128399 (diff)
AMBARI-900. Add configuration mapping support. (Nate Cole via mahadev)
git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/AMBARI-666@1401566 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'ambari-agent')
-rw-r--r--ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/init.pp9
-rw-r--r--ambari-agent/src/main/python/ambari_agent/site.pp7
-rw-r--r--ambari-agent/src/main/python/ambari_agent/test.json15
3 files changed, 24 insertions, 7 deletions
diff --git a/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/init.pp b/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/init.pp
index 4bfc403591..fc58aa9a5f 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/init.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-templeton/manifests/init.pp
@@ -25,11 +25,12 @@ class hdp-templeton(
{
# Configs generation
- if has_key($configuration, 'hdp_templeton__templeton_site') {
- configgenerator::configfile{'templeton_site_xml':
+ if has_key($configuration, 'templeton_site') {
+ configgenerator::configfile{'templeton_site':
+ modulespath => $hdp-templeton::params::conf_dir,
filename => 'templeton-site.xml',
module => 'hdp-templeton',
- configuration => $configuration['hdp_templeton__templeton_site']
+ configuration => $configuration['templeton_site']
}
}
@@ -70,7 +71,7 @@ class hdp-templeton(
force => true
}
- hdp-templeton::configfile { ['templeton-site.xml','templeton-env.sh']: }
+ hdp-templeton::configfile { ['templeton-env.sh']: }
anchor { 'hdp-templeton::begin': } -> Hdp::Package['templeton'] -> Hdp::User[$templeton_user] -> Hdp::Directory[$templeton_config_dir] -> Hdp-templeton::Configfile<||> -> anchor { 'hdp-templeton::end': }
diff --git a/ambari-agent/src/main/python/ambari_agent/site.pp b/ambari-agent/src/main/python/ambari_agent/site.pp
index ba41b9338c..dddca5358c 100644
--- a/ambari-agent/src/main/python/ambari_agent/site.pp
+++ b/ambari-agent/src/main/python/ambari_agent/site.pp
@@ -49,6 +49,9 @@ core_site=> {
hive_site=> {
"hive.exec.scratchdir" => "/tmp"
},
+templeton_site=> {
+"templeton.override.enabled" => "true"
+},
oozie_site=> {
"oozie.service.ActionService.executor.ext.classes" => "org.apache.oozie.action.hadoop.HiveActionExecutor, org.apache.oozie.action.hadoop.SqoopActionExecutor,org.apache.oozie.action.email.EmailActionExecutor,"
},
@@ -63,11 +66,13 @@ $task_bin_exe = "ls"
$hadoop_piddirprefix = "/tmp"
$ganglia_server_host = "localhost"
node /default/ {
- stage{1 :} -> stage{2 :} -> stage{3 :} -> stage{4 :} -> stage{5 :} -> stage{6 :}
+ stage{1 :} -> stage{2 :} -> stage{3 :} -> stage{4 :} -> stage{5 :} -> stage{6 :} -> stage{7 :} -> stage{8 :}
class {'hdp-hadoop::namenode': stage => 1, service_state => installed_and_configured}
class {'hdp-hadoop::datanode': stage => 2, service_state => installed_and_configured}
class {'hdp-hbase::master': stage => 3, service_state => installed_and_configured}
class {'hdp-hive::server': stage => 4, service_state => installed_and_configured}
class {'hdp-hive::client': stage => 5, service_state => installed_and_configured}
class {'hdp-oozie::server': stage => 6, service_state => installed_and_configured}
+class {'hdp-templeton::server': stage => 7, service_state => installed_and_configured}
+class {'hdp-templeton::client': stage => 8, service_state => installed_and_configured}
}
diff --git a/ambari-agent/src/main/python/ambari_agent/test.json b/ambari-agent/src/main/python/ambari_agent/test.json
index c968dc0ff1..6bc49ac5a4 100644
--- a/ambari-agent/src/main/python/ambari_agent/test.json
+++ b/ambari-agent/src/main/python/ambari_agent/test.json
@@ -19,7 +19,7 @@
"xml_configurations_keys" : ["hdfs_site", "hdfs_site", "core_site", "mapred_queue_acls",
"hadoop_policy", "mapred_site", "capacity_scheduler", "hbase_site",
- "hbase_policy", "hive_site", "oozie_site"],
+ "hbase_policy", "hive_site", "oozie_site", "templeton_site"],
"configurations" : {
"hdfs_site" : { "dfs.block.size" : "256000000", "dfs.replication" : "1" } ,
@@ -40,7 +40,8 @@
"hbase_policy" : {"security.client.protocol.acl" : "*"},
"hadoop_metrics" : {"ganglia_server_host" : "localhost"},
"hive_site" : {"hive.exec.scratchdir" : "/tmp"},
-"oozie_site" : {"oozie.service.ActionService.executor.ext.classes" : "org.apache.oozie.action.hadoop.HiveActionExecutor, org.apache.oozie.action.hadoop.SqoopActionExecutor,org.apache.oozie.action.email.EmailActionExecutor,"}
+"oozie_site" : {"oozie.service.ActionService.executor.ext.classes" : "org.apache.oozie.action.hadoop.HiveActionExecutor, org.apache.oozie.action.hadoop.SqoopActionExecutor,org.apache.oozie.action.email.EmailActionExecutor,"},
+"templeton_site" : {"templeton.override.enabled" : "true"}
},
"roleCommands": [
{
@@ -72,6 +73,16 @@
"role": "OOZIE_SERVER",
"cmd": "INSTALL",
"roleParams" : {}
+},
+{
+ "role": "TEMPLETON_SERVER",
+ "cmd": "INSTALL",
+ "roleParams" : {}
+},
+{
+ "role": "TEMPLETON_CLIENT",
+ "cmd": "INSTALL",
+ "roleParams" : {}
}
]
}