Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-8368] [SPARK-8058] [SQL] HiveContext may override the context class loader of the current thread #6891

Closed
wants to merge 4 commits into from

Conversation

yhuai
Copy link
Contributor

@yhuai yhuai commented Jun 18, 2015

@yhuai
Copy link
Contributor Author

yhuai commented Jun 19, 2015

cc @andrewor14 @marmbrus

@SparkQA
Copy link

SparkQA commented Jun 19, 2015

Test build #35194 has finished for PR 6891 at commit 695cd2d.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 19, 2015

Test build #35195 has finished for PR 6891 at commit 8762eec.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@andrewor14
Copy link
Contributor

retest this please

@andrewor14
Copy link
Contributor

lgtm. I will try this patch out locally and report back in a few.

@andrewor14
Copy link
Contributor

Alright, I just verified that this patch fixes it. I ran the following:

$ build/sbt -Phive assembly compile
$ bin/pyspark --packages "com.databricks:spark-csv_2.10:1.0.3"
> a = {'a':1.0, 'b':'asdf'}
> rdd = sc.parallelize([a])
> df = sqlContext.createDataFrame(rdd)
> df.save("/tmp/d.csv", "com.databricks.spark.csv")

It failed before the patch but succeeds after it.

@SparkQA
Copy link

SparkQA commented Jun 19, 2015

Test build #35211 has finished for PR 6891 at commit 8762eec.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 19, 2015

Test build #35219 has finished for PR 6891 at commit 37bb3db.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@andrewor14
Copy link
Contributor

@marmbrus can you do a final sign-off?

@marmbrus
Copy link
Contributor

LGTM

@asfgit asfgit closed this in c5876e5 Jun 19, 2015
asfgit pushed a commit that referenced this pull request Jun 19, 2015
…class loader of the current thread (branch 1.4)

This is for 1.4 branch (based on #6891).

Author: Yin Huai <[email protected]>

Closes #6895 from yhuai/SPARK-8368-1.4 and squashes the following commits:

adbbbc9 [Yin Huai] Minor update.
3cca0e9 [Yin Huai] Correctly set the class loader in the conf of the state in client wrapper.
b1e14a9 [Yin Huai] Failed tests.
asfgit pushed a commit that referenced this pull request Jun 20, 2015
**Summary of the problem in SPARK-8470.** When using `HiveContext` to create a data frame of a user case class, Spark throws `scala.reflect.internal.MissingRequirementError` when it tries to infer the schema using reflection. This is caused by `HiveContext` silently overwriting the context class loader containing the user classes.

**What this issue is about.** This issue adds regression tests for SPARK-8470, which is already fixed in #6891. We closed SPARK-8470 as a duplicate because it is a different manifestation of the same problem in SPARK-8368. Due to the complexity of the reproduction, this requires us to pre-package a special test jar and include it in the Spark project itself.

I tested this with and without the fix in #6891 and verified that it passes only if the fix is present.

Author: Andrew Or <[email protected]>

Closes #6909 from andrewor14/SPARK-8498 and squashes the following commits:

5e9d688 [Andrew Or] Add regression test for SPARK-8470

(cherry picked from commit 093c348)
Signed-off-by: Yin Huai <[email protected]>
asfgit pushed a commit that referenced this pull request Jun 20, 2015
**Summary of the problem in SPARK-8470.** When using `HiveContext` to create a data frame of a user case class, Spark throws `scala.reflect.internal.MissingRequirementError` when it tries to infer the schema using reflection. This is caused by `HiveContext` silently overwriting the context class loader containing the user classes.

**What this issue is about.** This issue adds regression tests for SPARK-8470, which is already fixed in #6891. We closed SPARK-8470 as a duplicate because it is a different manifestation of the same problem in SPARK-8368. Due to the complexity of the reproduction, this requires us to pre-package a special test jar and include it in the Spark project itself.

I tested this with and without the fix in #6891 and verified that it passes only if the fix is present.

Author: Andrew Or <[email protected]>

Closes #6909 from andrewor14/SPARK-8498 and squashes the following commits:

5e9d688 [Andrew Or] Add regression test for SPARK-8470
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 22, 2015
…class loader of the current thread (branch 1.4)

This is for 1.4 branch (based on apache#6891).

Author: Yin Huai <[email protected]>

Closes apache#6895 from yhuai/SPARK-8368-1.4 and squashes the following commits:

adbbbc9 [Yin Huai] Minor update.
3cca0e9 [Yin Huai] Correctly set the class loader in the conf of the state in client wrapper.
b1e14a9 [Yin Huai] Failed tests.
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 22, 2015
**Summary of the problem in SPARK-8470.** When using `HiveContext` to create a data frame of a user case class, Spark throws `scala.reflect.internal.MissingRequirementError` when it tries to infer the schema using reflection. This is caused by `HiveContext` silently overwriting the context class loader containing the user classes.

**What this issue is about.** This issue adds regression tests for SPARK-8470, which is already fixed in apache#6891. We closed SPARK-8470 as a duplicate because it is a different manifestation of the same problem in SPARK-8368. Due to the complexity of the reproduction, this requires us to pre-package a special test jar and include it in the Spark project itself.

I tested this with and without the fix in apache#6891 and verified that it passes only if the fix is present.

Author: Andrew Or <[email protected]>

Closes apache#6909 from andrewor14/SPARK-8498 and squashes the following commits:

5e9d688 [Andrew Or] Add regression test for SPARK-8470

(cherry picked from commit 093c348)
Signed-off-by: Yin Huai <[email protected]>
@appleyuchi
Copy link

this bug happens again in spark2.3.1
could you have a look at this please?@andrewor14
https://issues.apache.org/jira/browse/SPARK-31629

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants