-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-44293][CONNECT] Fix invalid URI for custom JARs in Spark Connect #41844
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
| |} | ||
| |val classLoaderUdf = udf(classLoadingTest _) | ||
| | | ||
| |val jarPath = Paths.get("$sparkHome/connector/connect/client/jvm/src/test/resources/TestHelloV2.jar").toUri |
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 feel like there must be a better way to pass in the JAR path here. Open to suggestions!
| // scalastyle:off classforname line.size.limit | ||
| val sparkHome = IntegrationTestUtils.sparkHome | ||
| val testJar = Paths | ||
| .get(s"$sparkHome/connector/connect/client/jvm/src/test/resources/TestHelloV2.jar") |
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 fine but for doubly sure, does it need Scala 2.13 jar too, @LuciferYang ?
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, should wait #41852
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.
#41852 merged
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.
Thanks! I've updated the code to account for the scala version
|
Merged to master. |
…ry files ### What changes were proposed in this pull request? The purpose of this pr is to clean up the binary files used to assist with Scala 2.12 testing. They include: - `core/src/test/resources/TestHelloV3_2.12.jar` and `core/src/test/resources/TestHelloV2_2.12.jar` added by SPARK-44246(#41789). - `connector/connect/client/jvm/src/test/resources/udf2.12` and `connector/connect/client/jvm/src/test/resources/udf2.12.jar` added by SPARK-43744(#42069) - `connector/connect/client/jvm/src/test/resources/TestHelloV2_2.12.jar` added by SPARK-44293(#41844) - `sql/hive/src/test/resources/regression-test-SPARK-8489/test-2.12.jar` added by SPARK-25304(#22308) ### Why are the changes needed? Spark 4.0 no longer supports Scala 2.12. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass GitHub Actions ### Was this patch authored or co-authored using generative AI tooling? No Closes #43106 from LuciferYang/SPARK-45321. Authored-by: yangjie01 <[email protected]> Signed-off-by: yangjie01 <[email protected]>
What changes were proposed in this pull request?
This PR fixs the bug where invalid JAR URIs were being generated because the URI was stored as
artifactURI + "/" + target.toString(here,targetis the absolute path of the file) instead ofartifactURI + "/" + remoteRelativePath.toString(here, theremoteRelativePathis in the form ofjars/...)Why are the changes needed?
Without this change, Spark Connect users attempting to use a custom JAR (such as in UDFs) will hit task failure issue as an exception would be thrown during the JAR file fetch operation.
Example stacktrace:
Does this PR introduce any user-facing change?
No (the bug-fix is consistent with what users expect)
How was this patch tested?
New E2E test in
ReplE2ESuite.