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

    https://github.com/apache/spark/pull/6263#discussion_r44059357
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/StorageStatusListener.scala ---
    @@ -17,26 +17,55 @@
     
     package org.apache.spark.storage
     
    +import java.util.concurrent.TimeUnit
    +
    +import scala.collection.JavaConversions.collectionAsScalaIterable
     import scala.collection.mutable
    +import scala.language.reflectiveCalls
     
    +import org.apache.spark.SparkConf
     import org.apache.spark.annotation.DeveloperApi
     import org.apache.spark.scheduler._
     
    +import com.google.common.base.Ticker
    +import com.google.common.cache.CacheBuilder
    +
     /**
      * :: DeveloperApi ::
      * A SparkListener that maintains executor storage status.
      *
      * 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(conf: SparkConf) extends SparkListener {
    +  var ticker = Ticker.systemTicker()
    +  
    +  private [storage] def this(conf: SparkConf, ticker: Ticker) = {
    +    this(conf)
    +    this.ticker = ticker
    +  }
    --- End diff --
    
    Yes, This definitely looks better.


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