@@ -65,9 +65,9 @@ private[spark] class Worker(
6565 val REGISTRATION_RETRIES = 3
6666
6767 // How often worker will clean up old app folders
68- val CLEANUP_INTERVAL_MILLIS = conf.getLong(" spark.worker.cleanup_interval " , 60 * 30 ) * 1000
68+ val CLEANUP_INTERVAL_MILLIS = conf.getLong(" spark.worker.cleanupInterval " , 60 * 30 ) * 1000
6969 // TTL for app folders/data; after TTL expires it will be cleaned up
70- val APP_DATA_RETENTION_SECS = conf.getLong(" spark.worker.app_data_ttl " , 7 * 24 * 3600 )
70+ val APP_DATA_RETENTION_SECS = conf.getLong(" spark.worker.appDataTTL " , 7 * 24 * 3600 )
7171
7272 // Index into masterUrls that we're currently trying to register with.
7373 var masterIndex = 0
@@ -185,19 +185,19 @@ private[spark] class Worker(
185185 changeMaster(masterUrl, masterWebUiUrl)
186186 context.system.scheduler.schedule(0 millis, HEARTBEAT_MILLIS millis, self, SendHeartbeat )
187187 context.system.scheduler.schedule(CLEANUP_INTERVAL_MILLIS millis,
188- CLEANUP_INTERVAL_MILLIS millis, self, Worker . AppDirCleanup )
188+ CLEANUP_INTERVAL_MILLIS millis, self, WorkDirCleanup )
189189
190190 case SendHeartbeat =>
191191 masterLock.synchronized {
192192 if (connected) { master ! Heartbeat (workerId) }
193193 }
194194
195- case Worker . AppDirCleanup =>
195+ case WorkDirCleanup =>
196196 // Spin up a separate thread (in a future) to do the dir cleanup; don't tie up worker actor
197197 val cleanupFuture = concurrent.future {
198198 logInfo(" Cleaning up oldest application directories in " + workDir + " ..." )
199199 Utils .findOldFiles(workDir, APP_DATA_RETENTION_SECS )
200- .foreach(Utils .deleteRecursively(_) )
200+ .foreach(Utils .deleteRecursively)
201201 }
202202 cleanupFuture onFailure {
203203 case e : Throwable =>
@@ -350,8 +350,6 @@ private[spark] class Worker(
350350}
351351
352352private [spark] object Worker {
353- case object AppDirCleanup // Sent to Worker actor periodically for cleaning up app folders
354-
355353 def main (argStrings : Array [String ]) {
356354 val args = new WorkerArguments (argStrings)
357355 val (actorSystem, _) = startSystemAndActor(args.host, args.port, args.webUiPort, args.cores,
0 commit comments