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)
This commit is contained in:
Haibo Chen 2018-01-25 16:11:01 -08:00
parent 4d7bbee0a1
commit 5f44bd3eba

View File

@ -1382,7 +1382,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");