diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 2001c5764d..e910cddf19 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -373,6 +373,9 @@ Release 2.8.0 - UNRELEASED MAPREDUCE-6384. Add the last reporting reducer info for too many fetch failure diagnostics (Chang Li via jlowe) + MAPREDUCE-6443. Add JvmPauseMonitor to JobHistoryServer. (Robert Kanter + via junping_du) + OPTIMIZATIONS MAPREDUCE-6376. Add avro binary support for jhist files (Ray Chiang via 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 252ac55d4d..b5ac91a937 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 @@ -38,6 +38,7 @@ import org.apache.hadoop.service.CompositeService; import org.apache.hadoop.util.ExitUtil; import org.apache.hadoop.util.GenericOptionsParser; +import org.apache.hadoop.util.JvmPauseMonitor; import org.apache.hadoop.util.ShutdownHookManager; import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.yarn.YarnUncaughtExceptionHandler; @@ -70,6 +71,7 @@ public class JobHistoryServer extends CompositeService { private AggregatedLogDeletionService aggLogDelService; private HSAdminServer hsAdminServer; private HistoryServerStateStoreService stateStore; + private JvmPauseMonitor pauseMonitor; // utility class to start and stop secret manager as part of service // framework and implement state recovery for secret manager on startup @@ -140,6 +142,12 @@ protected void serviceInit(Configuration conf) throws Exception { addService(clientService); addService(aggLogDelService); addService(hsAdminServer); + + DefaultMetricsSystem.initialize("JobHistoryServer"); + JvmMetrics jm = JvmMetrics.initSingleton("JobHistoryServer", null); + pauseMonitor = new JvmPauseMonitor(getConfig()); + jm.setPauseMonitor(pauseMonitor); + super.serviceInit(config); } @@ -190,14 +198,16 @@ public static InetSocketAddress getBindAddress(Configuration conf) { @Override protected void serviceStart() throws Exception { - DefaultMetricsSystem.initialize("JobHistoryServer"); - JvmMetrics.initSingleton("JobHistoryServer", null); + pauseMonitor.start(); super.serviceStart(); } @Override protected void serviceStop() throws Exception { DefaultMetricsSystem.shutdown(); + if (pauseMonitor != null) { + pauseMonitor.stop(); + } super.serviceStop(); }