apache / apache/hugegraph-toolchain
Spark loader has dependency conflicts
- Dominant language
- Java
- Stars
- 121
- Forks
- 125
- Avg merge
- 10d 10h
- Merged PRs (30d)
- 3
Description
### Bug Type (问题类型)
None
### Before submit
- [X] I had searched in the [issues](https://github.com/apache/hugegraph-toolchain/issues) and found no similar issues.
### Environment (环境信息)
- Server Version: v1.0.0
- Toolchain Version: v1.0.0
### Expected & Actual behavior (期望与实际表现)
When running spark-loader, there were a lot of dependency conflicts. Finally, I found the jersey,jakarta,hk2 related package, which was in spark's jars directory, and it was not the same as the jersey,jakarta,hk2 version in the lib directory after the loader was packaged. For example, lib has mainly 3.x jersey and spark has 2.x jars. My solution was to remove the conflicting jars from the spark jars directory and use the loader as it was, so the loader could run. Screenshot of error message:


The simple removal of the jar worked for me but wasn't general enough. I'm trying to use spark-submit --exclude-jars and see if the community has a better solution, thanks
### Vertex/Edge example (问题点 / 边数据举例)
_No response_
### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the dependency conflicts while running spark-loader, then compare the jersey, jakarta, and hk2 jars in Spark's jars directory with those in the packaged lib directory. The issue also mentions spark-submit --exclude-jars as an investigation path. Done means spark-loader runs without manually removing jars and without the reported conflicts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spark
- Domain
- data-engineering, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100