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

    https://github.com/apache/spark/pull/6263#discussion_r44064794
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/StorageStatusListener.scala ---
    @@ -28,15 +36,33 @@ import org.apache.spark.scheduler._
      *
      * This class is thread-safe (unlike JobProgressListener)
      */
    +
    +object StorageStatusListener {
    +  val TIME_TO_EXPIRE_KILLED_EXECUTOR = 
"spark.ui.timeToExpireKilledExecutor"
    +}
    +
     @DeveloperApi
    -class StorageStatusListener extends SparkListener {
    +class StorageStatusListener private[storage](conf: SparkConf, ticker: 
Ticker) {
    +  def this(conf: SparkConf) = {
    +    this(conf, Ticker.systemTicker())
    +  }
    +  
    +  import StorageStatusListener._
    +  
       // This maintains only blocks that are cached (i.e. storage level is not 
StorageLevel.NONE)
       private[storage] val executorIdToStorageStatus = mutable.Map[String, 
StorageStatus]()
    +  private[storage] val removedExecutorIdToStorageStatus = 
CacheBuilder.newBuilder().
    +    expireAfterWrite(conf.getTimeAsSeconds(TIME_TO_EXPIRE_KILLED_EXECUTOR, 
"0"), TimeUnit.SECONDS).
    +    ticker(ticker).build[String, StorageStatus]()
    --- End diff --
    
    also does this need to be `private[storage]`, or can it just be `private`?


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