incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vik...@apache.org
Subject svn commit: r1347291 - in /incubator/ambari/branches/ambari-186: ./ hmc/puppet/modules/hdp-ganglia/manifests/ hmc/puppet/modules/hdp-hadoop/manifests/ hmc/puppet/modules/hdp-hadoop/templates/ hmc/puppet/modules/hdp-hbase/manifests/ hmc/puppet/modules/h...
Date Thu, 07 Jun 2012 01:56:38 GMT
Author: vikram
Date: Thu Jun  7 01:56:38 2012
New Revision: 1347291

URL: http://svn.apache.org/viewvc?rev=1347291&view=rev
Log:
AMBARI-471. hadoop-metrics2.properties not updated (Contributed by Ramya)

Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/init.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/templates/hadoop-metrics2.properties.erb
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/init.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/master.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/regionserver.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/templates/hadoop-metrics.properties.erb

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347291&r1=1347290&r2=1347291&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun  7 01:56:38 2012
@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.1.x - unreleased
 
+  AMBARI-471. hadoop-metrics2.properties not updated (Ramya via Vikram)
+
   AMBARI-468. Post-Install Add Nodes - update progress title and success/error messages to
reflect what it's actually doing/has done (Yusaku via Vikram)
 
   AMBARI-472. Add api to find all unassigned hosts in a cluster (Hitesh via Vikram)

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp?rev=1347291&r1=1347290&r2=1347291&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp
(original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp
Thu Jun  7 01:56:38 2012
@@ -25,9 +25,9 @@ class hdp-ganglia::monitor(
       class { 'hdp-ganglia::config': ganglia_server_host => $ganglia_server_host}
     }
 
-    if (($hdp::params::service_exists['hdp-hadoop::datanode'] == true) or ($hdp::params::service_exists['hdp-hadoop::namenode']
== true) or ($hdp::params::service_exists['hdp-hadoop::jobtracker'] == true) or ($hdp::params::service_exists['hdp-hadoop::tasktracker']
== true) or ($hdp::params::service_exists['hdp-hadoop::client'] == true) or ($hdp::params::service_exists['hdp-hadoop::snamenode']
== true)) {
-      class { 'hdp-hadoop::enable-ganglia': }
-    }
+#    if (($hdp::params::service_exists['hdp-hadoop::datanode'] == true) or ($hdp::params::service_exists['hdp-hadoop::namenode']
== true) or ($hdp::params::service_exists['hdp-hadoop::jobtracker'] == true) or ($hdp::params::service_exists['hdp-hadoop::tasktracker']
== true) or ($hdp::params::service_exists['hdp-hadoop::client'] == true) or ($hdp::params::service_exists['hdp-hadoop::snamenode']
== true)) {
+#     class { 'hdp-hadoop::enable-ganglia': }
+#   }
 
     if ($service_exists['hdp-hbase::master'] == true) {
       class { 'hdp-hbase::master::enable-ganglia': }

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/init.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/init.pp?rev=1347291&r1=1347290&r2=1347291&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/init.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/init.pp Thu
Jun  7 01:56:38 2012
@@ -70,10 +70,10 @@ class hdp-hadoop(
       owner => $hdfs_user
     }
     
-#    hdp-hadoop::configfile { 'hadoop-metrics2.properties' : 
-#      tag   => 'common', 
-#      owner => $hdfs_user,
-#    }
+    hdp-hadoop::configfile { 'hadoop-metrics2.properties' : 
+      tag   => 'common', 
+      owner => $hdfs_user,
+    }
 
     hdp-hadoop::configfile { 'mapred-site.xml': 
       tag => 'common', 

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/templates/hadoop-metrics2.properties.erb
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/templates/hadoop-metrics2.properties.erb?rev=1347291&r1=1347290&r2=1347291&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/templates/hadoop-metrics2.properties.erb
(original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/templates/hadoop-metrics2.properties.erb
Thu Jun  7 01:56:38 2012
@@ -1,48 +1,37 @@
-#syntax: [prefix].[source|sink|jmx].[instance].[options]
-# See package.html for org.apache.hadoop.metrics2 for details
-
-*.sink.file.class=org.apache.hadoop.metrics2.sink.FileSink
-
-#namenode.sink.file.filename=namenode-metrics.out
-
-#datanode.sink.file.filename=datanode-metrics.out
-
-#jobtracker.sink.file.filename=jobtracker-metrics.out
-
-#tasktracker.sink.file.filename=tasktracker-metrics.out
-
-#maptask.sink.file.filename=maptask-metrics.out
-
-#reducetask.sink.file.filename=reducetask-metrics.out
-
-
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
 #
-# Below are for sending metrics to Ganglia
+# http://www.apache.org/licenses/LICENSE-2.0
 #
-# for Ganglia 3.0 support
-# *.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink30
-#
-# for Ganglia 3.1 support
-# *.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
-
-# *.sink.ganglia.period=10
-
-# default for supportsparse is false
-# *.sink.ganglia.supportsparse=true
-
-#*.sink.ganglia.slope=jvm.metrics.gcCount=zero,jvm.metrics.memHeapUsedM=both
-#*.sink.ganglia.dmax=jvm.metrics.threadsBlocked=70,jvm.metrics.memHeapUsedM=40
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
 
-#namenode.sink.ganglia.servers=yourgangliahost_1:8649,yourgangliahost_2:8649
+# syntax: [prefix].[source|sink|jmx].[instance].[options]
+# See package.html for org.apache.hadoop.metrics2 for details
 
-#datanode.sink.ganglia.servers=yourgangliahost_1:8649,yourgangliahost_2:8649
+*.period=60
 
-#jobtracker.sink.ganglia.servers=yourgangliahost_1:8649,yourgangliahost_2:8649
+*.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
+*.sink.ganglia.period=10
 
-#tasktracker.sink.ganglia.servers=yourgangliahost_1:8649,yourgangliahost_2:8649
+# default for supportsparse is false
+*.sink.ganglia.supportsparse=true
 
-#maptask.sink.ganglia.servers=yourgangliahost_1:8649,yourgangliahost_2:8649
+.sink.ganglia.slope=jvm.metrics.gcCount=zero,jvm.metrics.memHeapUsedM=both
+.sink.ganglia.dmax=jvm.metrics.threadsBlocked=70,jvm.metrics.memHeapUsedM=40
 
-#reducetask.sink.ganglia.servers=yourgangliahost_1:8649,yourgangliahost_2:8649
+# Hook up to the server
+namenode.sink.ganglia.servers=<%=scope.function_hdp_host("ganglia_server_host")%>:8661
+datanode.sink.ganglia.servers=<%=scope.function_hdp_host("ganglia_server_host")%>:8660
+jobtracker.sink.ganglia.servers=<%=scope.function_hdp_host("ganglia_server_host")%>:8662
+tasktracker.sink.ganglia.servers=<%=scope.function_hdp_host("ganglia_server_host")%>:8660
+maptask.sink.ganglia.servers=<%=scope.function_hdp_host("ganglia_server_host")%>:8660
+reducetask.sink.ganglia.servers=<%=scope.function_hdp_host("ganglia_server_host")%>:8660
 
-*.period=60

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/init.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/init.pp?rev=1347291&r1=1347290&r2=1347291&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/init.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/init.pp Thu
Jun  7 01:56:38 2012
@@ -33,9 +33,10 @@ class hdp-hbase(
       force => true
     }
 
-#    hdp-hbase::configfile { ['hbase-env.sh','hbase-site.xml','hbase-policy.xml','log4j.properties','hadoop-metrics.properties']:
}
-      hdp-hbase::configfile { ['hbase-env.sh','hbase-site.xml','hbase-policy.xml','log4j.properties']:
}
-      hdp-hbase::configfile { 'regionservers':}
+   hdp-hbase::configfile { ['hbase-env.sh','hbase-site.xml','hbase-policy.xml','log4j.properties','hadoop-metrics.properties']:

+      type => $type
+    }
+    hdp-hbase::configfile { 'regionservers':}
     Anchor['hdp-hbase::begin'] -> Hdp::Package['hbase'] -> Hdp::User[$hbase_user] ->
Hdp::Directory[$config_dir] -> 
     Hdp-hbase::Configfile<||> ->  Anchor['hdp-hbase::end']
   }
@@ -45,14 +46,24 @@ class hdp-hbase(
 define hdp-hbase::configfile(
   $mode = undef,
   $hbase_master_host = undef,
-  $template_tag = undef
+  $template_tag = undef,
+  $type = undef,
 ) 
 {
+  if ($name == 'hadoop-metrics.properties') {
+    if ($type == 'master') {
+    $tag = GANGLIA-MASTER
+  } else {
+     $tag = GANGLIA-RS
+  }
+   } else {
+    $tag = $template_tag
+}
   hdp::configfile { "${hdp-hbase::params::conf_dir}/${name}":
     component         => 'hbase',
     owner             => $hdp-hbase::params::hbase_user,
     mode              => $mode,
     hbase_master_host => $hbase_master_host,
-    template_tag      => $template_tag
+    template_tag      => $tag
   }
 }

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/master.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/master.pp?rev=1347291&r1=1347290&r2=1347291&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/master.pp
(original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/master.pp
Thu Jun  7 01:56:38 2012
@@ -28,8 +28,8 @@ class hdp-hbase::master(
     }
 
     #top level does not need anchors
-    Class['hdp-hbase'] -> Hdp-hadoop::Hdfs::Directory[$hdfs_root_dir] -> Hdp-hbase::Service['master']
-  } else {
+    Class['hdp-hbase'] -> Hdp-hadoop::Hdfs::Directory[$hdfs_root_dir] -> Hdp-hbase::Service['master']

+    } else {
     hdp_fail("TODO not implemented yet: service_state = ${service_state}")
   }
 }

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/regionserver.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/regionserver.pp?rev=1347291&r1=1347290&r2=1347291&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/regionserver.pp
(original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/regionserver.pp
Thu Jun  7 01:56:38 2012
@@ -20,7 +20,8 @@ class hdp-hbase::regionserver(
       $create_pid_dir = false
       $create_log_dir = false
     }
-     
+
+
     hdp-hbase::service{ 'regionserver':
       ensure         => $service_state,
       create_pid_dir => $create_pid_dir,
@@ -28,7 +29,7 @@ class hdp-hbase::regionserver(
     }
 
     #top level does not need anchors
-    Class['hdp-hbase'] -> Hdp-hbase::Service['regionserver']
+    Class['hdp-hbase'] ->  Hdp-hbase::Service['regionserver']
   } else {
     hdp_fail("TODO not implemented yet: service_state = ${service_state}")
   }

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/templates/hadoop-metrics.properties.erb
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/templates/hadoop-metrics.properties.erb?rev=1347291&r1=1347290&r2=1347291&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/templates/hadoop-metrics.properties.erb
(original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/templates/hadoop-metrics.properties.erb
Thu Jun  7 01:56:38 2012
@@ -1,4 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 # See http://wiki.apache.org/hadoop/GangliaMetrics
+#
 # Make sure you know whether you are using ganglia 3.0 or 3.1.
 # If 3.1, you will have to patch your hadoop instance with HADOOP-4675
 # And, yes, this file is named hadoop-metrics.properties rather than
@@ -8,14 +24,6 @@
 #
 # See also http://hadoop.apache.org/hbase/docs/current/metrics.html
 
-# Configuration of the "hbase" context for null
-hbase.class=org.apache.hadoop.metrics.spi.NullContext
-
-# Configuration of the "hbase" context for file
-# hbase.class=org.apache.hadoop.hbase.metrics.file.TimeStampingFileContext
-# hbase.period=10
-# hbase.fileName=/tmp/metrics_hbase.log
-
 # HBase-specific configuration to reset long-running stats (e.g. compactions)
 # If this variable is left out, then the default is no expiration.
 hbase.extendedperiod = 3600
@@ -23,36 +31,20 @@ hbase.extendedperiod = 3600
 # Configuration of the "hbase" context for ganglia
 # Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter)
 # hbase.class=org.apache.hadoop.metrics.ganglia.GangliaContext
-# hbase.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
-# hbase.period=10
-# hbase.servers=GMETADHOST_IP:8649
-
-# Configuration of the "jvm" context for null
-jvm.class=org.apache.hadoop.metrics.spi.NullContext
-
-# Configuration of the "jvm" context for file
-# jvm.class=org.apache.hadoop.hbase.metrics.file.TimeStampingFileContext
-# jvm.period=10
-# jvm.fileName=/tmp/metrics_jvm.log
+hbase.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
+hbase.period=10
+hbase.servers=<%=scope.function_hdp_host("ganglia_server_host")%>:8663
 
 # Configuration of the "jvm" context for ganglia
 # Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter)
 # jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext
-# jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
-# jvm.period=10
-# jvm.servers=GMETADHOST_IP:8649
-
-# Configuration of the "rpc" context for null
-rpc.class=org.apache.hadoop.metrics.spi.NullContext
-
-# Configuration of the "rpc" context for file
-# rpc.class=org.apache.hadoop.hbase.metrics.file.TimeStampingFileContext
-# rpc.period=10
-# rpc.fileName=/tmp/metrics_rpc.log
+jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
+jvm.period=10
+jvm.servers=<%=scope.function_hdp_host("ganglia_server_host")%>:8663
 
 # Configuration of the "rpc" context for ganglia
 # Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter)
 # rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext
-# rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
-# rpc.period=10
-# rpc.servers=GMETADHOST_IP:8649
+rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
+rpc.period=10
+rpc.servers=<%=scope.function_hdp_host("ganglia_server_host")%>:8663



Mime
View raw message