You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by liancheng <gi...@git.apache.org> on 2014/10/22 08:52:02 UTC

[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

GitHub user liancheng opened a pull request:

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

    [SPARK-4037][SQL] Removes the SessionState instance created in HiveThriftServer2

    `HiveThriftServer2` creates a global singleton `SessionState` instance and overrides `HiveContext` to inject the `SessionState` object. This messes up `SessionState` initialization and causes problems.
    
    This PR replaces the global `SessionState` with `HiveContext.sessionState` to avoid the initialization conflict.

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

    $ git pull https://github.com/liancheng/spark spark-4037

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

    https://github.com/apache/spark/pull/2887.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 #2887
    
----
commit 04b374d793e06a4e41b223a65d5b9bf7866695a7
Author: Cheng Lian <li...@databricks.com>
Date:   2014-10-22T06:41:13Z

    Fixes SPARK-4037

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60512447
  
    Sure, will rebase this PR to fix that.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60865171
  
    Okay, I tested this manually with a SHOW TABLES on a fresh context and it seems to init correctly.  Merging this to master.  Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60723293
  
    Hey @zhzhan, left some comments both here and in [your PR](https://github.com/apache/spark/pull/2967#discussion_r19457392). Considering all the reasons I mentioned in these comments, would you mind to close #2967? Hive `SessionState` is really an annoying and error prone abstraction, thanks all the same for working on this somewhat tedious but important issue!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-60850603
  
      [Test build #22395 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22395/consoleFull) for   PR 2887 at commit [`8446675`](https://github.com/apache/spark/commit/8446675f8a82a0e873ea2068e085b843a8107f5c).
     * This patch merges cleanly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19662265
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -223,21 +223,23 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
       }
     
       /**
    -   * SQLConf and HiveConf contracts: when the hive session is first initialized, params in
    -   * HiveConf will get picked up by the SQLConf.  Additionally, any properties set by
    -   * set() or a SET command inside sql() will be set in the SQLConf *as well as*
    -   * in the HiveConf.
    +   * SQLConf and HiveConf contracts:
    +   *
    +   * 1. reuse existing started SessionState if any
    +   * 2. when the Hive session is first initialized, params in HiveConf will get picked up by the
    +   *    SQLConf.  Additionally, any properties set by set() or a SET command inside sql() will be
    +   *    set in the SQLConf *as well as* in the HiveConf.
        */
    -  @transient protected[hive] lazy val hiveconf = new HiveConf(classOf[SessionState])
    -  @transient protected[hive] lazy val sessionState = {
    -    val ss = new SessionState(hiveconf)
    -    setConf(hiveconf.getAllProperties)  // Have SQLConf pick up the initial set of HiveConf.
    -    SessionState.start(ss)
    -    ss.err = new PrintStream(outputBuffer, true, "UTF-8")
    -    ss.out = new PrintStream(outputBuffer, true, "UTF-8")
    -
    -    ss
    -  }
    +  @transient protected[hive] lazy val (hiveconf, sessionState) =
    +    Option(SessionState.get())
    +      .orElse(Some(new SessionState(new HiveConf(classOf[SessionState]))))
    +      .map { state =>
    +        setConf(state.getConf.getAllProperties)
    +        if (state.out == null) state.out = new PrintStream(outputBuffer, true, "UTF-8")
    +        if (state.err == null) state.err = new PrintStream(outputBuffer, true, "UTF-8")
    +        (state.getConf, state)
    +      }
    +      .get
    --- End diff --
    
    Yea, all commands/DDLs that are directly delegated to Hive suffer this issue, and this PR fixes it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19462828
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -288,8 +296,15 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
           val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
           val proc: CommandProcessor = HiveShim.getCommandProcessor(Array(tokens(0)), hiveconf)
     
    +      // Makes sure the session represented by the `sessionState` field is activated. This implies
    +      // Spark SQL Hive support uses a single `SessionState` for all Hive operations and breaks
    +      // session isolation under multi-user scenarios (i.e. HiveThriftServer2).
    +      // TODO Fix session isolation
    +      SessionState.start(sessionState)
    +
           proc match {
             case driver: Driver =>
    +          driver.init()
    --- End diff --
    
    @zhzhan This line was removed in #2241. Is there any reason behind?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-60854325
  
      [Test build #22393 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22393/consoleFull) for   PR 2887 at commit [`a28fef5`](https://github.com/apache/spark/commit/a28fef53869dceecbbb75c3e9cd9e2a48b3e8fc1).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-60058029
  
      [QA tests have finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22032/consoleFull) for   PR 2887 at commit [`0c5bd26`](https://github.com/apache/spark/commit/0c5bd26372e781de41d519692772ad61a1f700a8).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-61344283
  
    @marmbrus This should be ready to go.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19482843
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -223,21 +223,23 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
       }
     
       /**
    -   * SQLConf and HiveConf contracts: when the hive session is first initialized, params in
    -   * HiveConf will get picked up by the SQLConf.  Additionally, any properties set by
    -   * set() or a SET command inside sql() will be set in the SQLConf *as well as*
    -   * in the HiveConf.
    +   * SQLConf and HiveConf contracts:
    +   *
    +   * 1. reuse existing started SessionState if any
    +   * 2. when the Hive session is first initialized, params in HiveConf will get picked up by the
    +   *    SQLConf.  Additionally, any properties set by set() or a SET command inside sql() will be
    +   *    set in the SQLConf *as well as* in the HiveConf.
        */
    -  @transient protected[hive] lazy val hiveconf = new HiveConf(classOf[SessionState])
    -  @transient protected[hive] lazy val sessionState = {
    -    val ss = new SessionState(hiveconf)
    -    setConf(hiveconf.getAllProperties)  // Have SQLConf pick up the initial set of HiveConf.
    -    SessionState.start(ss)
    -    ss.err = new PrintStream(outputBuffer, true, "UTF-8")
    -    ss.out = new PrintStream(outputBuffer, true, "UTF-8")
    -
    -    ss
    -  }
    +  @transient protected[hive] lazy val (hiveconf, sessionState) =
    +    Option(SessionState.get())
    +      .orElse(Some(new SessionState(new HiveConf(classOf[SessionState]))))
    +      .map { state =>
    +        setConf(state.getConf.getAllProperties)
    +        if (state.out == null) state.out = new PrintStream(outputBuffer, true, "UTF-8")
    +        if (state.err == null) state.err = new PrintStream(outputBuffer, true, "UTF-8")
    +        (state.getConf, state)
    +      }
    +      .get
    --- End diff --
    
    In this case, we may call SessionState.start with the session state multiple times. In my point of view, we should check whether SessionState.get is null or not, and then decide whether we need to call SessionState.start.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19488002
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -288,8 +296,15 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
           val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
           val proc: CommandProcessor = HiveShim.getCommandProcessor(Array(tokens(0)), hiveconf)
     
    +      // Makes sure the session represented by the `sessionState` field is activated. This implies
    +      // Spark SQL Hive support uses a single `SessionState` for all Hive operations and breaks
    +      // session isolation under multi-user scenarios (i.e. HiveThriftServer2).
    +      // TODO Fix session isolation
    +      SessionState.start(sessionState)
    --- End diff --
    
    Ah I see where the problem is: the assembly jar is built with `-Phive-0.12.0` [1] while the test is executed with `-Phive` [2], which implies `-Phive-0.13.1`.
    
    [1] https://github.com/apache/spark/blob/7768a800d4c4c19d76cef1ee40af6900bbac821c/dev/run-tests#L143
    [2] https://github.com/apache/spark/blob/7768a800d4c4c19d76cef1ee40af6900bbac821c/dev/run-tests#L170


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19486625
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -288,8 +296,15 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
           val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
           val proc: CommandProcessor = HiveShim.getCommandProcessor(Array(tokens(0)), hiveconf)
     
    +      // Makes sure the session represented by the `sessionState` field is activated. This implies
    +      // Spark SQL Hive support uses a single `SessionState` for all Hive operations and breaks
    +      // session isolation under multi-user scenarios (i.e. HiveThriftServer2).
    +      // TODO Fix session isolation
    +      SessionState.start(sessionState)
    --- End diff --
    
    Also, to avoid multiple start, I guess this is better?
    
    ```
    if (SessionState.get() != sessionState) {
      SessionState.start(sessionState)
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-60760984
  
      [Test build #22361 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22361/consoleFull) for   PR 2887 at commit [`49b1c5b`](https://github.com/apache/spark/commit/49b1c5b961d405dfed0da89fda84cfe9d989e4dd).
     * This patch merges cleanly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19456785
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -223,21 +223,23 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
       }
     
       /**
    -   * SQLConf and HiveConf contracts: when the hive session is first initialized, params in
    -   * HiveConf will get picked up by the SQLConf.  Additionally, any properties set by
    -   * set() or a SET command inside sql() will be set in the SQLConf *as well as*
    -   * in the HiveConf.
    +   * SQLConf and HiveConf contracts:
    +   *
    +   * 1. reuse existing started SessionState if any
    +   * 2. when the Hive session is first initialized, params in HiveConf will get picked up by the
    +   *    SQLConf.  Additionally, any properties set by set() or a SET command inside sql() will be
    +   *    set in the SQLConf *as well as* in the HiveConf.
        */
    -  @transient protected[hive] lazy val hiveconf = new HiveConf(classOf[SessionState])
    -  @transient protected[hive] lazy val sessionState = {
    -    val ss = new SessionState(hiveconf)
    -    setConf(hiveconf.getAllProperties)  // Have SQLConf pick up the initial set of HiveConf.
    -    SessionState.start(ss)
    -    ss.err = new PrintStream(outputBuffer, true, "UTF-8")
    -    ss.out = new PrintStream(outputBuffer, true, "UTF-8")
    -
    -    ss
    -  }
    +  @transient protected[hive] lazy val (hiveconf, sessionState) =
    +    Option(SessionState.get())
    +      .orElse(Some(new SessionState(new HiveConf(classOf[SessionState]))))
    +      .map { state =>
    +        setConf(state.getConf.getAllProperties)
    +        if (state.out == null) state.out = new PrintStream(outputBuffer, true, "UTF-8")
    +        if (state.err == null) state.err = new PrintStream(outputBuffer, true, "UTF-8")
    +        (state.getConf, state)
    +      }
    +      .get
    --- End diff --
    
    I didn't call `SessionState.start(...)` here because before Hive 0.13.1 support is merged in, it's always called when necessary in [`HiveContext.runHive`](https://github.com/apache/spark/blob/2ef2f5a7cabcce0f46385d0e7e51e1cc7dd471a0/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala#L291). Just noticed that this call was removed in the most recent master branch. I consider this change dangerous because the current `SessionState` may be switched at some other place and cause subtle errors.
    
    However, add another `SessionState.start(...)` call here is harmless and do helps to track when and whether the session state is properly initialized.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-60855893
  
      [Test build #22395 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22395/consoleFull) for   PR 2887 at commit [`8446675`](https://github.com/apache/spark/commit/8446675f8a82a0e873ea2068e085b843a8107f5c).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-60738690
  
      [Test build #22357 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22357/consoleFull) for   PR 2887 at commit [`49b1c5b`](https://github.com/apache/spark/commit/49b1c5b961d405dfed0da89fda84cfe9d989e4dd).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-60766941
  
      [Test build #22361 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22361/consoleFull) for   PR 2887 at commit [`49b1c5b`](https://github.com/apache/spark/commit/49b1c5b961d405dfed0da89fda84cfe9d989e4dd).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19488429
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -288,8 +296,15 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
           val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
           val proc: CommandProcessor = HiveShim.getCommandProcessor(Array(tokens(0)), hiveconf)
     
    +      // Makes sure the session represented by the `sessionState` field is activated. This implies
    +      // Spark SQL Hive support uses a single `SessionState` for all Hive operations and breaks
    +      // session isolation under multi-user scenarios (i.e. HiveThriftServer2).
    +      // TODO Fix session isolation
    +      SessionState.start(sessionState)
    --- End diff --
    
    I check with some hive experts here, and was told that the session state should not be started again and again. It may work, but not guaranteed. In hive, there is no such use case. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60756867
  
    retest this please


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60851073
  
    @marmbrus This should be ready to go once Jenkins nods.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-61385447
  
    Thanks!  Merged to master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19489429
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -288,8 +296,15 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
           val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
           val proc: CommandProcessor = HiveShim.getCommandProcessor(Array(tokens(0)), hiveconf)
     
    +      // Makes sure the session represented by the `sessionState` field is activated. This implies
    +      // Spark SQL Hive support uses a single `SessionState` for all Hive operations and breaks
    +      // session isolation under multi-user scenarios (i.e. HiveThriftServer2).
    +      // TODO Fix session isolation
    +      SessionState.start(sessionState)
    --- End diff --
    
    BTW, just reproduced the above Jenkins build failure locally by:
    
    1. Building the assembly jar with `-Phadoop-2.3 -Phive-0.12.0`
    1. Running `./sbt/sbt -Phadoop-2.3 -Phive "hive/test-only *.HiveCompatibilitySuite -- -z groupby1"
    
    Will fix `dev/run-tests` altogether.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-61326095
  
    test this please


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19486333
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -288,8 +296,15 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
           val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
           val proc: CommandProcessor = HiveShim.getCommandProcessor(Array(tokens(0)), hiveconf)
     
    +      // Makes sure the session represented by the `sessionState` field is activated. This implies
    +      // Spark SQL Hive support uses a single `SessionState` for all Hive operations and breaks
    +      // session isolation under multi-user scenarios (i.e. HiveThriftServer2).
    +      // TODO Fix session isolation
    +      SessionState.start(sessionState)
    --- End diff --
    
    Hm, `sessionState` do gets started within the same thread multiple times. However, at least for Hive 0.12.0, I think `SessionState.start(sessionState)` should be an idempotent operation, calling it multiple times shouldn't hurt. Maybe this doesn't hold anymore for Hive 0.13.1.
    
    Another issue that really puzzles me is this line from the [Jenkins test failure log](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22361/testReport/org.apache.spark.sql.hive.execution/HiveCompatibilitySuite/groupby1/):
    
    ```
    	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:342)
    ```
    
    The line number suggests that apparently Hive 0.13.1 was used (see [here](https://github.com/apache/hive/blob/release-0.13.1/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java#L342)), but this Jenkins build was triggered with
    
    ```
    -Pyarn -Phadoop-2.3 -Dhadoop.version=2.3.0 -Pkinesis-asl -Phive -Phive-0.12.0
    ```
    
    Anyway, I'll follow your suggestion to avoid starting `sessionState` multiple times and try again. Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19483002
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -288,8 +296,15 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
           val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
           val proc: CommandProcessor = HiveShim.getCommandProcessor(Array(tokens(0)), hiveconf)
     
    +      // Makes sure the session represented by the `sessionState` field is activated. This implies
    +      // Spark SQL Hive support uses a single `SessionState` for all Hive operations and breaks
    +      // session isolation under multi-user scenarios (i.e. HiveThriftServer2).
    +      // TODO Fix session isolation
    +      SessionState.start(sessionState)
    --- End diff --
    
    See above comments. I observe some weird behavior if  the current thread already has the same sessionState started.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-60848939
  
      [Test build #22393 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22393/consoleFull) for   PR 2887 at commit [`a28fef5`](https://github.com/apache/spark/commit/a28fef53869dceecbbb75c3e9cd9e2a48b3e8fc1).
     * This patch merges cleanly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60779134
  
    According to the line number information in the Hive failure output, the test was executed against Hive 0.13.1, while the assembly was built with `-Phive-0.12.0`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by zhzhan <gi...@git.apache.org>.
Github user zhzhan commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60684050
  
    @liancheng I send a PR #2967 against similar issue. Please take a look. My major concern is that the SessionState.start(state) may be invoked multiple times.  If you think PR #2967 is duplicated with this one, please let me know and I will close it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19701171
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -288,6 +296,14 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
           val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
           val proc: CommandProcessor = HiveShim.getCommandProcessor(Array(tokens(0)), hiveconf)
     
    +      // Makes sure the session represented by the `sessionState` field is activated. This implies
    +      // Spark SQL Hive support uses a single `SessionState` for all Hive operations and breaks
    +      // session isolation under multi-user scenarios (i.e. HiveThriftServer2).
    +      // TODO Fix session isolation
    +      if (SessionState.get() != sessionState) {
    --- End diff --
    
    In which case this condition will be true?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60865295
  
    Actually... sorry going to wait for the hive 13 thrift server PR so that we run tests on the server as a sanity check.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19511501
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -288,8 +296,15 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
           val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
           val proc: CommandProcessor = HiveShim.getCommandProcessor(Array(tokens(0)), hiveconf)
     
    +      // Makes sure the session represented by the `sessionState` field is activated. This implies
    +      // Spark SQL Hive support uses a single `SessionState` for all Hive operations and breaks
    +      // session isolation under multi-user scenarios (i.e. HiveThriftServer2).
    +      // TODO Fix session isolation
    +      SessionState.start(sessionState)
    +
           proc match {
             case driver: Driver =>
    +          driver.init()
    --- End diff --
    
    I see, thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-61327098
  
      [Test build #22638 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22638/consoleFull) for   PR 2887 at commit [`8446675`](https://github.com/apache/spark/commit/8446675f8a82a0e873ea2068e085b843a8107f5c).
     * This patch merges cleanly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by zhzhan <gi...@git.apache.org>.
Github user zhzhan commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60808752
  
    @liancheng With the check if (SessionState.get() != sessionState), ./sbt/sbt -Phadoop-2.3 -Phive "hive/test-only *.HiveCompatibilitySuite -- -z groupby1" is running OK. Thanks for clean this up.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by zhzhan <gi...@git.apache.org>.
Github user zhzhan commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60683244
  
    @liancheng I send a PR https://github.com/apache/spark/pull/2967 against similar issue. Please take a look. If you think it is duplicated with this one, please let me know and I will close it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19701845
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -288,6 +296,14 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
           val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
           val proc: CommandProcessor = HiveShim.getCommandProcessor(Array(tokens(0)), hiveconf)
     
    +      // Makes sure the session represented by the `sessionState` field is activated. This implies
    +      // Spark SQL Hive support uses a single `SessionState` for all Hive operations and breaks
    +      // session isolation under multi-user scenarios (i.e. HiveThriftServer2).
    +      // TODO Fix session isolation
    +      if (SessionState.get() != sessionState) {
    --- End diff --
    
    For example, Spark SQL CLI uses a global `CliSessionState` instance, which inherits from `SessionState`. Also, this can be useful to fix the session isolation problem `HiveThriftServer2` currently suffers from.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by zhzhan <gi...@git.apache.org>.
Github user zhzhan commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60445711
  
    @liancheng I was just aware of this issue. In the commit this morning #2241, I have following change in HiveContext.scala, because I didn't realize that the state has changed to lazy eval. Could you check whether it effects your PR, and revert it back if necessary?
    
     - // Session state must be initilized before the CommandProcessor is created .
     - SessionState.start(sessionState)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by zhzhan <gi...@git.apache.org>.
Github user zhzhan commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60786220
  
    @liancheng The test failure may be caused by SessionState.start(sessionState) with the same sessionState multiple times. If SessionState.get is called to decide whether we need to call SessionState.start(sessionState) again, it may solve the issue.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19487146
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -288,8 +296,15 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
           val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
           val proc: CommandProcessor = HiveShim.getCommandProcessor(Array(tokens(0)), hiveconf)
     
    +      // Makes sure the session represented by the `sessionState` field is activated. This implies
    +      // Spark SQL Hive support uses a single `SessionState` for all Hive operations and breaks
    +      // session isolation under multi-user scenarios (i.e. HiveThriftServer2).
    +      // TODO Fix session isolation
    +      SessionState.start(sessionState)
    --- End diff --
    
    I think now the default run-test is hive-0.13. So that is right.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19443373
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -223,21 +223,23 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
       }
     
       /**
    -   * SQLConf and HiveConf contracts: when the hive session is first initialized, params in
    -   * HiveConf will get picked up by the SQLConf.  Additionally, any properties set by
    -   * set() or a SET command inside sql() will be set in the SQLConf *as well as*
    -   * in the HiveConf.
    +   * SQLConf and HiveConf contracts:
    +   *
    +   * 1. reuse existing started SessionState if any
    +   * 2. when the Hive session is first initialized, params in HiveConf will get picked up by the
    +   *    SQLConf.  Additionally, any properties set by set() or a SET command inside sql() will be
    +   *    set in the SQLConf *as well as* in the HiveConf.
        */
    -  @transient protected[hive] lazy val hiveconf = new HiveConf(classOf[SessionState])
    -  @transient protected[hive] lazy val sessionState = {
    -    val ss = new SessionState(hiveconf)
    -    setConf(hiveconf.getAllProperties)  // Have SQLConf pick up the initial set of HiveConf.
    -    SessionState.start(ss)
    -    ss.err = new PrintStream(outputBuffer, true, "UTF-8")
    -    ss.out = new PrintStream(outputBuffer, true, "UTF-8")
    -
    -    ss
    -  }
    +  @transient protected[hive] lazy val (hiveconf, sessionState) =
    +    Option(SessionState.get())
    +      .orElse(Some(new SessionState(new HiveConf(classOf[SessionState]))))
    +      .map { state =>
    +        setConf(state.getConf.getAllProperties)
    +        if (state.out == null) state.out = new PrintStream(outputBuffer, true, "UTF-8")
    +        if (state.err == null) state.err = new PrintStream(outputBuffer, true, "UTF-8")
    +        (state.getConf, state)
    +      }
    +      .get
    --- End diff --
    
    Should SessionState.start(state) be invoked here? Otherwise, it relies on other code to initialize the state, and we lose the track whether the state is initialized, and other code may call SessionState.start() multiple times, resulting in unexpected behavior. Correct me if I am wrong.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-60051452
  
      [QA tests have started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22032/consoleFull) for   PR 2887 at commit [`0c5bd26`](https://github.com/apache/spark/commit/0c5bd26372e781de41d519692772ad61a1f700a8).
     * This patch merges cleanly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60849470
  
    @zhzhan Building assembly jar with `-Phive-0.12.0` but run tests without it is introduced in https://github.com/marmbrus/spark/commit/8f6b09a7813cec22480a23f0301c5d5988090d02#comments, and was done on purpose. Avoiding multiple `SessionState.start()` do fixes this failure on my machine. Trying my luck on Jenkins. Thanks for the suggestion :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-60043829
  
      [QA tests have started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22024/consoleFull) for   PR 2887 at commit [`04b374d`](https://github.com/apache/spark/commit/04b374d793e06a4e41b223a65d5b9bf7866695a7).
     * This patch merges cleanly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-60046859
  
      [QA tests have finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22024/consoleFull) for   PR 2887 at commit [`04b374d`](https://github.com/apache/spark/commit/04b374d793e06a4e41b223a65d5b9bf7866695a7).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/2887#issuecomment-60760546
  
    retest this please


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-60735084
  
      [Test build #22357 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22357/consoleFull) for   PR 2887 at commit [`49b1c5b`](https://github.com/apache/spark/commit/49b1c5b961d405dfed0da89fda84cfe9d989e4dd).
     * This patch merges cleanly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19482722
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -288,8 +296,15 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
           val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
           val proc: CommandProcessor = HiveShim.getCommandProcessor(Array(tokens(0)), hiveconf)
     
    +      // Makes sure the session represented by the `sessionState` field is activated. This implies
    +      // Spark SQL Hive support uses a single `SessionState` for all Hive operations and breaks
    +      // session isolation under multi-user scenarios (i.e. HiveThriftServer2).
    +      // TODO Fix session isolation
    +      SessionState.start(sessionState)
    +
           proc match {
             case driver: Driver =>
    +          driver.init()
    --- End diff --
    
    I check the function getCommandProcessor and found it has already initialize the driver,  and we don't need to init it again.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19488530
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -288,8 +296,15 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
           val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
           val proc: CommandProcessor = HiveShim.getCommandProcessor(Array(tokens(0)), hiveconf)
     
    +      // Makes sure the session represented by the `sessionState` field is activated. This implies
    +      // Spark SQL Hive support uses a single `SessionState` for all Hive operations and breaks
    +      // session isolation under multi-user scenarios (i.e. HiveThriftServer2).
    +      // TODO Fix session isolation
    +      SessionState.start(sessionState)
    --- End diff --
    
    I see, thanks for this important information!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19261442
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suite.scala ---
    @@ -150,10 +150,12 @@ class HiveThriftServer2Suite extends FunSuite with Logging {
           val dataFilePath =
             Thread.currentThread().getContextClassLoader.getResource("data/files/small_kv.txt")
     
    -      val queries = Seq(
    -        "CREATE TABLE test(key INT, val STRING)",
    -        s"LOAD DATA LOCAL INPATH '$dataFilePath' OVERWRITE INTO TABLE test",
    -        "CACHE TABLE test")
    +      val queries =
    +        s"""SET spark.sql.shuffle.partitions=3;
    --- End diff --
    
    This SET command is used as a regression test of SPARK-4037.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#discussion_r19513208
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -223,21 +223,23 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
       }
     
       /**
    -   * SQLConf and HiveConf contracts: when the hive session is first initialized, params in
    -   * HiveConf will get picked up by the SQLConf.  Additionally, any properties set by
    -   * set() or a SET command inside sql() will be set in the SQLConf *as well as*
    -   * in the HiveConf.
    +   * SQLConf and HiveConf contracts:
    +   *
    +   * 1. reuse existing started SessionState if any
    +   * 2. when the Hive session is first initialized, params in HiveConf will get picked up by the
    +   *    SQLConf.  Additionally, any properties set by set() or a SET command inside sql() will be
    +   *    set in the SQLConf *as well as* in the HiveConf.
        */
    -  @transient protected[hive] lazy val hiveconf = new HiveConf(classOf[SessionState])
    -  @transient protected[hive] lazy val sessionState = {
    -    val ss = new SessionState(hiveconf)
    -    setConf(hiveconf.getAllProperties)  // Have SQLConf pick up the initial set of HiveConf.
    -    SessionState.start(ss)
    -    ss.err = new PrintStream(outputBuffer, true, "UTF-8")
    -    ss.out = new PrintStream(outputBuffer, true, "UTF-8")
    -
    -    ss
    -  }
    +  @transient protected[hive] lazy val (hiveconf, sessionState) =
    +    Option(SessionState.get())
    +      .orElse(Some(new SessionState(new HiveConf(classOf[SessionState]))))
    +      .map { state =>
    +        setConf(state.getConf.getAllProperties)
    +        if (state.out == null) state.out = new PrintStream(outputBuffer, true, "UTF-8")
    +        if (state.err == null) state.err = new PrintStream(outputBuffer, true, "UTF-8")
    +        (state.getConf, state)
    +      }
    +      .get
    --- End diff --
    
    We should consider initializing the session state in the constructor, maybe by forcing the realization of the lazy val.  Matei just bumped into a problem where running "SHOW TABLES" as the first command null pointers.  Lets make sure that this PR fixes those sorts of problems too.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

    https://github.com/apache/spark/pull/2887#issuecomment-61334242
  
      [Test build #22638 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22638/consoleFull) for   PR 2887 at commit [`8446675`](https://github.com/apache/spark/commit/8446675f8a82a0e873ea2068e085b843a8107f5c).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4037][SQL] Removes the SessionState ins...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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