squito commented on a change in pull request #24132: [SPARK-27189][CORE] Add 
Executor metrics and memory usage instrumentation to the metrics system
URL: https://github.com/apache/spark/pull/24132#discussion_r349790009
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/SparkContext.scala
 ##########
 @@ -622,6 +629,10 @@ class SparkContext(config: SparkConf) extends Logging {
     _env.metricsSystem.registerSource(_dagScheduler.metricsSource)
     _env.metricsSystem.registerSource(new 
BlockManagerSource(_env.blockManager))
     _env.metricsSystem.registerSource(new JVMCPUSource())
+    if (executorMetricsSource != null) {
+      executorMetricsSource.register
+      env.metricsSystem.registerSource(executorMetricsSource)
 
 Review comment:
   instead how about changing these two lines to 
`executorMEtricSource.register(env.metricSystem)` and pushing that second call 
inside.  Makes it a bit more clear for the user of a ExecutorMetricsSource

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


With regards,
Apache Git Services

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

Reply via email to