Skip to content

Commit a00af6b

Browse files
sarutakAndrew Or
authored andcommitted
[SPARK-4973][CORE] Local directory in the driver of client-mode continues remaining even if application finished when external shuffle is enabled
When we enables external shuffle service, local directories in the driver of client-mode continue remaining even if application has finished. I think local directories for drivers should be deleted. Author: Kousuke Saruta <[email protected]> Closes #3811 from sarutak/SPARK-4973 and squashes the following commits: ad944ab [Kousuke Saruta] Fixed DiskBlockManager to cleanup local directory if it's the driver 43770da [Kousuke Saruta] Merge branch 'master' of git://git.apache.org/spark into SPARK-4973 88feecd [Kousuke Saruta] Merge branch 'master' of git://git.apache.org/spark into SPARK-4973 d99718e [Kousuke Saruta] Fixed SparkSubmit.scala and DiskBlockManager.scala in order to delete local directories of the driver of local-mode when external shuffle service is enabled
1 parent 72df5a3 commit a00af6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/storage/DiskBlockManager.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ private[spark] class DiskBlockManager(blockManager: BlockManager, conf: SparkCon
166166
/** Cleanup local dirs and stop shuffle sender. */
167167
private[spark] def stop() {
168168
// Only perform cleanup if an external service is not serving our shuffle files.
169-
if (!blockManager.externalShuffleServiceEnabled) {
169+
if (!blockManager.externalShuffleServiceEnabled || blockManager.blockManagerId.isDriver) {
170170
localDirs.foreach { localDir =>
171171
if (localDir.isDirectory() && localDir.exists()) {
172172
try {

0 commit comments

Comments
 (0)