Ted Yu created SPARK-38998:
------------------------------

             Summary: Call to MetricsSystem#getServletHandlers() may take place 
before MetricsSystem becomes running
                 Key: SPARK-38998
                 URL: https://issues.apache.org/jira/browse/SPARK-38998
             Project: Spark
          Issue Type: Bug
          Components: Spark Core
    Affects Versions: 3.1.2
            Reporter: Ted Yu


Sometimes the following exception is observed:
```
java.lang.IllegalArgumentException: requirement failed: Can only call 
getServletHandlers on a running MetricsSystem
    at scala.Predef$.require(Predef.scala:281)
    at 
org.apache.spark.metrics.MetricsSystem.getServletHandlers(MetricsSystem.scala:92)
    at org.apache.spark.SparkContext.<init>(SparkContext.scala:597)
    at 
org.apache.spark.api.java.JavaSparkContext.<init>(JavaSparkContext.scala:58)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
```
It seems SparkContext should wait till the MetricsSystem becomes running before 
calling getServletHandlers()



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to