-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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-23831][SQL] Add org.apache.derby to IsolatedClientLoader #20944
Conversation
Test build #88748 has finished for PR 20944 at commit
|
@@ -188,6 +188,9 @@ private[hive] class IsolatedClientLoader( | |||
(name.startsWith("com.google") && !name.startsWith("com.google.cloud")) || | |||
name.startsWith("java.lang.") || | |||
name.startsWith("java.net") || | |||
name.startsWith("com.sun.") || | |||
name.startsWith("sun.reflect.") || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two lines above are really broad, is this intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it doesn't matter if add these two lines, but I think it's best to add. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not add them unless we have to do it.
cc @jerryshao |
@wangyum What is the root cause? |
@@ -188,6 +188,9 @@ private[hive] class IsolatedClientLoader( | |||
(name.startsWith("com.google") && !name.startsWith("com.google.cloud")) || | |||
name.startsWith("java.lang.") || | |||
name.startsWith("java.net") || | |||
name.startsWith("com.sun.") || | |||
name.startsWith("sun.reflect.") || | |||
name.startsWith("org.apache.derby.") || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also move this line to other org.apache* above
Please list out the reason why do you need such change? If it is a UT bug, why it didn't happen before? |
Test build #89043 has finished for PR 20944 at commit
|
retest this please. |
Test build #89046 has finished for PR 20944 at commit
|
Test build #92170 has finished for PR 20944 at commit
|
Test build #92171 has finished for PR 20944 at commit
|
So I had this come up while I was testing Spark 2.1.3 RC2 on a machine with an existing YARN cluster with |
@@ -182,6 +182,7 @@ private[hive] class IsolatedClientLoader( | |||
name.startsWith("org.slf4j") || | |||
name.startsWith("org.apache.log4j") || // log4j1.x | |||
name.startsWith("org.apache.logging.log4j") || // log4j2 | |||
name.startsWith("org.apache.derby.") || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So to clarify, this adds derby to the "shared" classes (we might want to mention this above on L139) and presumably this fix is for cases where we have an existing derby version on the class-path which may differ and if that happens we end up with strangeness on the metastore? cc @gatorsmile ?
Like I said, I've run into this issue so I'd like to see a fix :)
LGTM Thanks! Merged to master |
Sorry, why was this change required? I don't see #20944 (comment) is addressed Can you elaborate please? Why do we make Ideally, minor or maintenance versions of I found an actual issue while working on Apache Livy Spark 2.4 support. I am still investigating how it relates with the test failures but at the very least I see this specific commit matters since Apache Livy unittests pass without this specific commit. |
Please describe manual tests and how it relates to actual usecase. |
ping @wangyum, I'm going to revert this today if there's no response today. |
Sorry @HyukjinKwon It's difficult reproduce. I am not sure whether it is caused by multithreading. spark/sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveExternalCatalogSuite.scala Lines 117 to 120 in a75571b
|
I understood the reproducer step in JIRA but how and why it matters? Did it cause an actual problem in your production environment? |
To me, it sounds we made a fix but it was difficult to figure out exactly what's going on internally. It's okay if it's difficult to reproduce but it can be reproduced in production; however, the problem is that the fix of this caused another problem. I am asking those to see why and how important this fix was. |
This fix for testing only, production won't use derby as their matestore database. |
Let's revert this then if this only targeted to fix the test. We can bring this back later when it's needed - tho, yea . This caused a specific case failure in Livy' when restarting Hive enabled Spark session. @gatorsmile, I will revert this but I don't mind getting this back again if it actually fixes a usecase since I either don't know how exactly this fixes the case above and how it causes to make the Livy case failed - one thing clear is this specific commit is the cause. Please revert me action if I missed an actual usecase fixed by this, I am okay. |
@HyukjinKwon I could reproduce this issue: build/sbt clean package -Phive -Phive-thriftserver
export SPARK_PREPEND_CLASSES=true
bin/spark-sql --conf spark.sql.hive.metastore.version=2.3.4 --conf spark.sql.hive.metastore.jars=maven -e "create table t1 as select 1 as c" |
So this isn't test only fix anymore? If so, let's get it back. Let me check it too soon. |
Hm, but I still think #20944 (comment) is valid, actually. @wangyum, do we meet this issue when we use our binary releases, or did you meet this only in dev as described above? |
I hint this issue in two places:
|
I see. But can you check if Hive 3.1 support and onward still works with this change? My impression is that we will don't respect their derby version with this change anymore. |
The root cause is: Hive creates more |
What changes were proposed in this pull request?
Add
org.apache.derby
toIsolatedClientLoader
, otherwise it may throw an exception:How was this patch tested?
unit tests and manual tests