-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-29022][SQL]Fix SparkSQLCLI can not add jars by AddJarCommand #25729
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
Conversation
|
Hi, @AngersZhuuuu . Is the JIRA issue ID correct? SPARK-29051 ? |
Sorry, I forgot to change it. This PR should wait for #25542 |
|
ok to test |
|
Test build #110556 has finished for PR 25729 at commit
|
|
Retest this please. |
|
|
Thanks. |
|
@AngersZhuuuu . You need to change the title before triggering. 😄 |
|
Test build #110559 has finished for PR 25729 at commit
|
I intend to change title when build finish. Forgot that I can just change it when you have triggered a |
|
Retest this please. |
|
Test build #110562 has finished for PR 25729 at commit
|
|
@dongjoon-hyun @srowen Maybe we can fix this issue by another PR: #25775 |
|
OK so this should resolve the same issue? are there arguments for against this change vs the other? |
|
@srowen @wangyum @dongjoon-hyun we may need to retest all case again |
|
Test build #110645 has finished for PR 25729 at commit
|
|
Test build #110673 has finished for PR 25729 at commit
|
|
Test build #110714 has finished for PR 25729 at commit
|
|
Test build #111553 has finished for PR 25729 at commit
|
|
Test build #111554 has finished for PR 25729 at commit
|
|
Test build #111565 has finished for PR 25729 at commit
|
| // In HiveThriftServer2, it will call HiveUtils.newClientForExecution() to get a client | ||
| // for Execution, then that method will trigger here to execute, in that case we can't reset | ||
| // ret.getConf's ClassLoader. | ||
| if (HiveUtils.isCliSessionState) { |
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.
|
Test build #111568 has finished for PR 25729 at commit
|
|
Test build #111583 has finished for PR 25729 at commit
|
|
@dongjoon-hyun |
|
retest this please |
|
Test build #111598 has finished for PR 25729 at commit
|
|
retest this please |
|
Test build #111599 has finished for PR 25729 at commit
|
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.
Looks plausible. @wangyum ?
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.
Thank you for ping me @srowen. The change LGTM.
|
Merged to master |
What changes were proposed in this pull request?
For issue mentioned in SPARK-29022
Spark SQL CLI can't use class as serde class in jars add by SQL
ADD JAR.When we create table with
serdeclass contains by jar added by SQL 'ADD JAR'.We can create table with
serdeclass construct success since we callHiveClientImpl.createTableunderwithHiveStatemethod, it will addclientLoader.classLoadertoHiveClientImpl.state.getConf.classLoader.Jars added by SQL
ADD JARwill be add tosparkSession.sharedState.jarClassLoader.In Current spark-sql MODE,
HiveClientImpl.statewill use CliSessionState created when initializeSparkSQLCliDriver, When we select data from table, it will check
serdeclass, when call methodHiveTableScanExec#addColumnMetadataToConf()to check for table desc serde class.getDeserializerwill use CliSessionState's hiveConf's classLoader inSpark SQL CLImode.But when we call
ADD JARin spark, the jar won't be added toClassloader of CliSessionState' conf, thenClassNotFounderror happen.So we reset
CliSessionState conf's classLoadertosharedState.jarClassLoaderwhensharedState.jarClassLoaderhas added jar passed byHIVEAUXJARSThen when we use
ADD JARto add jar, jar path will be added to CliSessionState's conf's ClassLoaderWhy are the changes needed?
Fix bug
Does this PR introduce any user-facing change?
No
How was this patch tested?
ADD UT