incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject git commit: AMBARI-2881. Enable HBase 96 metrics in a backward compatible way with HBase 94.
Date Tue, 13 Aug 2013 06:06:43 GMT
Updated Branches:
  refs/heads/trunk fa220fd31 -> be99d85a7


AMBARI-2881. Enable HBase 96 metrics in a backward compatible way with HBase 94.


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

Branch: refs/heads/trunk
Commit: be99d85a7b140706b27dc13215757073a4b043bb
Parents: fa220fd
Author: Mahadev Konar <mahadev@apache.org>
Authored: Mon Aug 12 22:52:45 2013 -0700
Committer: Mahadev Konar <mahadev@apache.org>
Committed: Mon Aug 12 22:52:49 2013 -0700

----------------------------------------------------------------------
 .../puppet/modules/hdp-hbase/manifests/init.pp  |  4 +-
 .../modules/hdp-hbase/manifests/master.pp       |  2 +-
 .../modules/hdp-hbase/manifests/params.pp       |  5 ++
 .../modules/hdp-hbase/manifests/regionserver.pp |  2 +-
 ...metrics2-hbase.properties-GANGLIA-MASTER.erb | 62 ++++++++++++++++++++
 ...oop-metrics2-hbase.properties-GANGLIA-RS.erb | 62 ++++++++++++++++++++
 .../main/resources/ganglia_properties_2.json    | 32 +++++-----
 7 files changed, 149 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/be99d85a/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/init.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/init.pp b/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/init.pp
index 7ac10a1..384fff5 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/init.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/init.pp
@@ -106,7 +106,7 @@ class hdp-hbase(
       override_owner => true
     }
 
-   hdp-hbase::configfile { ['hbase-env.sh','hadoop-metrics.properties']: 
+   hdp-hbase::configfile { ['hbase-env.sh',  $hdp-hbase::params::metric-prop-file-name ]:

       type => $type
     }
 
@@ -135,7 +135,7 @@ define hdp-hbase::configfile(
   $conf_dir = $hdp-hbase::params::conf_dir
 ) 
 {
-  if ($name == 'hadoop-metrics.properties') {
+  if ($name == $hdp-hbase::params::metric-prop-file-name) {
     if ($type == 'master') {
       $tag = GANGLIA-MASTER
     } else {

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/be99d85a/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/master.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/master.pp b/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/master.pp
index 69ae6e9..c16b1af 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/master.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/master.pp
@@ -61,6 +61,6 @@ class hdp-hbase::master(
 #assumes that master and regionserver will not be on same machine
 class hdp-hbase::master::enable-ganglia()
 {
-  Hdp-hbase::Configfile<|title  == 'hadoop-metrics.properties'|>{template_tag =>
'GANGLIA-MASTER'}
+  Hdp-hbase::Configfile<|title  == $metric-prop-file-name |>{template_tag => 'GANGLIA-MASTER'}
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/be99d85a/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp b/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp
index 266fe40..82b12bd 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/params.pp
@@ -103,5 +103,10 @@ class hdp-hbase::params() inherits hdp::params
     $hbase_regionserver_jaas_princ = "${hbase_regionserver_primary_name}@${kerberos_domain}"
   }
 
+  if (hdp_get_major_stack_version($hdp::params::stack_version) >= 2) {
+    $metric-prop-file-name = "hadoop-metrics2-hbase.properties"
+  } else {
+    $metric-prop-file-name = "hadoop-metrics.properties"
+  }
   $smokeuser_permissions = hdp_default("smokeuser_permissions", "RWXCA")
 }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/be99d85a/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/regionserver.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/regionserver.pp b/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/regionserver.pp
index 61771ca..bbdaf90 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/regionserver.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-hbase/manifests/regionserver.pp
@@ -69,5 +69,5 @@ class hdp-hbase::regionserver(
 #assumes that master and regionserver will not be on same machine
 class hdp-hbase::regionserver::enable-ganglia()
 {
-  Hdp-hbase::Configfile<|title  == 'hadoop-metrics.properties'|>{template_tag =>
'GANGLIA-RS'}
+  Hdp-hbase::Configfile<|title  == $metric-prop-file-name |>{template_tag => 'GANGLIA-RS'}
 }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/be99d85a/ambari-agent/src/main/puppet/modules/hdp-hbase/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.erb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hbase/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.erb
b/ambari-agent/src/main/puppet/modules/hdp-hbase/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.erb
new file mode 100644
index 0000000..3a05d5e
--- /dev/null
+++ b/ambari-agent/src/main/puppet/modules/hdp-hbase/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.erb
@@ -0,0 +1,62 @@
+# 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
+# hbase-metrics.properties because we're leveraging the hadoop metrics
+# package and hadoop-metrics.properties is an hardcoded-name, at least
+# for the moment.
+#
+# See also http://hadoop.apache.org/hbase/docs/current/metrics.html
+
+# 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
+
+# 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=<%=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=<%=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=<%=scope.function_hdp_host("ganglia_server_host")%>:8663
+
+#Ganglia following hadoop example
+hbase.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
+hbase.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
+
+hbase.sink.ganglia.servers=<%=scope.function_hdp_host("ganglia_server_host")%>:8663

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/be99d85a/ambari-agent/src/main/puppet/modules/hdp-hbase/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.erb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-hbase/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.erb
b/ambari-agent/src/main/puppet/modules/hdp-hbase/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.erb
new file mode 100644
index 0000000..2d74c16
--- /dev/null
+++ b/ambari-agent/src/main/puppet/modules/hdp-hbase/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.erb
@@ -0,0 +1,62 @@
+# 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
+# hbase-metrics.properties because we're leveraging the hadoop metrics
+# package and hadoop-metrics.properties is an hardcoded-name, at least
+# for the moment.
+#
+# See also http://hadoop.apache.org/hbase/docs/current/metrics.html
+
+# 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
+
+# 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=<%=scope.function_hdp_host("ganglia_server_host")%>:8660
+
+# 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=<%=scope.function_hdp_host("ganglia_server_host")%>:8660
+
+# 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=<%=scope.function_hdp_host("ganglia_server_host")%>:8660
+
+#Ganglia following hadoop example
+hbase.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
+hbase.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
+
+hbase.sink.ganglia.servers=<%=scope.function_hdp_host("ganglia_server_host")%>:8660

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/be99d85a/ambari-server/src/main/resources/ganglia_properties_2.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/ganglia_properties_2.json b/ambari-server/src/main/resources/ganglia_properties_2.json
index 5b7464f..7dc2df1 100644
--- a/ambari-server/src/main/resources/ganglia_properties_2.json
+++ b/ambari-server/src/main/resources/ganglia_properties_2.json
@@ -7444,12 +7444,12 @@
         "temporal":true
       },
       "metrics/hbase/master/cluster_requests":{
-        "metric":"hbase.master.cluster_requests",
+        "metric":"master.Server.clusterRequests",
         "pointInTime":false,
         "temporal":true
       },
       "metrics/hbase/master/splitSize_avg_time":{
-        "metric":"hbase.master.splitSize_avg_time",
+        "metric":"master.Server.HlogSplitSize_mean",
         "pointInTime":true,
         "temporal":true
       },
@@ -7459,7 +7459,7 @@
         "temporal":true
       },
       "metrics/hbase/master/splitTime_avg_time":{
-        "metric":"hbase.master.splitTime_avg_time",
+        "metric":"master.Server.HlogSplitTime_mean",
         "pointInTime":true,
         "temporal":true
       },
@@ -10107,7 +10107,7 @@
         "temporal":true
       },
       "metrics/hbase/regionserver/compactionQueueSize":{
-        "metric":"hbase.regionserver.compactionQueueSize",
+        "metric":"regionserver.Server.compactionQueueLength",
         "pointInTime":true,
         "temporal":true
       },
@@ -10177,7 +10177,7 @@
         "temporal":true
       },
       "metrics/hbase/regionserver/flushQueueSize":{
-        "metric":"hbase.regionserver.flushQueueSize",
+        "metric":"regionserver.Server.flushQueueLength",
         "pointInTime":true,
         "temporal":true
       },
@@ -10427,12 +10427,12 @@
         "temporal":true
       },
       "metrics/hbase/regionserver/readRequestsCount":{
-        "metric":"hbase.regionserver.readRequestsCount",
+        "metric":"regionserver.Server.readRequestCount",
         "pointInTime":true,
         "temporal":true
       },
       "metrics/hbase/regionserver/regions":{
-        "metric":"hbase.regionserver.regions",
+        "metric":"regionserver.Server.regionCount",
         "pointInTime":true,
         "temporal":true
       },
@@ -10472,7 +10472,7 @@
         "temporal":true
       },
       "metrics/hbase/regionserver/writeRequestsCount":{
-        "metric":"hbase.regionserver.writeRequestsCount",
+        "metric":"regionserver.Server.writeRequestCount",
         "pointInTime":true,
         "temporal":true
       },
@@ -17303,12 +17303,12 @@
         "temporal":true
       },
       "metrics/hbase/master/cluster_requests":{
-        "metric":"hbase.master.cluster_requests",
+        "metric":"master.Server.clusterRequests",
         "pointInTime":false,
         "temporal":true
       },
       "metrics/hbase/master/splitSize_avg_time":{
-        "metric":"hbase.master.splitSize_avg_time",
+        "metric":"master.Server.HlogSplitTime_mean",
         "pointInTime":true,
         "temporal":true
       },
@@ -17318,7 +17318,7 @@
         "temporal":true
       },
       "metrics/hbase/master/splitTime_avg_time":{
-        "metric":"hbase.master.splitTime_avg_time",
+        "metric": "master.Server.HlogSplitTime_mean",
         "pointInTime":true,
         "temporal":true
       },
@@ -19876,7 +19876,7 @@
         "temporal":true
       },
       "metrics/hbase/regionserver/compactionQueueSize":{
-        "metric":"hbase.regionserver.compactionQueueSize",
+        "metric":"regionserver.Server.compactionQueueLength",
         "pointInTime":true,
         "temporal":true
       },
@@ -19946,7 +19946,7 @@
         "temporal":true
       },
       "metrics/hbase/regionserver/flushQueueSize":{
-        "metric":"hbase.regionserver.flushQueueSize",
+        "metric":"regionserver.Server.flushQueueLength",
         "pointInTime":true,
         "temporal":true
       },
@@ -20196,12 +20196,12 @@
         "temporal":true
       },
       "metrics/hbase/regionserver/readRequestsCount":{
-        "metric":"hbase.regionserver.readRequestsCount",
+        "metric":"regionserver.Server.readRequestCount",
         "pointInTime":true,
         "temporal":true
       },
       "metrics/hbase/regionserver/regions":{
-        "metric":"hbase.regionserver.regions",
+        "metric":"regionserver.Server.regionCount",
         "pointInTime":true,
         "temporal":true
       },
@@ -20241,7 +20241,7 @@
         "temporal":true
       },
       "metrics/hbase/regionserver/writeRequestsCount":{
-        "metric":"hbase.regionserver.writeRequestsCount",
+        "metric":"regionserver.Server.writeRequestCount",
         "pointInTime":true,
         "temporal":true
       },


Mime
View raw message