vanzin commented on a change in pull request #22279: [SPARK-25277][YARN] YARN 
applicationMaster metrics should not register static metrics
URL: https://github.com/apache/spark/pull/22279#discussion_r241133303
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/metrics/MetricsSystem.scala
 ##########
 @@ -94,11 +94,13 @@ private[spark] class MetricsSystem private (
 
   metricsConfig.initialize()
 
-  def start() {
+  def start(registerStaticSources: Boolean = true) {
     require(!running, "Attempting to start a MetricsSystem that is already 
running")
     running = true
-    StaticSources.allSources.foreach(registerSource)
-    registerSources()
+    if(registerStaticSources) {
 
 Review comment:
   nit: space before `(`

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