diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 2fbd7876594..2ed93b150db 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -442,6 +442,8 @@ Release 0.23.5 - UNRELEASED MAPREDUCE-4266. remove Ant remnants from MR (tgraves via bobby) + MAPREDUCE-4666. JVM metrics for history server (jlowe via jeagles) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistoryServer.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistoryServer.java index 1eb62b05671..94d25f60f8b 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistoryServer.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistoryServer.java @@ -27,6 +27,8 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapreduce.MRConfig; import org.apache.hadoop.mapreduce.v2.jobhistory.JHAdminConfig; +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.ShutdownHookManager; import org.apache.hadoop.util.StringUtils; @@ -106,6 +108,8 @@ public class JobHistoryServer extends CompositeService { @Override public void start() { + DefaultMetricsSystem.initialize("JobHistoryServer"); + JvmMetrics.initSingleton("JobHistoryServer", null); try { jhsDTSecretManager.startThreads(); } catch(IOException io) { @@ -118,6 +122,7 @@ public class JobHistoryServer extends CompositeService { @Override public void stop() { jhsDTSecretManager.stopThreads(); + DefaultMetricsSystem.shutdown(); super.stop(); }