Github user vijoshi commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15410#discussion_r82789161
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
    @@ -316,24 +320,41 @@ private[history] class FsHistoryProvider(conf: 
SparkConf, clock: Clock)
           if (logInfos.nonEmpty) {
             logDebug(s"New/updated attempts found: ${logInfos.size} 
${logInfos.map(_.getPath)}")
           }
    -      logInfos.map { file =>
    -          replayExecutor.submit(new Runnable {
    +
    +      var tasks = mutable.ListBuffer[Future[_]]()
    +
    +      try {
    +        for (file <- logInfos) {
    +          tasks += replayExecutor.submit(new Runnable {
    --- End diff --
    
    the replayExecutor.submit can raise an exception resulting in fewer 
logInfos getting queued for replay. although currently one can argue that the 
underlying ExecutorService implementation probably will not do this, but I did 
not feel comfortable leaving this possibility out. note that - if there were to 
be an ExecutorService that did raise an exception on this submit( ) it would 
break not only the app counting logic, but also the older one of preventing 
more than one threads getting scheduled for "checkForLogs( )". however if 
there's a thought that we can completely ignore the possibility of exceptions 
on replayExecutor.submit( ), I can optimise the code on those lines. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to