bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1213973 - in /incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet: manifests/cluster.pp modules/hadoop/manifests/init.pp modules/hadoop/templates/mapred-site.xml
Date Tue, 13 Dec 2011 23:01:12 GMT
Author: rvs
Date: Tue Dec 13 23:01:11 2011
New Revision: 1213973

URL: http://svn.apache.org/viewvc?rev=1213973&view=rev
Log:
BIGTOP-309. hadoop-0.23 puppet code needs to deploy history server

Modified:
    incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/manifests/cluster.pp
    incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp
    incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop/templates/mapred-site.xml

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/manifests/cluster.pp
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/manifests/cluster.pp?rev=1213973&r1=1213972&r2=1213973&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/manifests/cluster.pp (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/manifests/cluster.pp Tue Dec
13 23:01:11 2011
@@ -26,6 +26,10 @@ class hadoop_cluster_node {
   $hadoop_sc_port="8030"
   $hadoop_rt_thrift_port="9290"
 
+  $hadoop_hs_host="$hadoop_head_node"
+  $hadoop_hs_port="10020"
+  $hadoop_hs_webapp_port="19888"
+
   $hadoop_jobtracker_host="$hadoop_head_node"
   $hadoop_jobtracker_port="8021"
   $hadoop_jobtracker_thrift_port="9290"
@@ -120,6 +124,13 @@ class hadoop_head_node inherits hadoop_c
         auth => $hadoop_security_authentication,
   }
 
+  hadoop::historyserver { "historyserver":
+        host => $hadoop_hs_host,
+        port => $hadoop_hs_port,
+        webapp_port => $hadoop_hs_webapp_port,
+        auth => $hadoop_security_authentication,
+  }
+
   hadoop-hbase::master { "hbase master":
         rootdir => $hadoop_hbase_rootdir,
         zookeeper_quorum => $hadoop_hbase_zookeeper_quorum,

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp?rev=1213973&r1=1213972&r2=1213973&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp
(original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp
Tue Dec 13 23:01:11 2011
@@ -203,6 +203,27 @@ class hadoop {
     }
   }
 
+  define historyserver ($host = $fqdn, $port = "10020", $webapp_port = "19888", $auth = "simple")
{
+    $hadoop_hs_host = $host
+    $hadoop_hs_port = $port
+    $hadoop_hs_webapp_port = $app_port
+    $hadoop_security_authentication = $auth
+
+    include common-mapred-app
+
+    package { "hadoop-historyserver":
+      ensure => latest,
+      require => Package["jdk"],
+    }
+
+    service { "hadoop-historyserver":
+      ensure => running,
+      hasstatus => true,
+      subscribe => [Package["hadoop-historyserver"], File["/etc/hadoop/conf/hadoop-env.sh"],
File["/etc/hadoop/conf/mapred-site.xml"]],
+      require => [Package["hadoop-historyserver"]],
+    }
+  }
+
 
   define nodemanager ($rm_host, $rm_port, $rt_port, $auth = "simple", $dirs = ["/tmp/yarn"]){
     $hadoop_rm_host = $rm_host
@@ -230,7 +251,7 @@ class hadoop {
     }
   }
 
-  define mapred-app ($namenode_host, $namenode_port, $jobtracker_host, $jobtracker_port,
$auth = "simple", $dirs = ["/tmp/mr"]){
+  define mapred-app ($namenode_host, $namenode_port, $jobtracker_host, $jobtracker_port,
$auth = "simple", $jobhistory_host = "", $jobhistory_port="10020", $dirs = ["/tmp/mr"]){
     $hadoop_namenode_host = $namenode_host
     $hadoop_namenode_port = $namenode_port
     $hadoop_jobtracker_host = $jobtracker_host
@@ -239,6 +260,11 @@ class hadoop {
 
     include common-mapred-app
 
+    if ($jobhistory_host != "") {
+      $hadoop_hs_host = $jobhistory_host
+      $hadoop_hs_port = $jobhistory_port
+    }
+
     file { $dirs:
       ensure => directory,
       owner => yarn,

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop/templates/mapred-site.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop/templates/mapred-site.xml?rev=1213973&r1=1213972&r2=1213973&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop/templates/mapred-site.xml
(original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-deploy/puppet/modules/hadoop/templates/mapred-site.xml
Tue Dec 13 23:01:11 2011
@@ -94,6 +94,17 @@
   </property>
 <% end %>
 
+<% if has_variable?("hadoop_hs_host") %>
+  <property>
+    <name>mapreduce.jobhistory.address</name>
+    <value><%= hadoop_hs_host %>:<%= hadoop_hs_port %></value>
+  </property>
+  <property>
+    <name>mapreduce.jobhistory.webapp.address</name>
+    <value><%= hadoop_hs_host %>:<%= hadoop_hs_webapp_port %></value>
+  </property>
+<% end %>
+
   <property>
     <name>mapreduce.framework.name</name>
     <value>yarn</value>



Mime
View raw message