GitHub user cloud-fan opened a pull request:

    https://github.com/apache/spark/pull/22056

    [SPARK-25076][SQL] SQLConf should not be retrieved from a stopped 
SparkSession

    ## What changes were proposed in this pull request?
    
    When a `SparkSession` is stopped, `SQLConf.get` should use the fallback 
conf to avoid weird issues like
    ```
    sbt.ForkMain$ForkError: java.lang.IllegalStateException: LiveListenerBus is 
stopped.
        at 
org.apache.spark.scheduler.LiveListenerBus.addToQueue(LiveListenerBus.scala:97)
        at 
org.apache.spark.scheduler.LiveListenerBus.addToStatusQueue(LiveListenerBus.scala:80)
        at 
org.apache.spark.sql.internal.SharedState.<init>(SharedState.scala:93)
        at 
org.apache.spark.sql.SparkSession$$anonfun$sharedState$1.apply(SparkSession.scala:120)
        at 
org.apache.spark.sql.SparkSession$$anonfun$sharedState$1.apply(SparkSession.scala:120)
        at scala.Option.getOrElse(Option.scala:121)
    ...
    ``` 
    
    ## How was this patch tested?
    
    a new test suite

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloud-fan/spark session

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/22056.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #22056
    
----
commit 4b58645f98db544ddbda5e0019fcb21c36b0ca2d
Author: Wenchen Fan <wenchen@...>
Date:   2018-08-09T14:21:47Z

    SQLConf should not be retrieved from a stopped SparkSession

----


---

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

Reply via email to