-
Notifications
You must be signed in to change notification settings - Fork 33
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
[BUG] Shaded Jackson libraries cause issues #973
Comments
@normanj-bitquill Thanks for reporting this issue. Can you provide more details on how to reproduce this issue? Especially this step:
Cannot reproduce this on my local over spark catalog, neither from managed service
|
@noCharger Based on the stacktrace, it seems our Flint data source and reader was invoked. If so, probably we need to read from some OpenSearch index to reproduce the issue? |
Thx, able to reproduce this when reading on OpenSearch index
|
What is the bug?
The Spark connector (Flint) appears to have issues with JSON. In FlintJacksonParser, it is calling a method on a Spark class to create a JsonFactory.
https://github.com/opensearch-project/opensearch-spark/blob/main/flint-spark-integration/src/main/scala/org/apache/spark/sql/flint/json/FlintJacksonParser.scala#L53
The Flint Jar currently has Jackson shaded. Calling a Spark class to create the
JsonFactory
will return an instance ofcom.fasterxml.jackson.core.JsonFactory
. Since Jackson was shaded,FlintJacksonParser
is expecting an instance ofshaded.flint.com.fasterxml.jackson.core.JsonFactory
.This mismatch causes problems with at least the
spark-shell
any time Flint needs to parse JSON.Not shading Jackson libraries and relying on them in the Spark distribution fixes this problem.
How can one reproduce the bug?
Steps to reproduce the behavior:
spark-shell
on the host running the Spark serverWhat is the expected behavior?
The results should be formatted and displayed. For example:
What is your host/environment?
flint-spark-integration-assembly-0.7.0-SNAPSHOT.jar
Do you have any screenshots?
N/A
Do you have any additional context?
Stack Trace:
The text was updated successfully, but these errors were encountered: