From 1585b4f7cef584c932e2bbd0b8c6451449847fb0 Mon Sep 17 00:00:00 2001 From: Robert Kanter Date: Tue, 6 Dec 2016 13:11:03 -0800 Subject: [PATCH] MAPREDUCE-6571. JobEndNotification info logs are missing in AM container syslog (haibochen via rkanter) (cherry picked from commit 6b4a9970f187ab399adf7469e494a530f08993b5) --- .../hadoop/mapreduce/v2/app/MRAppMaster.java | 11 ----------- .../org/apache/hadoop/mapreduce/v2/app/MRApp.java | 14 -------------- 2 files changed, 25 deletions(-) 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 f64d0877e98..11dc38dbcfd 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 @@ -148,7 +148,6 @@ import org.apache.hadoop.yarn.security.AMRMTokenIdentifier; import org.apache.hadoop.yarn.security.client.ClientToAMTokenSecretManager; import org.apache.hadoop.yarn.util.Clock; import org.apache.hadoop.yarn.util.SystemClock; -import org.apache.log4j.LogManager; import com.google.common.annotations.VisibleForTesting; @@ -1241,14 +1240,9 @@ public class MRAppMaster extends CompositeService { } } - protected void shutdownTaskLog() { - TaskLog.syncLogsShutdown(logSyncer); - } - @Override public void stop() { super.stop(); - shutdownTaskLog(); } private boolean isRecoverySupported() throws IOException { @@ -1788,14 +1782,9 @@ public class MRAppMaster extends CompositeService { T call(Configuration conf) throws Exception; } - protected void shutdownLogManager() { - LogManager.shutdown(); - } - @Override protected void serviceStop() throws Exception { super.serviceStop(); - shutdownLogManager(); } public ClientService getClientService() { 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 d6a303cc684..590871e14e8 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 @@ -814,19 +814,5 @@ public class MRApp extends MRAppMaster { 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. - } - }