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

    https://github.com/apache/spark/pull/3726#discussion_r22264429
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/util/WriteAheadLogManager.scala
 ---
    @@ -124,8 +124,25 @@ private[streaming] class WriteAheadLogManager(
        * files, which is usually based on the local system time. So if there 
is coordination necessary
        * between the node calculating the threshTime (say, driver node), and 
the local system time
        * (say, worker node), the caller has to take account of possible time 
skew.
    +   *
    +   * This method deletes old log files asynchronously.
        */
       def cleanupOldLogs(threshTime: Long): Unit = {
    +    cleanupOldLogs(threshTime, waitForCompletion = false)
    +  }
    +
    +  /**
    +   * Delete the log files that are older than the threshold time.
    +   *
    +   * Its important to note that the threshold time is based on the time 
stamps used in the log
    +   * files, which is usually based on the local system time. So if there 
is coordination necessary
    +   * between the node calculating the threshTime (say, driver node), and 
the local system time
    +   * (say, worker node), the caller has to take account of possible time 
skew.
    +   *
    +   * If waitForCompletion is set to true, this method will return only 
after old logs have been
    +   * deleted. Else the files will be deleted asynchronously.
    +   */
    +  def cleanupOldLogs(threshTime: Long, waitForCompletion: Boolean): Unit = 
{
    --- End diff --
    
    Yep, sound good. I will update the PR.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to