Skip to content

Commit ce83f59

Browse files
committed
Update HadoopMapReduceCommitProtocol.scala
1 parent 432de6a commit ce83f59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/main/scala/org/apache/spark/internal/io/HadoopMapReduceCommitProtocol.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class HadoopMapReduceCommitProtocol(
182182
val fs = stagingDir.getFileSystem(jobContext.getConfiguration)
183183
fs.deleteOnExit(stagingDir)
184184
} catch {
185-
case e: Throwable =>
185+
case e: IOException =>
186186
logWarning(log"Exception while setting clean logic ${MDC(JOB_ID, jobContext.getJobID)}", e)
187187
}
188188
}
@@ -236,6 +236,7 @@ class HadoopMapReduceCommitProtocol(
236236
}
237237

238238
fs.delete(stagingDir, true)
239+
fs.cancelDeleteOnExit(stagingDir)
239240
}
240241
}
241242

0 commit comments

Comments
 (0)