hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject [30/48] hadoop git commit: MAPREDUCE-6418. MRApp should not shutdown LogManager during shutdown. Contributed by Chang Li
Date Mon, 06 Jul 2015 20:57:52 GMT
MAPREDUCE-6418. MRApp should not shutdown LogManager during shutdown. Contributed by Chang
Li


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

Branch: refs/heads/YARN-2928
Commit: d7e622663c19c7d5103d17e04a02cad07662cc7a
Parents: ef7b82b
Author: Jason Lowe <jlowe@apache.org>
Authored: Wed Jul 1 18:01:22 2015 +0000
Committer: Zhijie Shen <zjshen@apache.org>
Committed: Mon Jul 6 11:31:59 2015 -0700

----------------------------------------------------------------------
 hadoop-mapreduce-project/CHANGES.txt                 |  3 +++
 .../apache/hadoop/mapreduce/v2/app/MRAppMaster.java  | 14 +++++++++++---
 .../org/apache/hadoop/mapreduce/v2/app/MRApp.java    | 15 +++++++++++++++
 3 files changed, 29 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d7e62266/hadoop-mapreduce-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt
index dd739ca..68ce49b 100644
--- a/hadoop-mapreduce-project/CHANGES.txt
+++ b/hadoop-mapreduce-project/CHANGES.txt
@@ -551,6 +551,9 @@ Release 2.8.0 - UNRELEASED
     MAPREDUCE-6420. Interrupted Exception in LocalContainerLauncher should be
     logged in warn/info level (Chang Li via jlowe)
 
+    MAPREDUCE-6418. MRApp should not shutdown LogManager during shutdown
+    (Chang Li via jlowe)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d7e62266/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java
index 149fd5d..f1d0b68 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java
@@ -1220,11 +1220,15 @@ public class MRAppMaster extends CompositeService {
       startJobs();
     }
   }
-  
+
+  protected void shutdownTaskLog() {
+    TaskLog.syncLogsShutdown(logSyncer);
+  }
+
   @Override
   public void stop() {
     super.stop();
-    TaskLog.syncLogsShutdown(logSyncer);
+    shutdownTaskLog();
   }
 
   private boolean isRecoverySupported() throws IOException {
@@ -1728,10 +1732,14 @@ public class MRAppMaster extends CompositeService {
     T call(Configuration conf) throws Exception;
   }
 
+  protected void shutdownLogManager() {
+    LogManager.shutdown();
+  }
+
   @Override
   protected void serviceStop() throws Exception {
     super.serviceStop();
-    LogManager.shutdown();
+    shutdownLogManager();
   }
 
   public ClientService getClientService() {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d7e62266/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MRApp.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MRApp.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MRApp.java
index 4fe4c44..b51adf2 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MRApp.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MRApp.java
@@ -804,5 +804,20 @@ public class MRApp extends MRAppMaster {
             new Text(containerToken.getService()));
     return token.decodeIdentifier();
   }
+
+  @Override
+  protected void shutdownTaskLog() {
+    // Avoid closing the logging system during unit tests,
+    // otherwise subsequent MRApp instances in the same test
+    // will fail to log anything.
+  }
+
+  @Override
+  protected void shutdownLogManager() {
+    // Avoid closing the logging system during unit tests,
+    // otherwise subsequent MRApp instances in the same test
+    // will fail to log anything.
+  }
+
 }
  


Mime
View raw message