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

    https://github.com/apache/spark/pull/11118#discussion_r52614670
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
    @@ -511,6 +545,14 @@ private[history] class FsHistoryProvider(conf: 
SparkConf, clock: Clock)
           bus: ReplayListenerBus): Option[FsApplicationAttemptInfo] = {
         val logPath = eventLog.getPath()
         logInfo(s"Replaying log path: $logPath")
    +    // Note that the eventLog may have *increased* in size since when we 
grabbed the filestatus,
    +    // and when we read the file here.  That is OK -- it may result in an 
unnecessary refresh
    +    // when there is no update, but will not result in missing an update.  
We *must* prevent
    +    // an error the other way -- if we report a size bigger (ie later) 
than the file that is
    +    // actually read, we may never refresh the app
    +    // we expect FileStatus to return the file size when it was initially 
created, but the api
    +    // is not explicit about this so lets be extra-safe.
    +    val eventLogLength = eventLog.getLen()
    --- End diff --
    
    ah I see, I expected it to behave that way but couldn't find any 
documentation which really made that explicit.  I guess you're saying its 
guaranteed by the post-conditions for getFileStatus()?  I've updated the 
comment now.


---
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