From 5f44bd3eba4b40daf97010cbcb0768fe95a44b59 Mon Sep 17 00:00:00 2001 From: Haibo Chen Date: Thu, 25 Jan 2018 16:11:01 -0800 Subject: [PATCH] MAPREDUCE-7041. MR should not try to clean up at first job attempt. (Gergo Repas via Haibo Chen) (cherry picked from commit cc10852252c2d69294eabc68bd032cc630a53b18) (cherry picked from commit e6c66baba97c34514e1d7491d5fe80867930f184) --- .../java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 16e6bc51869..566bc4ed485 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 @@ -1382,7 +1382,7 @@ public class MRAppMaster extends CompositeService { private void cleanUpPreviousJobOutput() { // recovered application masters should not remove data from previous job - if (!recovered()) { + if (!isFirstAttempt() && !recovered()) { JobContext jobContext = getJobContextFromConf(getConfig()); try { LOG.info("Starting to clean up previous job's temporary files");