apache / apache/hugegraph-toolchain

Spark loader has dependency conflicts

Open
#464 12 comments 1 reaction 0 assignees View on GitHub
bug
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:
![image](https://github.com/apache/incubator-hugegraph-toolchain/assets/30570711/e77f7432-1708-4c11-a52e-afd79105f14a)
![image](https://github.com/apache/incubator-hugegraph-toolchain/assets/30570711/590a0c54-8ac7-4cb5-9fa7-adabc1eaabb4)

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.