You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2018/05/26 00:15:33 UTC

[GitHub] spark pull request #21436: [SPARK-24250][SQL][Follow-up] support accessing S...

GitHub user gatorsmile opened a pull request:

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

    [SPARK-24250][SQL][Follow-up] support accessing SQLConf inside tasks

    ## What changes were proposed in this pull request?
    We should not stop users from calling `getActiveSession` and `getDefaultSession` in executors. To not break the existing behaviors, we should simply return None.
    
    ## How was this patch tested?
    N/A

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

    $ git pull https://github.com/gatorsmile/spark followUpSPARK-24250

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

    https://github.com/apache/spark/pull/21436.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 #21436
    
----
commit 82a0f8754dd874435039506365841d4c0734c0d6
Author: Xiao Li <ga...@...>
Date:   2018-05-26T00:14:39Z

    fix

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/3607/
    Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    Merged build finished. Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    **[Test build #91177 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/91177/testReport)** for PR 21436 at commit [`82a0f87`](https://github.com/apache/spark/commit/82a0f8754dd874435039506365841d4c0734c0d6).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    **[Test build #91177 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/91177/testReport)** for PR 21436 at commit [`82a0f87`](https://github.com/apache/spark/commit/82a0f8754dd874435039506365841d4c0734c0d6).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    **[Test build #91180 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/91180/testReport)** for PR 21436 at commit [`5739fd3`](https://github.com/apache/spark/commit/5739fd3767aa9de7dee54432264b080fa1c55b2d).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #21436: [SPARK-24250][SQL][Follow-up] support accessing S...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21436#discussion_r191050261
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala ---
    @@ -1021,21 +1021,33 @@ object SparkSession extends Logging {
       /**
        * Returns the active SparkSession for the current thread, returned by the builder.
        *
    +   * @note Return None, when calling this function on executors
    +   *
        * @since 2.2.0
        */
       def getActiveSession: Option[SparkSession] = {
    -    assertOnDriver()
    --- End diff --
    
    shall we remove the `assertOnDriver` method?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #21436: [SPARK-24250][SQL][Follow-up] support accessing S...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    Merged build finished. Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/3603/
    Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    Merged build finished. Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    **[Test build #91180 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/91180/testReport)** for PR 21436 at commit [`5739fd3`](https://github.com/apache/spark/commit/5739fd3767aa9de7dee54432264b080fa1c55b2d).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/91177/
    Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    Thanks! Merged to master.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/91180/
    Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    Merged build finished. Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #21436: [SPARK-24250][SQL][Follow-up] support accessing S...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21436#discussion_r191313872
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala ---
    @@ -1021,21 +1021,33 @@ object SparkSession extends Logging {
       /**
        * Returns the active SparkSession for the current thread, returned by the builder.
        *
    +   * @note Return None, when calling this function on executors
    +   *
        * @since 2.2.0
        */
       def getActiveSession: Option[SparkSession] = {
    -    assertOnDriver()
    --- End diff --
    
    `assertOnDriver` is a helpful method. It might be useful to the other scenarios in the future. Let us keep it.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21436: [SPARK-24250][SQL][Follow-up] support accessing SQLConf ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/21436
  
    LGTM. Users may call `SparkSession.getActiveSession` directly instead of writing `if (isDriver) ...`. We should not break it.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org