Skip to content

Commit ad944ab

Browse files
committed
Fixed DiskBlockManager to cleanup local directory if it's the driver
1 parent 43770da commit ad944ab

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,6 @@ object SparkSubmit {
134134
}
135135
}
136136

137-
sysProps.put("spark.deploy.mode",
138-
deployMode match {
139-
case CLIENT => "client"
140-
case _ => "cluster"
141-
})
142-
143137
// The following modes are not supported or applicable
144138
(clusterManager, deployMode) match {
145139
case (MESOS, CLUSTER) =>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +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 ||
170-
(blockManager.blockManagerId.isDriver && conf.get("spark.deploy.mode") == "client")) {
169+
if (!blockManager.externalShuffleServiceEnabled || blockManager.blockManagerId.isDriver) {
171170
localDirs.foreach { localDir =>
172171
if (localDir.isDirectory() && localDir.exists()) {
173172
try {

0 commit comments

Comments
 (0)