From 774f809f15f9093ee3e842aa564ebd7aaeeca867 Mon Sep 17 00:00:00 2001 From: Robert Joseph Evans Date: Mon, 5 Mar 2012 22:03:09 +0000 Subject: [PATCH] MAPREDUCE-3964. ResourceManager does not have JVM metrics (Jason Lowe via bobby) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1297248 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../hadoop/yarn/server/resourcemanager/ResourceManager.java | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 1f9d534702e..c26eb92464f 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -269,6 +269,9 @@ Release 0.23.2 - UNRELEASED MAPREDUCE-3009. Fixed node link on JobHistory webapp. (chackaravarthy via vinodkv) + MAPREDUCE-3964. ResourceManager does not have JVM metrics (Jason Lowe via + bobby) + Release 0.23.1 - 2012-02-17 INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java index c5357b11cc5..5b0738e293f 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java @@ -27,7 +27,9 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.classification.InterfaceAudience.Private; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.metrics2.MetricsSystem; import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; +import org.apache.hadoop.metrics2.source.JvmMetrics; import org.apache.hadoop.security.SecurityUtil; import org.apache.hadoop.util.ReflectionUtils; import org.apache.hadoop.util.StringUtils; @@ -449,7 +451,8 @@ public class ResourceManager extends CompositeService implements Recoverable { } startWepApp(); - DefaultMetricsSystem.initialize("ResourceManager"); + MetricsSystem ms = DefaultMetricsSystem.initialize("ResourceManager"); + JvmMetrics.create("ResourceManager", null, ms); try { rmDTSecretManager.startThreads(); } catch(IOException ie) {