rezasafi commented on a change in pull request #23306: [SPARK-26357][Core] 
Expose executors' procfs metrics to Metrics system
URL: https://github.com/apache/spark/pull/23306#discussion_r241518349
 
 

 ##########
 File path: 
core/src/main/scala/org/apache/spark/executor/ProcfsMetricsGetter.scala
 ##########
 @@ -62,7 +62,21 @@ private[spark] class ProcfsMetricsGetter(procfsDir: String 
= "/proc/") extends L
         SparkEnv.get.conf.get(config.EVENT_LOG_STAGE_EXECUTOR_METRICS)
       val shouldLogStageExecutorProcessTreeMetrics =
         SparkEnv.get.conf.get(config.EVENT_LOG_PROCESS_TREE_METRICS)
-      procDirExists.get && shouldLogStageExecutorProcessTreeMetrics && 
shouldLogStageExecutorMetrics
+      val shouldAddProcessTreeMetricsToMetricsSet =
+        SparkEnv.get.conf.get(config.METRICS_PROCESS_TREE_METRICS)
+      val pickEitherUIOrMetricsSet = shouldLogStageExecutorProcessTreeMetrics ^
 
 Review comment:
   Thanks for the review @ankuriitg. My goal was to just allow one of them, so 
I used the Xor. @squito had some ideas with CachedGauge, which I will give it a 
try and after finishing the testing will update here. I think that way this 
logic will be simplify 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to