You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by rxin <gi...@git.apache.org> on 2015/02/16 20:42:58 UTC

[GitHub] spark pull request: [SPARK-5840][SQL] HiveContext cannot be serial...

GitHub user rxin opened a pull request:

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

    [SPARK-5840][SQL] HiveContext cannot be serialized due to tuple extraction

    TODO: Add a test suite that checks serializability of all SQL classes that should be serializable.


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

    $ git pull https://github.com/rxin/spark SPARK-5840

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

    https://github.com/apache/spark/pull/4628.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 #4628
    
----
commit 8f7dfe8706f94179bd193384f6821953d3b70f52
Author: Reynold Xin <rx...@databricks.com>
Date:   2015-02-16T19:08:49Z

    [SPARK-5840][SQL] HiveContext cannot be serialized due to tuple extraction.

----


---
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-5840][SQL] HiveContext cannot be serial...

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

    https://github.com/apache/spark/pull/4628#discussion_r24773498
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -204,22 +204,25 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
        *    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, sessionState) =
    -    Option(SessionState.get())
    -      .orElse {
    -        val newState = new SessionState(new HiveConf(classOf[SessionState]))
    -        // Only starts newly created `SessionState` instance.  Any existing `SessionState` instance
    -        // returned by `SessionState.get()` must be the most recently started one.
    -        SessionState.start(newState)
    -        Some(newState)
    -      }
    -      .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
    +  @transient protected[hive] lazy val sessionState: SessionState = {
    +    var state = SessionState.get()
    +    if (state == null) {
    +      state = new SessionState(new HiveConf(classOf[SessionState]))
    +      SessionState.start(state)
    +    }
    +    state
    +  }
    +
    +  @transient protected[hive] lazy val hiveconf: HiveConf = {
    +    setConf(sessionState.getConf.getAllProperties)
    +    if (sessionState.out == null) {
    +      sessionState.out = new PrintStream(outputBuffer, true, "UTF-8")
    --- End diff --
    
    oops


---
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-5840][SQL] HiveContext cannot be serial...

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

    https://github.com/apache/spark/pull/4628#issuecomment-74843574
  
      [Test build #27676 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/27676/consoleFull) for   PR 4628 at commit [`ecb3bcd`](https://github.com/apache/spark/commit/ecb3bcd74914128cc65fa0c4b3454e1914d18a9f).
     * 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-5840][SQL] HiveContext cannot be serial...

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

    https://github.com/apache/spark/pull/4628#issuecomment-74843582
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/27676/
    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-5840][SQL] HiveContext cannot be serial...

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

    https://github.com/apache/spark/pull/4628#issuecomment-74562708
  
      [Test build #27564 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/27564/consoleFull) for   PR 4628 at commit [`8f7dfe8`](https://github.com/apache/spark/commit/8f7dfe8706f94179bd193384f6821953d3b70f52).
     * 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-5840][SQL] HiveContext cannot be serial...

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

    https://github.com/apache/spark/pull/4628#issuecomment-74571582
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/27564/
    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-5840][SQL] HiveContext cannot be serial...

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

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


---
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-5840][SQL] HiveContext cannot be serial...

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

    https://github.com/apache/spark/pull/4628#issuecomment-74571577
  
      [Test build #27564 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/27564/consoleFull) for   PR 4628 at commit [`8f7dfe8`](https://github.com/apache/spark/commit/8f7dfe8706f94179bd193384f6821953d3b70f52).
     * 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-5840][SQL] HiveContext cannot be serial...

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

    https://github.com/apache/spark/pull/4628#issuecomment-74957834
  
    Merged to master and 1.3.  Thanks for adding the tests 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-5840][SQL] HiveContext cannot be serial...

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

    https://github.com/apache/spark/pull/4628#discussion_r24773167
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -204,22 +204,25 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
        *    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, sessionState) =
    -    Option(SessionState.get())
    -      .orElse {
    -        val newState = new SessionState(new HiveConf(classOf[SessionState]))
    -        // Only starts newly created `SessionState` instance.  Any existing `SessionState` instance
    -        // returned by `SessionState.get()` must be the most recently started one.
    -        SessionState.start(newState)
    -        Some(newState)
    -      }
    -      .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
    +  @transient protected[hive] lazy val sessionState: SessionState = {
    +    var state = SessionState.get()
    +    if (state == null) {
    +      state = new SessionState(new HiveConf(classOf[SessionState]))
    +      SessionState.start(state)
    +    }
    +    state
    +  }
    +
    +  @transient protected[hive] lazy val hiveconf: HiveConf = {
    +    setConf(sessionState.getConf.getAllProperties)
    +    if (sessionState.out == null) {
    +      sessionState.out = new PrintStream(outputBuffer, true, "UTF-8")
    --- End diff --
    
    why is this here and not with the initialization of session state?


---
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-5840][SQL] HiveContext cannot be serial...

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

    https://github.com/apache/spark/pull/4628#issuecomment-74833670
  
    @marmbrus I updated it with test cases.


---
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-5840][SQL] HiveContext cannot be serial...

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

    https://github.com/apache/spark/pull/4628#issuecomment-74834156
  
      [Test build #27676 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/27676/consoleFull) for   PR 4628 at commit [`ecb3bcd`](https://github.com/apache/spark/commit/ecb3bcd74914128cc65fa0c4b3454e1914d18a9f).
     * 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