You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/07/08 18:01:39 UTC

[GitHub] [spark] srowen commented on a change in pull request #25072: [SPARK-28294][CORE] Support `spark.history.fs.cleaner.maxNum` configuration

srowen commented on a change in pull request #25072: [SPARK-28294][CORE] Support `spark.history.fs.cleaner.maxNum` configuration
URL: https://github.com/apache/spark/pull/25072#discussion_r301225464
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
 ##########
 @@ -851,10 +836,62 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
         listing.delete(classOf[LogInfo], log.logPath)
       }
     }
+
+    // If the number of files is bigger than MAX_LOG_NUM,
+    // clean up all completed attempts per application one by one.
+    val num = listing.view(classOf[LogInfo]).index("lastProcessed").asScala.count(_ => true)
 
 Review comment:
   `.asScala.size()`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org