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 e6a45cf32d..cb65b89f87 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 @@ -1400,7 +1400,7 @@ private boolean shouldAttemptRecovery() throws IOException { 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");