Skip to content

Commit bb98eca

Browse files
aarondavpwendell
authored andcommitted
SPARK-1860: Do not cleanup application work/ directories by default
This causes an unrecoverable error for applications that are running for longer than 7 days that have jars added to the SparkContext, as the jars are cleaned up even though the application is still running. Author: Aaron Davidson <[email protected]> Closes apache#800 from aarondav/shitty-defaults and squashes the following commits: a573fbb [Aaron Davidson] SPARK-1860: Do not cleanup application work/ directories by default
1 parent 94c5139 commit bb98eca

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private[spark] class Worker(
6565
val REGISTRATION_TIMEOUT = 20.seconds
6666
val REGISTRATION_RETRIES = 3
6767

68-
val CLEANUP_ENABLED = conf.getBoolean("spark.worker.cleanup.enabled", true)
68+
val CLEANUP_ENABLED = conf.getBoolean("spark.worker.cleanup.enabled", false)
6969
// How often worker will clean up old app folders
7070
val CLEANUP_INTERVAL_MILLIS = conf.getLong("spark.worker.cleanup.interval", 60 * 30) * 1000
7171
// TTL for app folders/data; after TTL expires it will be cleaned up

docs/configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,10 +390,11 @@ Apart from these, the following properties are also available, and may be useful
390390
</tr>
391391
<tr>
392392
<td>spark.worker.cleanup.enabled</td>
393-
<td>true</td>
393+
<td>false</td>
394394
<td>
395395
Enable periodic cleanup of worker / application directories. Note that this only affects standalone
396-
mode, as YARN works differently.
396+
mode, as YARN works differently. Applications directories are cleaned up regardless of whether
397+
the application is still running.
397398
</td>
398399
</tr>
399400
<tr>

0 commit comments

Comments
 (0)