You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/15 21:11:23 UTC

[GitHub] edwinalu commented on a change in pull request #23767: [SPARK-26329][CORE][WIP] Faster polling of executor memory metrics.

edwinalu commented on a change in pull request #23767: [SPARK-26329][CORE][WIP] Faster polling of executor memory metrics.
URL: https://github.com/apache/spark/pull/23767#discussion_r257375347
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/executor/Executor.scala
 ##########
 @@ -189,9 +203,44 @@ private[spark] class Executor(
    */
   private val HEARTBEAT_INTERVAL_MS = conf.get(EXECUTOR_HEARTBEAT_INTERVAL)
 
+  /**
+   * Interval to poll for executor metrics, in milliseconds
+   */
+  private val METRICS_POLLING_INTERVAL_MS = conf.get(EXECUTOR_METRICS_POLLING_INTERVAL)
+
+  // Executor for the metrics polling task
+  private val poller =
+    if (METRICS_POLLING_INTERVAL_MS > 0) {
+      ThreadUtils.newDaemonSingleThreadScheduledExecutor("executor-poller")
+    } else {
+      null
+    }
+
+  private def poll(): Unit = {
 
 Review comment:
   Having the logic for tracking the peak values for executor metrics in Executor.scala is exposing a lot of the implementation details for ExecutorMetrics (Array[Long]). Admittedly Array[Long] is already used for tests, but it would be nice to maintain more of the abstraction. Perhaps a ConcurrentExecutorMetrics?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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