hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rohithsharm...@apache.org
Subject [45/50] [abbrv] hadoop git commit: MAPREDUCE-6443. Add JvmPauseMonitor to JobHistoryServer. Contributed by Robert Kanter.
Date Fri, 07 Aug 2015 05:19:12 GMT
MAPREDUCE-6443. Add JvmPauseMonitor to JobHistoryServer. Contributed by Robert Kanter.


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

Branch: refs/heads/master
Commit: c8469357bad481ca8e341050553a5ae6d98bf8e5
Parents: 7af531d
Author: Junping Du <junping_du@apache.org>
Authored: Thu Aug 6 07:00:42 2015 -0700
Committer: Junping Du <junping_du@apache.org>
Committed: Thu Aug 6 07:00:42 2015 -0700

----------------------------------------------------------------------
 hadoop-mapreduce-project/CHANGES.txt                  |  3 +++
 .../hadoop/mapreduce/v2/hs/JobHistoryServer.java      | 14 ++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c8469357/hadoop-mapreduce-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt
index 5eff741..66a9aac 100644
--- a/hadoop-mapreduce-project/CHANGES.txt
+++ b/hadoop-mapreduce-project/CHANGES.txt
@@ -103,6 +103,9 @@ Release 2.8.0 - UNRELEASED
     MAPREDUCE-5762. Port MAPREDUCE-3223 and MAPREDUCE-4695 (Remove MRv1 config
     from mapred-default.xml) to branch-2. (aajisaka)
 
+    MAPREDUCE-6443. Add JvmPauseMonitor to JobHistoryServer. (Robert Kanter
+    via junping_du)
+
   OPTIMIZATIONS
 
     MAPREDUCE-6376. Add avro binary support for jhist files (Ray Chiang via

http://git-wip-us.apache.org/repos/asf/hadoop/blob/c8469357/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistoryServer.java
----------------------------------------------------------------------
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 252ac55..b5ac91a 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.AbstractService;
 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 @@ public class JobHistoryServer extends CompositeService {
     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 class JobHistoryServer extends CompositeService {
 
   @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();
   }
 


Mime
View raw message